emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug: org-agenda-buffer-name wrongly persists [9.4.4 (release_9.4.4 @ /us


From: Ingo Lohmar
Subject: Bug: org-agenda-buffer-name wrongly persists [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/)]
Date: Sat, 15 May 2021 11:40:35 +0000

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

The global variable org-agenda-buffer-name, once set, wrongly (IMO)
affects all future agenda buffer names for composite commands.

Minimal complete example (in emacs -q):
================================================================================

Evaluate 

(setq org-agenda-custom-commands
      '(("z" "Std Agenda"
         ((tags "select"
                ((org-agenda-overriding-header "*select*ed")))
          (agenda "" ((org-agenda-span 2)))))))
(("z" "Std Agenda" ((tags "select" ...) (agenda "" ...))))

(org-agenda nil "z")

and get a custom agenda with the default buffer name "*Org Agenda*"
(OK).

Create a buffer "test.org" and switch it to `org-mode', insert a
timestamp (C-c .).  Now follow the timestamp link (C-c C-o), and get an
agenda with buffer name "*Org Agenda(a:2021-05-15)" (OK).

Now re-do

(org-agenda nil "z")

which has the same buffer name including the date (BUG).
================================================================================

I do not pretend to understand how the global variable
org-agenda-buffer-name is supposed to work (not even mentioning the
-sticky- functionality here).  What I understand is the following:

The org-agenda dispatcher let-binds o-a-buffer-name to the global value.
"Simple" agenda commands (like a todo list) called from the dispatcher
set this let-bound o-a-buffer-name, so they use the correct default
value.
"Composite" custom commands called via the dispatcher do not set the
let-bound value, so they use the original let-bound value (the global
value at the start of org-agenda).
`org-follow-timestamp-link' calls the `org-agenda-list' command directly
(not via the dispatcher), hence sets the global (not a local let-bound)
value of o-a-buffer-name.

I have little constructive advice to offer regarding a solution.  It
seems to me that the global variable o-a-buffer-name is only harmful and
I would try to get rid of it, but I guess it is necessary for sticky
agendas (not using them).

Emacs  : GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, 
cairo version 1.16.0)
 of 2021-05-01
Package: Org mode version 9.4.4 (release_9.4.4 @ 
/usr/local/share/emacs/28.0.50/lisp/org/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]