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

Feature request : adding an option to list empty or non-empty notes with denote-sort-dired #423

Open
Wilf-bog opened this issue Sep 1, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation possible-extension

Comments

@Wilf-bog
Copy link

Wilf-bog commented Sep 1, 2024

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.

@protesilaos
Copy link
Owner

protesilaos commented Sep 2, 2024 via email

protesilaos added a commit that referenced this issue Sep 18, 2024
Thanks to Wilf for suggesting this idea in issue 423:
<#423>.
@protesilaos
Copy link
Owner

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.

@protesilaos protesilaos added the documentation Improvements or additions to documentation label Sep 18, 2024
@Wilf-bog
Copy link
Author

Wilf-bog commented Sep 18, 2024 via email

@protesilaos
Copy link
Owner

protesilaos commented Sep 18, 2024 via email

@Wilf-bog
Copy link
Author

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 empty notes or non-empty notes at the end of the buffer name could make it easier to switch between different iterations of dired buffers pointing to the same directory.

If I encounter some issues I'll let you know. Thanks again, I look forward to see this added to the next Denote release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation possible-extension
Projects
None yet
Development

No branches or pull requests

2 participants