1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-04 08:47:03 +00:00

lisp/org.el: Minor enhancement to `org-priority'

* lisp/org.el (org-priority): When the set of numeric priorities
only comprises single digits, ask for a single char event.
This commit is contained in:
Bastien 2021-05-15 23:07:50 +02:00
parent c77066dd7f
commit b91e934a59

View File

@ -11258,10 +11258,13 @@ or a character."
(setq
new
(if nump
(string-to-number
(read-string (format "Priority %s-%s, SPC to remove: "
(number-to-string org-priority-highest)
(number-to-string org-priority-lowest))))
(let ((msg (format "Priority %s-%s, SPC to remove: "
(number-to-string org-priority-highest)
(number-to-string org-priority-lowest))))
(if (< 9 org-priority-lowest)
(string-to-number (read-string msg))
(message msg)
(string-to-number (char-to-string (read-char-exclusive)))))
(progn (message "Priority %c-%c, SPC to remove: "
org-priority-highest org-priority-lowest)
(save-match-data