diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-28 16:51:21 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-28 16:51:21 +0200 |
commit | 807137acdd2ac001cf70657eba97983d0f51eb63 (patch) | |
tree | 2ce4d0c515d4cdf2feb106694b9da512ebd9de23 | |
parent | b56acb69ff9b3eb75b5e443b099604939adfe136 (diff) | |
download | org-mode-807137acdd2ac001cf70657eba97983d0f51eb63.tar.gz |
org.el (org-follow-timestamp-link): Fix bug when using sticky agenda
* org.el (org-follow-timestamp-link): Fix bug when using
sticky agenda. Add a docstring.
Thanks to Christoph Lange for reporting this.
-rw-r--r-- | lisp/org.el | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/org.el b/lisp/org.el index be8c84c..89897a8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10377,18 +10377,24 @@ onto the ring." ;;; Following specific links (defun org-follow-timestamp-link () + "Open an agenda view for the time-stamp date/range at point." (cond ((org-at-date-range-p t) (let ((org-agenda-start-on-weekday) (t1 (match-string 1)) - (t2 (match-string 2))) - (setq t1 (time-to-days (org-time-string-to-time t1)) - t2 (time-to-days (org-time-string-to-time t2))) - (org-agenda-list nil t1 (1+ (- t2 t1))))) + (t2 (match-string 2)) tt1 tt2) + (setq tt1 (time-to-days (org-time-string-to-time t1)) + tt2 (time-to-days (org-time-string-to-time t2))) + (let ((org-agenda-buffer-tmp-name + (format "*Org Agenda(a:%s)" + (concat (substring t1 0 10) "--" (substring t2 0 10))))) + (org-agenda-list nil tt1 (1+ (- tt2 tt1)))))) ((org-at-timestamp-p t) - (org-agenda-list nil (time-to-days (org-time-string-to-time - (substring (match-string 1) 0 10))) - 1)) + (let ((org-agenda-buffer-tmp-name + (format "*Org Agenda(a:%s)" (substring (match-string 1) 0 10)))) + (org-agenda-list nil (time-to-days (org-time-string-to-time + (substring (match-string 1) 0 10))) + 1))) (t (error "This should not happen")))) |