add(org-roam): custom command to filter on a tag
This commit is contained in:
parent
28dae3bfeb
commit
e692a9de93
1 changed files with 16 additions and 0 deletions
16
config.org
16
config.org
|
|
@ -1034,6 +1034,22 @@ Preserve indentation in SRC blocks
|
|||
|
||||
* Custom
|
||||
|
||||
** Org-roam
|
||||
|
||||
Inspired by https://github.com/org-roam/org-roam/wiki/User-contributed-Tricks#filter-by-a-tag .
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun myrmi/org-roam-node-find-tag-filter ()
|
||||
"Select a single tag from list and filter `org-roam-node' by it."
|
||||
(interactive)
|
||||
(let ((tag (car (completing-read-multiple "Tag: "
|
||||
(org-roam-tag-completions)))))
|
||||
(org-roam-node-find nil nil
|
||||
(lambda (node)
|
||||
(member tag
|
||||
(org-roam-node-tags node))))))
|
||||
#+END_SRC
|
||||
|
||||
** Sudo current buffer
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue