diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-01-31 22:50:09 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-01-31 22:50:09 +0100 |
commit | 426bce6a8343d886b8fadeeb2cda86abd53bf37a (patch) | |
tree | b516d8b6cd33d30bfcdaa8cdbb0aa805720bafe3 | |
parent | caa54d2e987eaca785df87ff51c11a04a38d4842 (diff) | |
download | org-mode-426bce6a8343d886b8fadeeb2cda86abd53bf37a.tar.gz |
org-capture: Small fix
* lisp/org-capture.el (org-mks): Find entries with full prefix, not
last pressed key.
This fixes a bug introduced in 8194e7b09.
Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111779>
-rw-r--r-- | lisp/org-capture.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 416b736..ae5ee50 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1509,17 +1509,17 @@ is selected, only the bare key is returned." (message "Invalid key `%s'" pressed) (sit-for 1) (message prompt) (setq pressed (char-to-string (read-char-exclusive)))) + (setq current (concat current pressed)) (cond ((equal pressed "\C-g") (user-error "Abort")) ;; Selection is a prefix: open a new menu. - ((member pressed des-keys) - (setq current (concat current pressed))) + ((member pressed des-keys)) ;; Selection matches an association: return it. - ((let ((entry (assoc pressed table))) + ((let ((entry (assoc current table))) (and entry (throw 'exit entry)))) ;; Selection matches a special entry: return the ;; selection prefix. - ((assoc pressed specials) (throw 'exit pressed)) + ((assoc current specials) (throw 'exit current)) (t (error "No entry available"))))))) (when buffer (kill-buffer buffer)))))) |