emacs-orgmode
[Top][All Lists]
Advanced

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

[BUG] (org-agenda-files) after restrict agenda to a file [9.5.2 (9.5.2-g


From: Ignacio Casso
Subject: [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/)]
Date: Wed, 20 Apr 2022 09:33:21 +0200
User-agent: mu4e 1.6.10; emacs 27.2

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



reply via email to

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