* Suggestion for org-agenda-list: pre-open org-agenda-files
@ 2023-12-04 17:54 John Wiegley
2023-12-08 22:02 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2023-12-04 17:54 UTC (permalink / raw)
To: emacs-orgmode
Recently I switched all of my Org files from “properties at the bottom” to
“properties at the top”, in order to avoid maintaining my own fork with this
capability. Although that fork had been working well, Ihor had a good argument
that I’m potentially opting myself out of 3rd party tools by veering from what
has become the standard format.
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)
…)))
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)
I’m wondering whether we might want to provide a customization option to do
this automatically at the top of org-agenda-list, for any org-agenda-files
that aren’t already in buffers, since proper folding can make a big difference
when visiting Org entries from the Agenda.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Suggestion for org-agenda-list: pre-open org-agenda-files
2023-12-04 17:54 Suggestion for org-agenda-list: pre-open org-agenda-files John Wiegley
@ 2023-12-08 22:02 ` Ihor Radchenko
2024-01-16 15:48 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-12-08 22:02 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
"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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Suggestion for org-agenda-list: pre-open org-agenda-files
2023-12-08 22:02 ` Ihor Radchenko
@ 2024-01-16 15:48 ` Ihor Radchenko
2024-03-16 7:46 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-01-16 15:48 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> So, may you dig a bit further and check why `org-agenda-prepare' is not
> opening the agenda files?
A gentle ping :)
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Suggestion for org-agenda-list: pre-open org-agenda-files
2024-01-16 15:48 ` Ihor Radchenko
@ 2024-03-16 7:46 ` Ihor Radchenko
2024-03-16 12:32 ` John Wiegley
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-03-16 7:46 UTC (permalink / raw)
To: John Wiegley; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> So, may you dig a bit further and check why `org-agenda-prepare' is not
>> opening the agenda files?
>
> A gentle ping :)
Canceled.
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Suggestion for org-agenda-list: pre-open org-agenda-files
2024-03-16 7:46 ` Ihor Radchenko
@ 2024-03-16 12:32 ` John Wiegley
0 siblings, 0 replies; 5+ messages in thread
From: John Wiegley @ 2024-03-16 12:32 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Understood, I just haven’t had the time to dig into this. I’ll let you know once I find out.
John
On Sat, Mar 16, 2024, at 12:46 AM, Ihor Radchenko wrote:
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Ihor Radchenko <yantar92@posteo.net> writes:
>>
>>> So, may you dig a bit further and check why `org-agenda-prepare' is not
>>> opening the agenda files?
>>
>> A gentle ping :)
>
> Canceled.
>
> --
> 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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-16 12:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04 17:54 Suggestion for org-agenda-list: pre-open org-agenda-files John Wiegley
2023-12-08 22:02 ` Ihor Radchenko
2024-01-16 15:48 ` Ihor Radchenko
2024-03-16 7:46 ` Ihor Radchenko
2024-03-16 12:32 ` John Wiegley
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.