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

Display org title next to file name in results #109

Closed
ghost opened this issue Dec 19, 2020 · 2 comments
Closed

Display org title next to file name in results #109

ghost opened this issue Dec 19, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 19, 2020

Thank you for this package. I have just had a quick look at it, I like the whole thing being able to change the directory after searching, the search strings etc. I am trying to set up a Zettelkasten, all my note files have only timestamps as names, I wonder whether it is possible to show the first line of each file or the org title in the results buffer.

@dajva
Copy link
Owner

dajva commented Dec 26, 2020

I think you should be able to extend this package with the rg-filter-hook, that is called when new content has been added to the results buffer. You would have to search for all items with the text-property rg-file-message (assuming you are using grouped mode) to get the file name and update the text as you find appropriate.
There is a minor bug in this code that I will fix in a minute that will ensure that the point is at the start of the newly inserted content.

@ghost
Copy link
Author

ghost commented Jan 3, 2021

Hi, thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant