-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature request : adding an option to list empty or non-empty notes with denote-sort-dired #423
Comments
From: Wilf ***@***.***>
Date: Sun, 1 Sep 2024 13:39:49 -0700
Hi,
Hello there!
[... 15 lines elided]
By empty, I mean any notes that only contains the 4 metadata lines and
2 empty lines at the beginning but nothing else afterwards.
Okay, so we first need a small function that returns non-nil if the file
satisfies this condition. In the 'denote-org-extras-dblock--get-file-contents'
we have a heuristic of where "file contents" begin, so maybe we can use
this. Unless there is a better way to identify our front matter. I need
to think about it some more---ideas are welcome!
This way, it would be possible to offer the option to only list notes
with relevant information when working on a project, while also having
the option to access all the empty notes that needs to be filled when
one wants to start working on those. I was thinking of a last option
like "Only show non-empty notes? (All, Non-empty, Empty)" for such a
workflow.
Yes, this makes sense.
Alternatively, an option to sort by file size could also work but
would be less precise, considering the length of file names, the
number of keywords, etc. and the impossibility to filter out empty or
non-empty files.
This would be problematic for the goal of finding "empty notes" for the
reasons you mention. It can be useful in its own right though.
I'll keep an eye on this discussion, and consider the possibility to
develop this feature on my free time. I don't have programming skills,
but maybe it could be a good project to learn elisp.
Well, if you do work on this before I do, then I am happy to receive
your contribution. And if you have something and need a review, just let
me know.
A final word to say thank you for this fantastic program. It is the
main reason I switched to emacs and the main package I work with.
You are welcome!
…--
Protesilaos Stavrou
https://protesilaos.com
|
Thanks to Wilf for suggesting this idea in issue 423: <#423>.
I just updated the manual with sample code that lists empty/non-empty files in a Dired buffer. For our purposes, "empty" includes those which only have front matter. If you do give it a try, let me know how it works for you. |
Hi Prot!
Sorry for not replying sooner, I'm glad you already have something in the works. I'll give it a try tonight or tomorrow and get back to you as soon as possible.
Wilf
Envoyé depuis Proton Mail pour Android
…-------- Message d'origine --------
Le 2024-09-18 10 h 18, Protesilaos Stavrou a écrit :
I just updated the manual with sample code that lists empty/non-empty files in a Dired buffer. For our purposes, "empty" includes those which only have front matter.
If you do give it a try, let me know how it works for you.
—
Reply to this email directly, [view it on GitHub](#423 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BKB2IZSO5V5BBLLUVLW23NDZXGDSVAVCNFSM6AAAAABNPERWQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJYGYYDMNJYG4).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
From: Wilf ***@***.***>
Date: Wed, 18 Sep 2024 08:00:51 -0700
Hi Prot!
Hello there!
Sorry for not replying sooner,
No worries!
I'm glad you already have something in the works. I'll give it a try
tonight or tomorrow and get back to you as soon as possible.
Sure, do it whenever you want. I tested it and it seems to work as
intended. This is in the manual, anyway, so we are not breaking
anybody's setup via an update.
…--
Protesilaos Stavrou
https://protesilaos.com
|
I've had the chance to test it on a Windows 11 machine at work and on a Linux machine at home and everything works perfectly well. Thanks for adding this feature, I'll start to integrate it in my workflow in the next few days. As for potential improvements, I think the buffer name could be a bit more precise. Adding If I encounter some issues I'll let you know. Thanks again, I look forward to see this added to the next Denote release. |
Hi,
Coming from Obsidian, I'm used to create "empty" notes on the fly while writing a specific note if I know some leveraged concepts could be interesting to write about in the future. I achieve a similar result with denote by using the
denote-link-or-create
command.As you can imagine, the number of empty notes grows at an exponential rate. It's not a problem on Obsidian since "empty" notes are only created when the user click on a link a the note if it doesn't exist already, but since the
denote-link-or-create
command create a new file each time, my notes directory has more empty notes than relevant notes.I learned recently about the very useful
denote-sort-dired
command and I think it could be useful to add an option to list only empty notes or non-empty ones. By empty, I mean any notes that only contains the 4 metadata lines and 2 empty lines at the beginning but nothing else afterwards.This way, it would be possible to offer the option to only list notes with relevant information when working on a project, while also having the option to access all the empty notes that needs to be filled when one wants to start working on those. I was thinking of a last option like "Only show non-empty notes? (All, Non-empty, Empty)" for such a workflow.
Alternatively, an option to sort by file size could also work but would be less precise, considering the length of file names, the number of keywords, etc. and the impossibility to filter out empty or non-empty files.
I'll keep an eye on this discussion, and consider the possibility to develop this feature on my free time. I don't have programming skills, but maybe it could be a good project to learn elisp.
A final word to say thank you for this fantastic package. It is the main reason I switched to emacs and the main package I work with.
The text was updated successfully, but these errors were encountered: