Trevor Murphy <trevor.m.mur...@gmail.com> writes:

> Hey, folks.  Like the subject line says, I'm noticing unexpected
> behavior when I go to a headline that's visible but doesn't show as
> much context as requested by org-fold-show-context-detail.
>
> Seems to be the case that org-goto only tries to unfold if point lands
> on an invisible part of the buffer, but I expected org-goto to behave
> like org-agenda-switch-to, which unfolds regardless of whether or not
> point lands on invisible text.
 > ...
> Does this seem like a bug to you?  If so, I've attached a minimal
> patch that removes the invisibility checks within org-goto.  I ran the
> org tests per https://orgmode.org/worg/org-contribute.html#first-patch
> and everything seemed fine (one test failed, but it's
> test-org-publish/resolve-external-link and that seems to also fail at
> main as of this morning).

Whether it is a bug is a judgment call.
Some parts of Org always call `org-fold-show-context-details' regardless
of current visibility. Some parts do not. (Namely, `org-mark-ring-goto';
`org-goto'; `org-bookmark-jump-unhide'; `org-clock-load'; `org-next-link').

If we take the docstring literally:

    Alist between context and visibility span when revealing a location.

one may argue that "revealing a location" should only apply to invisible
locations. But then some parts of Org are yet inconsistent.

I am inclined to agree with your approach and remove all the
invisibility checks.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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