summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Vollmer <iarchivedmywholelife@gmail.com>2020-06-08 14:19:35 -0400
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-06-10 19:41:35 +0200
commit3ba4f056d736c4ed4261ad3b234e0199edec6e8c (patch)
tree49798bcb22090a95b45a4432c88eaf71a609a538
parentefd714d72256c5dcce1a7c3cb15b0767453038a2 (diff)
downloadorg-mode-3ba4f056d736c4ed4261ad3b234e0199edec6e8c.tar.gz
capture: Set `org-capture-current-plist' before `org-capture-mode-hook'
* org-capture.el (org-capture-place-template): Allow `org-capture-current-plist' access during `org-capture-mode-hook' Ensure consistency between org-capture's hooks. `org-capture-after-finalize-hook' is now the only hook that cannot access `org-capture-current-plist' because the capture buffer is killed when it is run.
-rw-r--r--etc/ORG-NEWS1
-rw-r--r--lisp/org-capture.el4
2 files changed, 3 insertions, 2 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index f313b07..28ed8c9 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -478,6 +478,7 @@ function, ~org-edit-latex-fragment~. This functions in a comparable
manner to editing inline source blocks, bringing up a minibuffer set
to LaTeX mode. The math-mode deliminators are read only.
+*** org-capture: ~org-capture-current-plist~ accessible during ~org-capture-mode-hook~
* Version 9.3
** Incompatible changes
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 9136d33..7dde7e1 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1128,8 +1128,8 @@ may have been stored before."
(`plain (org-capture-place-plain-text))
(`item (org-capture-place-item))
(`checkitem (org-capture-place-item)))
- (org-capture-mode 1)
- (setq-local org-capture-current-plist org-capture-plist))
+ (setq-local org-capture-current-plist org-capture-plist)
+ (org-capture-mode 1))
(defun org-capture-place-entry ()
"Place the template as a new Org entry."