xenow · 2022-11-18 01:16
I've been trying out org-roam, and it seems encouraged to navigate between the files (as open buffers or yet to be open things) by using org-roam-find-node.
However, doing this a few times, I end up with a lot of org-roam buffers clogging up my other buffer list. I see the names generally start with a YYYYMMDD.... prefix, and end in the standard .org suffix - I see that there is a consult-buffer-filter option, but that wouldn't be completely sufficient due to the non-standard name of these files (it'd be nice if I could ensure they all are prefixed with "or-" or some such).
Even better would be if I could also exclude them from my recentf list, but I'm hoping for the buffers currently.
graduale · 2022-11-18 02:35
Check out `consult-org-roam`, and in particular the recently added [`consult-orgroam-buffer`](https://github.com/jgru/consult-org-roam/blob/main/consult-org-roam-buffer.el). You can set things up si org roam buffers don’t show, except if you specifically enter a key associated with the source etc.
Arkhelyi · 2022-11-18 02:59
not OP but I tried this package a few days ago and gave up, it slowed considerably `consult-buffer`. I couldn't identify yet why.
xenow · 2022-11-18 23:39
Hi all - update - I figured out an alternative (although I appreciate the link to consult-org-roam - I need to try it, although I am apprehensive if it causes slowdown).
First, this will rename the default capture file names (what I was struggling to find - a file name suffix/prefix option):
(setq org-roam-dailies-capture-templates
'(("d" "default" entry "* %?" :target
(file+head "%<%Y-%m-%d>-roam.org" "#+title: %<%Y-%m-%d>\n"))))
(setq org-roam-capture-templates
'(("d" "default" plain "%?" :target
(file+head "%<%Y%m%d%H%M%S>-${slug}-roam.org" "#+title: ${title}\n")
:unnarrowed t)))
Now, with that, it becomes very easy to use existing buffer/filename filter capabilities to exclude from the recentf and buffer lists (using consult in both).
(add-to-list 'recentf-exclude ".*roam.org$")
(add-to-list 'consult-buffer-filter ".*roam.org$")
That snippet will avoid inclusion (I'm not sure if there is a native 'buffer' filter feature - guessing there is).