|
|
@@ -2362,6 +2362,7 @@ Pressing `<' twice means to restrict to the current subtree or region
|
|
|
(interactive "P")
|
|
|
(catch 'exit
|
|
|
(let* ((prefix-descriptions nil)
|
|
|
+ (org-agenda-buffer-name org-agenda-buffer-name)
|
|
|
(org-agenda-window-setup (if (equal (buffer-name)
|
|
|
org-agenda-buffer-name)
|
|
|
'current-window
|
|
|
@@ -2400,6 +2401,11 @@ Pressing `<' twice means to restrict to the current subtree or region
|
|
|
(setq ans (org-agenda-get-restriction-and-command prefix-descriptions)
|
|
|
keys (car ans)
|
|
|
restriction (cdr ans)))
|
|
|
+ ;; If we have sticky agenda buffers, set a name for the buffer,
|
|
|
+ ;; depending on the invoking keys. The user may still set this
|
|
|
+ ;; as a command option, which will overwrite what we do here.
|
|
|
+ (if org-agenda-sticky
|
|
|
+ (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" keys)))
|
|
|
;; Establish the restriction, if any
|
|
|
(when (and (not org-agenda-overriding-restriction) restriction)
|
|
|
(put 'org-agenda-files 'org-restrict (list bfn))
|