emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-forward-heading-same-level and the invisible-ok argument


From: Ihor Radchenko
Subject: Re: org-forward-heading-same-level and the invisible-ok argument
Date: Wed, 26 Aug 2020 09:30:49 +0800

> So I thought it is best to ask *why* the
>navigation commands take invisibility into account the way they do,
>and whether you guys have a suggestion that may be more elegant than
>the approach I came up?

I guess it is simply because nobody though that the leading stars can be
hidden via fontification.

I think the whole issue can be fixed by changing the call to
org-invisible-p inside org-forward-heading-same-level. org-invisible-p
has an optional third argument to ignore text hidden via fontification.
You can try to make a patch for org-forward-heading-same-level and
similar commands adding that third argument.

Best,
Ihor


D <d.williams@posteo.net> writes:

> Hi,
>
> I am currently thinking about how to have
> org-forward-heading-same-level and its sister command work together
> with a setting of my minor mode org-superstar-mode.  The issue that
> arises is that when my mode renders the leading stars of a headline
> invisible, org-forward-heading-same-level considers the partially
> invisible headlines fully invisible, and hence only works correctly
> for single-asterisk headlines.
>
> The solution I considered is making two interactive commands that
> simply call org-forward-heading-same-level with invisible-ok set to t
> and overshadow the bindings (C-c C-f and <menu-bar> <Org>
> <Navigate Headings> <Next Same Level>).  The downside to this is of
> course is the intrusive nature of it, and I am concerned about side
> effects I may be overlooking.  So I thought it is best to ask *why* the
> navigation commands take invisibility into account the way they do,
> and whether you guys have a suggestion that may be more elegant than
> the approach I came up?
>
> Cheers,
> D.



reply via email to

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