emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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


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

  "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 ..."

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) (...)))



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

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 inbox:


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).