emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH 2-v1] New: auto display inline images under subtree when `org


From: Ihor Radchenko
Subject: Re: [PATCH 2-v1] New: auto display inline images under subtree when `org-cycle'.
Date: Fri, 30 Sep 2022 11:19:20 +0800

"Christopher M. Miles" <numbchild@gmail.com> writes:

> Ihor Radchenko <yantar92@gmail.com> writes:
>
> I got a new problem in patch, the (point-max) in function
> ~org-cycle-display-inline-images~ SOMETIMES return EOF error instead of
> correct max point value when org-cycle `state' is ~'folded~. I can't
> find out what caused this even using Edebug. Do you have any clue?

Maybe because the 'folded branch in that function is not wrapped into
`save-restriction'?

>> You are providing both hook and a customization. It is redundant. Users
>> can already remove the hook when desired.
>
> I mock this style from a very similar existing hook function
> ~org-cycle-hide-archived-subtrees~ and custom variable
> ~org-cycle-open-archived-trees~. I think removing a hook function from
> ~org-cycle-hook~ is a way, but not as convenient as defcustom option.
> (P.S: I think users prefer this defcustom customization style.)

I see your point.
I agree that having a variable is better and also leaves an option to
introduce in-buffer setting for this.

Let's leave the hook part for now - if we want to alter it, we may need
to re-consider all the default hooks.

-- 
Ihor Radchenko,
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]