* [BUG] (org-agenda-files) after restrict agenda to a file [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]
@ 2022-04-20 7:33 Ignacio Casso
2022-04-20 10:04 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Ignacio Casso @ 2022-04-20 7:33 UTC (permalink / raw)
To: emacs-orgmode
Hello,
After restricting the agenda to a file for a single agenda command, with
'C-c a < a', and exiting the agenda with 'x', (org-agenda-files) still
returns that file instead of the original list of agenda files. This can
be easily solved using the UNRESTRICTED optional argument in
`org-agenda-files', but I wonder if this behavior is correct.
The docstring of `org-agenda-files' says
"Optional UNRESTRICTED means return the full list even if a
restriction is currently in place."
But as I understand it, the restriction is no longer in place, since it
was only for the duration of the agenda command, as the Org Mode Manual
says:
"If you would like to focus the agenda temporarily on a file not in
this list, or on just one file in the list, or even on only a subtree
in a file, then this can be done in different ways. For a single
agenda command, you may press ‘<’ once or several times in the
dispatcher. To restrict the agenda scope for an extended period ..."
*note
This is probably a minor issue, but since it was the cause of a bug in
my config that took me a while to debug, I'm reporting it in case you
think that something should be done about it. In case you are curious
about my use case, I was just doing something like
(eval-after-load 'a-package
'(setq org-agenda-files (append (org-agenda-files) (...)))
Regards,
Ignacio
Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
of 2022-01-16
Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] (org-agenda-files) after restrict agenda to a file [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]
2022-04-20 7:33 [BUG] (org-agenda-files) after restrict agenda to a file [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)] Ignacio Casso
@ 2022-04-20 10:04 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-04-20 10:04 UTC (permalink / raw)
To: Ignacio Casso; +Cc: emacs-orgmode
Ignacio Casso <ignaciocasso@hotmail.com> writes:
> After restricting the agenda to a file for a single agenda command, with
> 'C-c a < a', and exiting the agenda with 'x', (org-agenda-files) still
> returns that file instead of the original list of agenda files. This can
> be easily solved using the UNRESTRICTED optional argument in
> `org-agenda-files', but I wonder if this behavior is correct.
Thanks for reporting!
Confirmed.
> This is probably a minor issue, but since it was the cause of a bug in
> my config that took me a while to debug, I'm reporting it in case you
> think that something should be done about it. In case you are curious
> about my use case, I was just doing something like
Honestly, something should be done about org-agenda.el in its totality.
It is notoriously difficult to debug :(
Best,
Ihor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-20 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-20 7:33 [BUG] (org-agenda-files) after restrict agenda to a file [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)] Ignacio Casso
2022-04-20 10:04 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).