(feat): Cache template variable entry (#387)

Addresses
https://github.com/jethrokuan/org-roam/issues/285#issuecomment-606724827
This commit is contained in:
Jethro Kuan 2020-04-01 12:09:41 +08:00 committed by GitHub
parent f27e5f2384
commit 48ccb084f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,7 +231,9 @@ the file if the original value of :no-save is not t and
(s-format (org-capture-get :template)
(lambda (key)
(or (s--aget org-roam-capture--info key)
(completing-read (format "%s: " key ) nil))) nil)))
(when-let ((v (completing-read (format "%s: " key ) nil)))
(push (cons key v) org-roam-capture--info)
v))) nil)))
(defalias 'org-roam--capture-get-point 'org-roam-capture--get-point)
(make-obsolete 'org-roam--capture-get-point 'org-roam-capture--get-point "2020/03/29")