emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Indirect follow mode in agenda: Display, edition and how to hide drawers
@ 2024-11-05  8:02 Sébastien Gendre
  2024-11-05  9:22 ` Kristoffer Balintona
  2024-11-10 23:34 ` Sébastien Gendre
  0 siblings, 2 replies; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-05  8:02 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

Hello,

I have enabled the indirect follow-mode when the agenda start. Now, for
each agenda item, I can see the selected item details and only it. Which
is great.

But I have multiple questions about it.


When a task have drawers, they are shown open. How a can I hide
them in this indirect follow mode ? I didn't enable the opening of
drawers in my config and if I remember they are hidden by default.


The display of a task, with the indirect follow mode, is done bellow the
agenda, and it's window size is adapted to the length of the task
body. But when a task have a lot of text, it's window size take most
of the place and the agenda window is too small. How can I prevent the
task window to take all the place ?


When I want to edit a task and press "TAB", the point is moved to
a window that show all the task. Not into the window opened by the
indirect follow mode. Is it possible to modify this ?



Best regards

-------
Gendre Sébastien



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-05  8:02 Indirect follow mode in agenda: Display, edition and how to hide drawers Sébastien Gendre
@ 2024-11-05  9:22 ` Kristoffer Balintona
  2024-11-05 21:15   ` Karthik Chikmagalur
  2024-11-08 14:59   ` Sébastien Gendre
  2024-11-10 23:34 ` Sébastien Gendre
  1 sibling, 2 replies; 10+ messages in thread
From: Kristoffer Balintona @ 2024-11-05  9:22 UTC (permalink / raw)
  To: Sébastien Gendre, Org Mode List

On Tue, Nov 05 2024, Sébastien Gendre wrote:

> Hello,
>
> I have enabled the indirect follow-mode when the agenda start. Now, for
> each agenda item, I can see the selected item details and only it. Which
> is great.
>
> But I have multiple questions about it.
>
>
> When a task have drawers, they are shown open. How a can I hide
> them in this indirect follow mode ? I didn't enable the opening of
> drawers in my config and if I remember they are hidden by default.
>

If I understand you correctly, you want the drawers shown by
org-agenda-follow-mode to be hidden rather than shown as you move across
agenda items, yet? If so, I'm not sure if there is an option to by
default have drawers hidden (I suppose you can alter the minor mode
yourself...), but calling SPC with C-u shows items but hides their
drawers.

>
> The display of a task, with the indirect follow mode, is done bellow the
> agenda, and it's window size is adapted to the length of the task
> body. But when a task have a lot of text, it's window size take most
> of the place and the agenda window is too small. How can I prevent the
> task window to take all the place ?
>
>
> When I want to edit a task and press "TAB", the point is moved to
> a window that show all the task. Not into the window opened by the
> indirect follow mode. Is it possible to modify this ?
>

This is not the default behavior, I don't think. Have you made
customizations to display-buffer-alist?

>
>
> Best regards
>
> -------
> Gendre Sébastien
>
>

-- 
Best,
Kristoffer


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-05  9:22 ` Kristoffer Balintona
@ 2024-11-05 21:15   ` Karthik Chikmagalur
  2024-11-08 15:05     ` Sébastien Gendre
  2024-11-08 14:59   ` Sébastien Gendre
  1 sibling, 1 reply; 10+ messages in thread
From: Karthik Chikmagalur @ 2024-11-05 21:15 UTC (permalink / raw)
  To: Kristoffer Balintona, Sébastien Gendre, Org Mode List

>> When a task have drawers, they are shown open. How a can I hide
>> them in this indirect follow mode ? I didn't enable the opening of
>> drawers in my config and if I remember they are hidden by default.
>>
>
> If I understand you correctly, you want the drawers shown by
> org-agenda-follow-mode to be hidden rather than shown as you move across
> agenda items, yet? If so, I'm not sure if there is an option to by
> default have drawers hidden (I suppose you can alter the minor mode
> yourself...), but calling SPC with C-u shows items but hides their
> drawers.

I use this piece of advice to get the desired folding behavior in
`org-agenda-follow-mode':

(advice-add 'org-agenda-do-tree-to-indirect-buffer :after
   (defun my/org-agenda-collapse-indirect-buffer-tree (arg)
     (with-current-buffer org-last-indirect-buffer
       (org-ctrl-c-tab) (org-fold-show-entry 'hide-drawers))))

>> The display of a task, with the indirect follow mode, is done bellow the
>> agenda, and it's window size is adapted to the length of the task
>> body. But when a task have a lot of text, it's window size take most
>> of the place and the agenda window is too small. How can I prevent the
>> task window to take all the place ?
>>
>
> This is not the default behavior, I don't think. Have you made
> customizations to display-buffer-alist?

This used to be the default behavior, and it couldn't be customized as
it didn't obey display-buffer-alist.  The window would always open below
the current one.  In May this year it was changed (in commit
db5478108c063d012432eba50e4ebb71a278c060) to follow
display-buffer-alist.  Chances are Sébastien is using a version of Org
mode that does not have this commit.

Karthik


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-05  9:22 ` Kristoffer Balintona
  2024-11-05 21:15   ` Karthik Chikmagalur
@ 2024-11-08 14:59   ` Sébastien Gendre
  1 sibling, 0 replies; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-08 14:59 UTC (permalink / raw)
  To: Kristoffer Balintona; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]

Hello,

Thank you for your reply.
Mines are bellow.


Kristoffer Balintona <krisbalintona@gmail.com> writes:

> On Tue, Nov 05 2024, Sébastien Gendre wrote:
>
>> Hello,
>>
>> I have enabled the indirect follow-mode when the agenda start. Now, for
>> each agenda item, I can see the selected item details and only it. Which
>> is great.
>>
>> But I have multiple questions about it.
>>
>>
>> When a task have drawers, they are shown open. How a can I hide
>> them in this indirect follow mode ? I didn't enable the opening of
>> drawers in my config and if I remember they are hidden by default.
>>
>
> If I understand you correctly, you want the drawers shown by
> org-agenda-follow-mode to be hidden rather than shown as you move across
> agenda items, yet? If so, I'm not sure if there is an option to by
> default have drawers hidden (I suppose you can alter the minor mode
> yourself...), but calling SPC with C-u shows items but hides their
> drawers.

Yes, I want the drawer to be collapsed.

I checked my config and the Org buffers options, but no config set the
drawers to be shown expanded.



>> The display of a task, with the indirect follow mode, is done bellow the
>> agenda, and it's window size is adapted to the length of the task
>> body. But when a task have a lot of text, it's window size take most
>> of the place and the agenda window is too small. How can I prevent the
>> task window to take all the place ?
>>
>>
>> When I want to edit a task and press "TAB", the point is moved to
>> a window that show all the task. Not into the window opened by the
>> indirect follow mode. Is it possible to modify this ?
>>
>
> This is not the default behavior, I don't think. Have you made
> customizations to display-buffer-alist?


No, I did not customized `display-buffer-alist`.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-05 21:15   ` Karthik Chikmagalur
@ 2024-11-08 15:05     ` Sébastien Gendre
  0 siblings, 0 replies; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-08 15:05 UTC (permalink / raw)
  To: Karthik Chikmagalur; +Cc: Kristoffer Balintona, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]

Hello,

Thank you for your reply.
Mines are bellow.


Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:

>> If I understand you correctly, you want the drawers shown by
>> org-agenda-follow-mode to be hidden rather than shown as you move across
>> agenda items, yet? If so, I'm not sure if there is an option to by
>> default have drawers hidden (I suppose you can alter the minor mode
>> yourself...), but calling SPC with C-u shows items but hides their
>> drawers.
>
> I use this piece of advice to get the desired folding behavior in
> `org-agenda-follow-mode':
>
> (advice-add 'org-agenda-do-tree-to-indirect-buffer :after
>    (defun my/org-agenda-collapse-indirect-buffer-tree (arg)
>      (with-current-buffer org-last-indirect-buffer
>        (org-ctrl-c-tab) (org-fold-show-entry 'hide-drawers))))

It's an interesting way to do it.

When I create a new Org file, create a heading and add a logbook entry,
the logbook drawer is collapsed.

But when org-agenda display a habit task, with indirect follow mode, it
expend the logbook drawer as well as the properties drawer.

I still search why this different behavior.


>> This is not the default behavior, I don't think. Have you made
>> customizations to display-buffer-alist?
>
> This used to be the default behavior, and it couldn't be customized as
> it didn't obey display-buffer-alist.  The window would always open below
> the current one.  In May this year it was changed (in commit
> db5478108c063d012432eba50e4ebb71a278c060) to follow
> display-buffer-alist.  Chances are Sébastien is using a version of Org
> mode that does not have this commit.

Is this new behavior on Org 9.7 ? I use 9.6.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-05  8:02 Indirect follow mode in agenda: Display, edition and how to hide drawers Sébastien Gendre
  2024-11-05  9:22 ` Kristoffer Balintona
@ 2024-11-10 23:34 ` Sébastien Gendre
  2024-11-11  0:09   ` Sébastien Gendre
  1 sibling, 1 reply; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-10 23:34 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 2896 bytes --]

Hello,

I have solve my 2 problems.


For the first one: All drawers are unfolded when agenda indirect follow
mode show me the selected task.

The solution is simple: By default, when you display the content of an
Org file, everything is unfolded, including the drawers.

Based on the manual [1], this can be managed with the variable
`org-startup-folded` or the buffer setting `#+STARTUP:`. By default, the
variable `org-startup-folded` is set to `showeverything`. Which tell
Org-mode to unfold every headings, drawers, etc.

I misunderstood the default behavior of Org-mode because, when I tested
the add of a property to a new heading, the newly created "properties"
drawer was folded. Same with the "logbook" drawer. But if I save the
buffer to a file, close it and re-open the file, the drawers are
unfolded.

For my usage, I decided to keep the default behavior (unfold
everything). Except for the file that keep my habits. The logbook drawer
of my habits are too long to be unfolded when displayed by Org-agenda
indirect follow.


For the second problem: When a task have to many lines, the window
opened by indirect follow mode is too tall, forcing the agenda
window to be too small to be usable.

Thanks to Karthik Chikmagalur, who tell me that the window behavior of
Org-mode have changed with a commit from may this year, I updated to
Org-mode 9.7. And my problem is solved with this new version.


That it. I hope my summary is not too long and could help someone else
with same problem.


Have a nice day.


[1] https://orgmode.org/manual/Initial-visibility.html



Sébastien Gendre <seb@k-7.ch> writes:

> [[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre <seb@k-7.ch> (trust ultimate) created at 2024-11-05T09:02:13+0100 using RSA]]
> Hello,
>
> I have enabled the indirect follow-mode when the agenda start. Now, for
> each agenda item, I can see the selected item details and only it. Which
> is great.
>
> But I have multiple questions about it.
>
>
> When a task have drawers, they are shown open. How a can I hide
> them in this indirect follow mode ? I didn't enable the opening of
> drawers in my config and if I remember they are hidden by default.
>
>
> The display of a task, with the indirect follow mode, is done bellow the
> agenda, and it's window size is adapted to the length of the task
> body. But when a task have a lot of text, it's window size take most
> of the place and the agenda window is too small. How can I prevent the
> task window to take all the place ?
>
>
> When I want to edit a task and press "TAB", the point is moved to
> a window that show all the task. Not into the window opened by the
> indirect follow mode. Is it possible to modify this ?
>
>
>
> Best regards
>
> -------
> Gendre Sébastien
>
>
> [[End of PGP Signed Part]]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-10 23:34 ` Sébastien Gendre
@ 2024-11-11  0:09   ` Sébastien Gendre
  2024-11-11 17:59     ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-11  0:09 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 3662 bytes --]

Rectification: Adding a "#+STARTUP: overview" on top of my habits
org-mode file did not change anything with org-agenda follow indirect
buffer.

Yes, if I manually open my habits org-mode file everything is folded.
And if I unfold a task, its drawers are still folded. Which is correct.

But when the same task is shown on an indirect buffer by org-agenda
follow mode, every drawers are unfolded.




Sébastien Gendre <seb@k-7.ch> writes:

> [[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien Gendre <seb@k-7.ch> (trust ultimate) created at 2024-11-11T00:34:15+0100 using RSA]]
> Hello,
>
> I have solve my 2 problems.
>
>
> For the first one: All drawers are unfolded when agenda indirect follow
> mode show me the selected task.
>
> The solution is simple: By default, when you display the content of an
> Org file, everything is unfolded, including the drawers.
>
> Based on the manual [1], this can be managed with the variable
> `org-startup-folded` or the buffer setting `#+STARTUP:`. By default, the
> variable `org-startup-folded` is set to `showeverything`. Which tell
> Org-mode to unfold every headings, drawers, etc.
>
> I misunderstood the default behavior of Org-mode because, when I tested
> the add of a property to a new heading, the newly created "properties"
> drawer was folded. Same with the "logbook" drawer. But if I save the
> buffer to a file, close it and re-open the file, the drawers are
> unfolded.
>
> For my usage, I decided to keep the default behavior (unfold
> everything). Except for the file that keep my habits. The logbook drawer
> of my habits are too long to be unfolded when displayed by Org-agenda
> indirect follow.
>
>
> For the second problem: When a task have to many lines, the window
> opened by indirect follow mode is too tall, forcing the agenda
> window to be too small to be usable.
>
> Thanks to Karthik Chikmagalur, who tell me that the window behavior of
> Org-mode have changed with a commit from may this year, I updated to
> Org-mode 9.7. And my problem is solved with this new version.
>
>
> That it. I hope my summary is not too long and could help someone else
> with same problem.
>
>
> Have a nice day.
>
>
> [1] https://orgmode.org/manual/Initial-visibility.html
>
>
>
> Sébastien Gendre <seb@k-7.ch> writes:
>
>> [[PGP Signed Part:Good signature from B586F7C77239E29E Sébastien
>> Gendre <seb@k-7.ch> (trust ultimate) created at
>> 2024-11-05T09:02:13+0100 using RSA]]
>> Hello,
>>
>> I have enabled the indirect follow-mode when the agenda start. Now, for
>> each agenda item, I can see the selected item details and only it. Which
>> is great.
>>
>> But I have multiple questions about it.
>>
>>
>> When a task have drawers, they are shown open. How a can I hide
>> them in this indirect follow mode ? I didn't enable the opening of
>> drawers in my config and if I remember they are hidden by default.
>>
>>
>> The display of a task, with the indirect follow mode, is done bellow the
>> agenda, and it's window size is adapted to the length of the task
>> body. But when a task have a lot of text, it's window size take most
>> of the place and the agenda window is too small. How can I prevent the
>> task window to take all the place ?
>>
>>
>> When I want to edit a task and press "TAB", the point is moved to
>> a window that show all the task. Not into the window opened by the
>> indirect follow mode. Is it possible to modify this ?
>>
>>
>>
>> Best regards
>>
>> -------
>> Gendre Sébastien
>>
>>
>> [[End of PGP Signed Part]]
>
> [[End of PGP Signed Part]]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-11  0:09   ` Sébastien Gendre
@ 2024-11-11 17:59     ` Ihor Radchenko
  2024-11-12  0:30       ` Sébastien Gendre
  0 siblings, 1 reply; 10+ messages in thread
From: Ihor Radchenko @ 2024-11-11 17:59 UTC (permalink / raw)
  To: Sébastien Gendre; +Cc: Org Mode List

Sébastien Gendre <seb@k-7.ch> writes:

> Rectification: Adding a "#+STARTUP: overview" on top of my habits
> org-mode file did not change anything with org-agenda follow indirect
> buffer.
>
> Yes, if I manually open my habits org-mode file everything is folded.
> And if I unfold a task, its drawers are still folded. Which is correct.
>
> But when the same task is shown on an indirect buffer by org-agenda
> follow mode, every drawers are unfolded.

Maybe you changed the default value of `org-agenda-inhibit-startup'.

-- 
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] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-11 17:59     ` Ihor Radchenko
@ 2024-11-12  0:30       ` Sébastien Gendre
  2024-11-12 19:17         ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Gendre @ 2024-11-12  0:30 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

It's value is set to `nil`.

Ihor Radchenko <yantar92@posteo.net> writes:

> Sébastien Gendre <seb@k-7.ch> writes:
>
>> Rectification: Adding a "#+STARTUP: overview" on top of my habits
>> org-mode file did not change anything with org-agenda follow indirect
>> buffer.
>>
>> Yes, if I manually open my habits org-mode file everything is folded.
>> And if I unfold a task, its drawers are still folded. Which is correct.
>>
>> But when the same task is shown on an indirect buffer by org-agenda
>> follow mode, every drawers are unfolded.
>
> Maybe you changed the default value of `org-agenda-inhibit-startup'.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Indirect follow mode in agenda: Display, edition and how to hide drawers
  2024-11-12  0:30       ` Sébastien Gendre
@ 2024-11-12 19:17         ` Ihor Radchenko
  0 siblings, 0 replies; 10+ messages in thread
From: Ihor Radchenko @ 2024-11-12 19:17 UTC (permalink / raw)
  To: Sébastien Gendre; +Cc: Org Mode List

Sébastien Gendre <seb@k-7.ch> writes:

> It's value is set to `nil`.

Well. I do not have the described problem on my side.
Then, maybe try emacs -Q and see if the problem ends up somewhere in
your config?

-- 
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] 10+ messages in thread

end of thread, other threads:[~2024-11-12 19:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05  8:02 Indirect follow mode in agenda: Display, edition and how to hide drawers Sébastien Gendre
2024-11-05  9:22 ` Kristoffer Balintona
2024-11-05 21:15   ` Karthik Chikmagalur
2024-11-08 15:05     ` Sébastien Gendre
2024-11-08 14:59   ` Sébastien Gendre
2024-11-10 23:34 ` Sébastien Gendre
2024-11-11  0:09   ` Sébastien Gendre
2024-11-11 17:59     ` Ihor Radchenko
2024-11-12  0:30       ` Sébastien Gendre
2024-11-12 19:17         ` 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).