chrisbarrett / nursery

Programs and libs that I haven't gotten around to formally packaging
GNU General Public License v3.0
140 stars 7 forks source link

org-roam-dblocks: Suggestion to search only for links that are not yet present in buffer #3

Closed EFLS closed 2 years ago

EFLS commented 2 years ago

I've only been playing with Org-roam without really using it (as I still use my own Zetteldeft package for my notes), but your dynamic blocks feature is essential, so thanks for that. I hope it gets implemented in Org-roam proper.

One thing that could further improve it, is an option to only include 'missing links', i.e. links that are not yet present in the current buffer.

Let me explain how it could be useful.

  1. When writing on a certain topic, let's say on FOSS, I start (manually) making a collection of links to relevant notes. Some of these notes I remember from the top of my head, and I'll include links to them during my work.
  2. After a while, I'll start wondering which notes I might have missed. Now generating a list of all notes is easy with our org-roam-dblocks as I can simply search for the foss tag and it'll return a list, but that list might be long and I'm particularly interested in the notes that I haven't linked to yet.
  3. That's where a specific option would come in handy: to only include notes in the dynamic block that aren't linked to yet in the current buffer.

I hope I explained the use-case well enough. It's something that I've implemented in my own package (documented here, albeit unclearly), and a feature that might interest you as well. It's not a real feature request per se, as I don't know whether I'll be switching to Org-roam for all of my notes.

(I also have no clue how complex this might be to add, as your code seems much more complex than what my limited Emacs Lisp proficiency allows me to grasp.)

chrisbarrett commented 2 years ago

Thanks for the kind words. :) This seems like a pretty common use case that I might want to do myself at some point, so I've added special support to make it convenient.

You can now add :only-missing t to the header args to get this behaviour. Let me know if you have any issues and feel free to reopen.

EFLS commented 2 years ago

Amazing! Thanks a lot.