mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): add :info key to org-roam-node-{capture/insert} (#1741)
In adding this parameter, the external facing methods expose another point of parameterization for the inner org-roam-capture- method. This is most useful for the org-roam-node-insert method which has a complicated inner logic; By adding the :info &key parameter, we reduce the likelyhood of needing to duplicate that inner logic. Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This commit is contained in:
@ -403,17 +403,19 @@ TEMPLATES is a list of org-roam templates."
|
||||
(org-capture goto keys)))
|
||||
|
||||
;;;###autoload
|
||||
(cl-defun org-roam-capture (&optional goto keys &key filter-fn templates)
|
||||
(cl-defun org-roam-capture (&optional goto keys &key filter-fn templates info)
|
||||
"Launches an `org-capture' process for a new or existing node.
|
||||
This uses the templates defined at `org-roam-capture-templates'.
|
||||
Arguments GOTO and KEYS see `org-capture'.
|
||||
FILTER-FN is a function to filter out nodes: it takes an `org-roam-node',
|
||||
and when nil is returned the node will be filtered out.
|
||||
The TEMPLATES, if provided, override the list of capture templates (see
|
||||
`org-roam-capture-'.)"
|
||||
`org-roam-capture-'.)
|
||||
The INFO, if provided, is passed along to the underlying `org-roam-capture-'."
|
||||
(interactive "P")
|
||||
(let ((node (org-roam-node-read nil filter-fn)))
|
||||
(org-roam-capture- :goto goto
|
||||
:info info
|
||||
:keys keys
|
||||
:templates templates
|
||||
:node node
|
||||
|
Reference in New Issue
Block a user