(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:
parent
1b5e55b6c4
commit
78b518efd3
1 changed files with 2 additions and 1 deletions
|
@ -317,7 +317,8 @@ Suitable for moving point."
|
|||
The templates are defined at `org-roam-capture-templates'. The
|
||||
GOTO and KEYS argument have the same functionality as
|
||||
`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)
|
||||
(setq keys (caar org-capture-templates)))
|
||||
(add-hook 'org-capture-after-finalize-hook #'org-roam-capture--save-file-maybe-h)
|
||||
|
|
Loading…
Reference in a new issue