Browse Source

org.el (org-read-date-minibuffer-local-map): Check if we are at the beginning of the prompt, not if we are after a whitespace

* org.el (org-read-date-minibuffer-local-map): Check if we are
at the beginning of the prompt, not if we are after a whitespace.
Bind C-. to `calendar-goto-today'.
Bastien Guerry 4 years ago
parent
commit
253b65c091
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lisp/org.el

+ 5 - 1
lisp/org.el

@@ -16074,9 +16074,13 @@ So these are more for recording a certain time/date."
     (set-keymap-parent map minibuffer-local-map)
     (org-defkey map (kbd ".")
                 (lambda () (interactive)
-		  (if (= (char-before) 32)
+		  ;; Are we at the beginning of the prompt?
+		  (if (looking-back "^[^:]+: ")
 		      (org-eval-in-calendar '(calendar-goto-today))
 		    (insert "."))))
+    (org-defkey map (kbd "C-.")
+                (lambda () (interactive)
+		  (org-eval-in-calendar '(calendar-goto-today))))
     (org-defkey map [(meta shift left)]
                 (lambda () (interactive)
                   (org-eval-in-calendar '(calendar-backward-month 1))))