diff options
author | Bastien Guerry <bzg@altern.org> | 2013-04-24 11:36:22 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-04-24 11:36:22 +0200 |
commit | 253b65c0912448baeadb90d7fb2aee9a3d03ba9f (patch) | |
tree | 0bdea9a5ccd9634109ccb9137bc9a98135e00b75 | |
parent | 3dd3100794e90f7a44eb17118d1c084299868621 (diff) | |
download | org-mode-253b65c0912448baeadb90d7fb2aee9a3d03ba9f.tar.gz |
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'.
-rw-r--r-- | lisp/org.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 0d88654..5e5a07b 100644 --- a/lisp/org.el +++ b/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)))) |