mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-26 12:02:53 +00:00
Date prompt: Use own history
The date prompt now has its own history.
This commit is contained in:
parent
107803c6c3
commit
e5c0da5c48
|
@ -1,5 +1,8 @@
|
|||
2009-03-15 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-read-date-history): New variable.
|
||||
(org-read-date): Use new history variable.
|
||||
|
||||
* org-exp.el (org-export-as-ascii): Improve export of plain lists.
|
||||
|
||||
2009-03-14 Bastien Guerry <bzg@altern.org>
|
||||
|
|
|
@ -11547,6 +11547,7 @@ So these are more for recording a certain time/date."
|
|||
(defvar org-overriding-default-time nil) ; dynamically scoped
|
||||
(defvar org-read-date-overlay nil)
|
||||
(defvar org-dcst nil) ; dynamically scoped
|
||||
(defvar org-read-date-history nil)
|
||||
|
||||
(defun org-read-date (&optional with-time to-time from-string prompt
|
||||
default-time default-input)
|
||||
|
@ -11673,7 +11674,8 @@ user."
|
|||
(progn
|
||||
(use-local-map map)
|
||||
(add-hook 'post-command-hook 'org-read-date-display)
|
||||
(setq org-ans0 (read-string prompt default-input nil nil))
|
||||
(setq org-ans0 (read-string prompt default-input
|
||||
'org-read-date-history nil))
|
||||
;; org-ans0: from prompt
|
||||
;; org-ans1: from mouse click
|
||||
;; org-ans2: from calendar motion
|
||||
|
@ -11686,7 +11688,8 @@ user."
|
|||
|
||||
(t ; Naked prompt only
|
||||
(unwind-protect
|
||||
(setq ans (read-string prompt default-input nil timestr))
|
||||
(setq ans (read-string prompt default-input
|
||||
'org-read-date-history timestr))
|
||||
(when org-read-date-overlay
|
||||
(org-delete-overlay org-read-date-overlay)
|
||||
(setq org-read-date-overlay nil)))))
|
||||
|
|
Loading…
Reference in a new issue