[Top][All Lists]

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

Re: Suggestion for org-agenda-list: pre-open org-agenda-files

From: Ihor Radchenko
Subject: Re: Suggestion for org-agenda-list: pre-open org-agenda-files
Date: Fri, 08 Dec 2023 22:02:52 +0000

"John Wiegley" <johnw@gnu.org> writes:

> Right away I discovered one of the reasons I had preferred properties at the
> bottom: When I startup my Emacs and run org-agenda-list, and then hit RET on
> an entry, no folding has been applied to the Org file and thus I see the full
> property block at the beginning of entries (and in my case, they can often be
> quite large). I have to scan down to find the actual text.
> Reading through the code, I found that org-agenda-list calls
> org-agenda-get-day-entries on each file in org-agenda-files, which
> intentionally disables code folding before opening the file if it isn’t open
> already:
>   (defun org-agenda-get-day-entries (file date &rest args)
>     (let* ((org-startup-folded nil)
>       …)))

This should actually be redundant because all the agenda commands should
(if not, it is a bug) open the necessary buffers when calling
`org-agenda-prepare'->`org-agenda-prepare-buffers'. By default,
`org-agenda-prepare-buffers' applies initial folding, according to the
default nil value of `org-agenda-inhibit-startup'.

> My workaround for this is to visit every entry in org-agenda-files before
> calling org-agenda-list:
>   (require 'org-agenda)
>   (mapc #’find-file-noselect org-agenda-files)
>   (call-interactively 'org-agenda-list)

... and `org-agenda-list' does call `org-agenda-prepare'...

So, may you dig a bit further and check why `org-agenda-prepare' is not
opening the agenda files?

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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