mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): org-roam-capture--capture shadow org-capture-templates-contexts (#662)
Lexically bind org-capture-templates-contexts to nil before calling org-capture with org-roam-capture-templates. Otherwise, contexts may shadow org-roam-templates which have same keys as org-capture-templates. mentioned in #651
This commit is contained in:
@ -317,7 +317,8 @@ Suitable for moving point."
|
|||||||
The templates are defined at `org-roam-capture-templates'. The
|
The templates are defined at `org-roam-capture-templates'. The
|
||||||
GOTO and KEYS argument have the same functionality as
|
GOTO and KEYS argument have the same functionality as
|
||||||
`org-capture'."
|
`org-capture'."
|
||||||
(let ((org-capture-templates (mapcar #'org-roam-capture--convert-template org-roam-capture-templates)))
|
(let ((org-capture-templates (mapcar #'org-roam-capture--convert-template org-roam-capture-templates))
|
||||||
|
org-capture-templates-contexts)
|
||||||
(when (= (length org-capture-templates) 1)
|
(when (= (length org-capture-templates) 1)
|
||||||
(setq keys (caar org-capture-templates)))
|
(setq keys (caar org-capture-templates)))
|
||||||
(add-hook 'org-capture-after-finalize-hook #'org-roam-capture--save-file-maybe-h)
|
(add-hook 'org-capture-after-finalize-hook #'org-roam-capture--save-file-maybe-h)
|
||||||
|
Reference in New Issue
Block a user