Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Open file at Line Number from Intent #1202

Closed
alensiljak opened this issue Jan 20, 2021 · 5 comments · Fixed by #1337
Closed

Editor: Open file at Line Number from Intent #1202

alensiljak opened this issue Jan 20, 2021 · 5 comments · Fixed by #1337

Comments

@alensiljak
Copy link

alensiljak commented Jan 20, 2021

General information

  • App version: 2.5.0 F-Droid
  • System: Android 10, Xiaomi Mi 9T, Lineage OS

Description

Since it's 2021 and there is still no decent full-text-search solution, would you please at least accept the line number from aGrep's intent?

In the aGrep's Preferences, there is an option "Send Intent with the line number". Hopefully this would be enough to navigate to the line number in Markor editor, allowing quick navigation in long files.

The code that creates the Intent can be previewed here.

The navigation from a long-press is initiated here. There's a slight difference but it should not matter for the receiver. The parameter is still "line".

As a side note, I would debate the need to have the full-text-search integrated but you've already rejected that request multiple times so far. Even though I have to say I don't understand the reasoning. The current phones have multiple Gigabytes of RAM and storage. aGrep, at least in my case, returns the results pretty much instantaneously so I don't really see a reason not to have search from the current location in the file navigator.

So, at least I'd hope that we can navigate to the desired result from aGrep.
Thanks!

@alensiljak
Copy link
Author

alensiljak commented Jan 20, 2021

Also, whenever navigating from aGrep to Markor, it always ends up in a viewer.
I've turned off the "prefer viewer" option but to no effect.

Obviously, this is because the intent is ACTION_VIEW, so there is no way to open the editor, unless there's a hack to open the editor if the line number is sent, or to remember the position when switching to the editor. The second option would depend on #1149 cause it doesn't seem to work at the moment.

@gsantner
Copy link
Owner

gsantner commented Jan 20, 2021

I may read the rest later but

Since it's 2021 and there is still no

starting with that attitude you usually not find somebody to waste his !!freetime!! with whatever you bid them for.

Btw Markor has a decent simple & regex search - just not recursive.

@alensiljak
Copy link
Author

alensiljak commented Jan 20, 2021

Btw Markor has a decent simple & regex search - just not recursive.

For most basic cases this is more than sufficient.
My use, on the other hand, is a bit more complex. With VS Code and it's various extensions for Markdown, it has become a decent multi-platform solution for wikis and knowledge bases. Naturally, one wants to replicate this on the phone, which makes it that much more useful - to have the information when needed and to enter it while still fresh and relevant.

Markor is on a good path to match the necessary functionality in this respect, with only the search missing. It is obvious that the search is likely the most useful thing in a knowledge base or a wiki, apart from adding the information.
aGrep is actually not a bad solution for this purpose. I think that accepting the line number parameter will already bridge the search and editing.
With Syncthing and rclone covering file synchronisation, this is a fairly complete solution.

I'm not sure what is going to happen with the changes in Android, and limiting of the file access, though. This might have a crippling effect on combining different tools, as I do here.

@alensiljak
Copy link
Author

One more use-case: amake/orgro#34

@alensiljak alensiljak changed the title Navigate to the Line Number from Intent (aGrep) Navigate to the Line Number from Intent Mar 10, 2021
@gsantner gsantner added this to the Community Contribution milestone Mar 11, 2021
@gsantner gsantner changed the title Navigate to the Line Number from Intent Editor: Open file at Line Number from Intent Mar 11, 2021
@gsantner
Copy link
Owner

gsantner commented May 13, 2021

from agrep:

Screenshot_2021-05-13_11-45-38

we have support for line number by search PR #1337 .
Though not for the "unusual GET parmameter instead of a Intent Extra", which agrep does.

adelobosko added a commit to adelobosko/markor that referenced this issue May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants