summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-12-01 23:20:44 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-12-01 23:20:44 +0100
commitfb32b2805761453019e6f579cf1eae45312e321c (patch)
treee28d7adf9185f109c18df02fdb251875e4ec7400
parentb2eb53f27d5064269ccd9ef7c4ed9163fdee6f82 (diff)
downloadorg-mode-fb32b2805761453019e6f579cf1eae45312e321c.tar.gz
org-capture: Fix bd3a2cb
* lisp/org-capture.el (org-capture-fill-template): Fix regexp and type for KEY. Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk> <http://permalink.gmane.org/gmane.emacs.orgmode/103214>
-rw-r--r--lisp/org-capture.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 75675c0..6aa100f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1630,7 +1630,7 @@ The template may still contain \"%?\" for cursor positioning."
(org-capture--expand-embedded-elisp 'mark)
(let ((regexp "%\\(:[-a-za-z]+\\|<\\([^>\n]+\\)>\\|[aAcfFikKlntTuUx]\\|\
-^\\(?:{\\([^}]*\\)}\\)?\\([CgGLptTuU]\\)?\\)")
+\\^\\(?:{\\([^}]*\\)}\\)?\\([CgGLptTuU]\\)?\\)")
(strings))
(while (re-search-forward regexp nil t)
(let ((pos (copy-marker (match-beginning 0)))
@@ -1669,8 +1669,8 @@ The template may still contain \"%?\" for cursor positioning."
"org-capture-template-prompt-history::"
(or prompt ""))))
(setq completions (mapcar #'list completions)))
- (pcase (string-to-char key)
- ((or ?G ?g)
+ (pcase key
+ ((or `"G" `"g")
(let* ((org-last-tags-completion-table
(org-global-tags-completion-table
(cond ((equal key "G") (org-agenda-files))
@@ -1693,7 +1693,7 @@ The template may still contain \"%?\" for cursor positioning."
(and (org-at-heading-p)
(let ((org-ignore-region t))
(org-set-tags nil 'align))))))
- (?C
+ (`"C"
(cond
((= (length clipboards) 1) (insert (car clipboards)))
((> (length clipboards) 1)
@@ -1701,7 +1701,7 @@ The template may still contain \"%?\" for cursor positioning."
(car clipboards)
'(clipboards . 1)
(car clipboards))))))
- (?L
+ (`"L"
(cond ((= (length clipboards) 1)
(org-insert-link 0 (car clipboards)))
((> (length clipboards) 1)
@@ -1711,7 +1711,7 @@ The template may still contain \"%?\" for cursor positioning."
(car clipboards)
'(clipboards . 1)
(car clipboards))))))
- (?p (org-set-property prompt nil))
+ (`"p" (org-set-property prompt nil))
((guard key)
;; These are the date/time related ones.
(let* ((upcase? (equal (upcase key) key))