org-agenda.el (org-agenda-goto-date): Fix behavior when using sticky agendas

* org-agenda.el (org-agenda-goto-date): Fix behavior when
using sticky agendas.

Thanks to Charles Philip Chan and Rainer Stengele who reported
problems about this.
This commit is contained in:
Bastien Guerry 2012-08-30 10:56:35 +02:00
parent 1e678d8cba
commit a2c4d3e0e9
1 changed files with 9 additions and 1 deletions

View File

@ -6984,7 +6984,15 @@ Negative selection means regexp must not match for selection of an entry."
(interactive (list (let ((org-read-date-prefer-future
(eval org-agenda-jump-prefer-future)))
(org-read-date))))
(org-agenda-list nil date))
(let ((org-agenda-sticky-orig org-agenda-sticky)
org-agenda-sticky)
(org-agenda-list nil date)
(setq org-agenda-sticky org-agenda-sticky-orig
org-agenda-this-buffer-is-sticky org-agenda-sticky))
(let ((inhibit-read-only t))
(add-text-properties (point-min) (point-max)
`(org-last-cmd
(org-agenda-list nil ,date)))))
(defun org-agenda-goto-today ()
"Go to today."