From 7f8793e5f1c69cf9311479e69d18a62ae87e35ce Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 22 Dec 2020 10:29:37 +0100 Subject: [PATCH] Update to Org 9.4.4 --- lisp/org/org-agenda.el | 4 ---- lisp/org/org-capture.el | 4 ---- lisp/org/org-macs.el | 41 +++++++++++++++++++++++------------------ lisp/org/org-version.el | 4 ++-- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 83f30bf96af..2da6451523e 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -10751,8 +10751,4 @@ when defining today." (provide 'org-agenda) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-agenda.el ends here diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index a9a1181935c..d3dc0ab3e75 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1947,8 +1947,4 @@ Assume sexps have been marked with (provide 'org-capture) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-capture.el ends here diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 506fba8aaf5..d397e3ed05b 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -377,18 +377,25 @@ error when the user input is empty." 'org-time-stamp-inactive) (apply #'completing-read args))) -(defun org--mks-read-key (allowed-keys prompt) +(defun org--mks-read-key (allowed-keys prompt navigation-keys) "Read a key and ensure it is a member of ALLOWED-KEYS. +Enable keys to scroll the window if NAVIGATION-KEYS is set. TAB, SPC and RET are treated equivalently." - (let* ((key (char-to-string - (pcase (read-char-exclusive prompt) - ((or ?\s ?\t ?\r) ?\t) - (char char))))) - (if (member key allowed-keys) - key - (message "Invalid key: `%s'" key) - (sit-for 1) - (org--mks-read-key allowed-keys prompt)))) + (setq header-line-format (when navigation-keys "Use C-n, C-p, C-v, M-v to navigate.")) + (let ((char-key (read-char-exclusive prompt))) + (if (and navigation-keys (memq char-key '(14 16 22 134217846))) + (progn + (org-scroll char-key) + (org--mks-read-key allowed-keys prompt navigation-keys)) + (let ((key (char-to-string + (pcase char-key + ((or ?\s ?\t ?\r) ?\t) + (char char))))) + (if (member key allowed-keys) + key + (message "Invalid key: `%s'" key) + (sit-for 1) + (org--mks-read-key allowed-keys prompt navigation-keys)))))) (defun org-mks (table title &optional prompt specials) "Select a member of an alist with multiple keys. @@ -461,15 +468,13 @@ is selected, only the bare key is returned." ;; Display UI and let user select an entry or ;; a sub-level prefix. (goto-char (point-min)) - (setq header-line-format nil) (org-fit-window-to-buffer) - (unless (pos-visible-in-window-p (1- (point-max))) - (setq header-line-format "Use C-n, C-p or C-v to navigate.") - (setq allowed-keys (append allowed-keys '("\C-n" "\C-p" "\C-v")))) - (let ((pressed (org--mks-read-key allowed-keys prompt))) - (while (and (member pressed '("\C-n" "\C-p" "\C-v"))) - (org-scroll (string-to-char pressed)) - (setq pressed (org--mks-read-key allowed-keys prompt))) + (message "") ; With this line the prompt appears in + ; the minibuffer. Else keystrokes may + ; appear, which is spurious. + (let ((pressed (org--mks-read-key + allowed-keys prompt + (not (pos-visible-in-window-p (1- (point-max))))))) (setq current (concat current pressed)) (cond ((equal pressed "\C-g") (user-error "Abort")) diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 479ca460852..25b3354bdd7 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.4.3")) + (let ((org-release "9.4.4")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.4.3")) + (let ((org-git-version "release_9.4.4")) org-git-version)) (provide 'org-version) -- 2.39.2