Comments (11)
Hello @felipebalbi,
Perhaps there's some interest in integrating something like this as part of
denote
.
Let's leave this issue open as a point of discussion to read what others may have to say.
What are your thoughts?
I think it is not necessary. Users have different ways to access their files. Standard C-x C-f
(find-file
) already gives you minibuffer completion---you don't have to used Dired first.
There is a package called consult-bookmark
which lets you pick a bookmarked directory and then uses find-file
on its contexts. This is a general solution for all your regularly-visited directories.
Personally, when I don't do it through Dired I tend to use C-x p f
(project-find-file
) and related commands. This is because I treat my notes as a "project" with a git history, so it is easy to use the built-in capabilities for this. project-find-file
is like find-file
but only for the given project.
from denote.
Hello @felipebalbi,
Hi @protesilaos,
Perhaps there's some interest in integrating something like this as part of
denote
.Let's leave this issue open as a point of discussion to read what others may have to say.
sure thing
What are your thoughts?
I think it is not necessary. Users have different ways to access their files. Standard
C-x C-f
(find-file
) already gives you minibuffer completion---you don't have to used Dired first.
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.
There is a package called
consult-bookmark
which lets you pick a bookmarked directory and then usesfind-file
on its contexts. This is a general solution for all your regularly-visited directories.Personally, when I don't do it through Dired I tend to use
C-x p f
(project-find-file
) and related commands.
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 marginalia
and still allow for filtering on the keywords.
This is because I treat my notes as a "project" with a git history, so it is easy to use the built-in capabilities for this.
project-find-file
is likefind-file
but only for the given project.
I do too, all my notes are kept in a git
repository as well.
from denote.
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.
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.
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
marginalia
and still allow for filtering on the keywords.
I don't know how to achieve this, though I am happy to make it happen.
About filtering using the marginalia
annotations, I think that is not possible directly. You could use embark
to produce a buffer out of the completion candidates and then invoke something like consult-keep-lines
. But it no longer is a minibufffer-level interaction.
from denote.
Hi!
Interesting discussion. I have started to use the package consult-notes for these purposes. Once configured I only have to invoke consult-notes
and then search through all my notes from the minubuffer using the title/tags. It's quite handy I think.
from denote.
@svnsbck Good call! It is also mentioned in the Denote manual.
from denote.
instead of using the raw filename, which may provide for a more pleasant user experience, although it's debatable.
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.
The difference, however, is that my suggestion above is extracting the note's title
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?).
from denote.
Thank you @telenieko for your thoughts!
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.
Perhaps this could work by leveraging the consult
package's asynchronous functionality? Kind of like consult-find
? But I have no knowledge of the internals.
This would be glue code, of course. Not something to add to denote.el.
Meaning, you could either use faces to color the output of find-file (I recall there was some example about that?)
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 vertico
, though I do not know if it is a good idea and/or what the possible downsides could be.
(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)
)
))
from denote.
For what it's worth: I've been building on consult-notes
package to achieve some of the things discussed here. In particular, I wanted to get an overview of what's in my notes folder, with note titles rather than file names. I've received some excellent help: mclear-tools/consult-notes#14
Adding things like keywords & number of words is possible as well by altering consult-notes-annotate-denote
. That will be a next step.
from denote.
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 consult-notes
(mutatis mutandis).
from denote.
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. /journal/
).
from denote.
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.
/journal/
).
You could check my modified version of that snippet, it provided such functionality.
mclear-tools/consult-notes#14 (comment)
from denote.
Related Issues (20)
- Org capture with denote while creating title programatically HOT 3
- Providing a way to extend the content of the backlinks buffer ? HOT 5
- "denote:" link for non-note files doesn't open HOT 22
- Adding denote-keywords-add and denote-keywords-remove as call able function HOT 14
- denote--get-silo-path: Symbol’s function definition is void: file-name-parent-directory HOT 7
- denote-file-types plist now has 11 elements and not 8 HOT 1
- defuns for implementing a zettelkasten in denote. HOT 14
- Selecting a non-denote file navigates to only to denote files with `denote-link-find-file` minibuffer HOT 1
- use consult for `denote-link-insert-*` HOT 6
- `denote-link-or-create` enters path instead of note name into title history HOT 5
- add a way to use `denote-link-or-create` programmatically HOT 2
- Delimiters in signatures HOT 6
- denote-rename-file-using-front-matter doesn't work since last update HOT 5
- double `#+title ` when called through keybinding but not through `M-x` HOT 12
- backlinks buffer doesn't support non-latin characters HOT 19
- [feature request] Only display TITLE in tabs HOT 19
- is there a way to skip the "file title" prompt when using the function denote-open-or-create HOT 2
- How to open denote links outside of denote when the note is located in a silo? HOT 2
- parenthesis are stripped from the title including thier content when creating file name HOT 1
- How to stop denote-dired-rename-marked-files from prompting for pdf files? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denote.