dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
471 stars 38 forks source link

Display org title next to file name in results #109

Closed ghost closed 3 years ago

ghost commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Hi, thanks for the suggestion.