-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add utility for denote-find-file
#106
Comments
Hello @felipebalbi,
Let's leave this issue open as a point of discussion to read what others may have to say.
I think it is not necessary. Users have different ways to access their files. Standard There is a package called Personally, when I don't do it through Dired I tend to use |
Hi @protesilaos,
sure thing
The difference, however, is that my suggestion above is extracting the note's title, instead of using the raw filename, which may provide for a more pleasant user experience, although it's debatable.
Interesting, one benefit of this approach is that one can search for title and/or keywords. I'll probably use a combination of my suggestion above and filtering by keyword too. Wonder if I can figure out how to feed this information into
I do too, all my notes are kept in a |
Yes, that is an improvement. Though we would then need to make it more consistent across all our relevant prompts/interfaces, such as when creating a link to a file and when showing backlinks.
I don't know how to achieve this, though I am happy to make it happen. About filtering using the |
Hi! Interesting discussion. I have started to use the package consult-notes for these purposes. Once configured I only have to invoke |
@svnsbck Good call! It is also mentioned in the Denote manual. |
About improving user experience during note finding: I'm not sure if this falls really within the scope of Denote. One of its design goals is Composability. Then it may make more sense to provide an example in README about how to achieve this with already existing packages. this being: showing the title (and the keywords) in a visually appealing way instead of the filename. The infrastructure is there (the necessary functions). What's missing is an example of the "glue" needed to tie different packages together.
What would be the performance implications? Listing a directory's contents is quite fast on pretty much every system. But in order to fetch the title you would need to open every single note file during completion, every time. So, the more your note collection grows the slower it would get. About user experience, the main difference between the filename or the title is casing and the keywords ("The Lord of the Rings +book" becomes "1234567890--the_lord_of_the_rings__book.txt". So, making it visually more appealing could done by using something like marginalia and some regex on the filename. Meaning, you could either use faces to color the output of find-file (I recall there was some example about that?) or rewrite the output to show the title and keywords (from the filename) in columns (with Marginalia?). |
Thank you @telenieko for your thoughts!
Perhaps this could work by leveraging the This would be glue code, of course. Not something to add to denote.el.
We do this, for example, in the buffer where the backlinks are presented. Though adding faces to the completion UI may be tricky as it is uncharted territory for me. This seems to work with (completing-read
"Do you see propertized candidates? "
`(
"one"
,(propertize "two" 'face 'error) ; red+bold
"three"
,(propertize "four" 'face 'success) ; green+bold
,(format "%s--for-didactic-pursposes__testing_%s"
(propertize "1234567890" 'face 'error)
(propertize "hello" 'face 'success)
)
)) |
For what it's worth: I've been building on Adding things like keywords & number of words is possible as well by altering |
Thank you @EFLS! I have not tested any of the code, but my impression is that this is promising. I still have a TODO for consult-notes: I have used it before but need to actually integrate it into my setup. If you have something to share with other users, consider contacting the mailing list as well. Also, I am happy to include any of this in the manual, perhaps under the existing entry for |
I might do that at some point, @protesilaos! I'm currently still tinkering and experimenting with it. Currently I have included in the Consult buffer, next to the title: keywords, number of words, subdirectory, and modified time. One major drawback of the current setup is: it's no longer possible to quickly filter by keyword (as the candidates shown are titles, not filenames), nor to narrow to a directory (e.g. |
You could check my modified version of that snippet, it provided such functionality. |
Hello folks! My understanding is that the Closing this issue as it will not be part of core Denote. |
Hi Prot,
I spent a little time with
denote
and felt the need for adenote-find-file
so I could easily visit a note without having to first visit the relevantdired
buffer.I came up with the following two utilities:
Perhaps there's some interest in integrating something like this as part of
denote
. What are your thoughts?The text was updated successfully, but these errors were encountered: