> Can you try the attached patch and tell wether it fixes your issue? The patch will fail in the following headline, because of invisible last char:
* [[file:test.el][test]] In general, we can only guarantee that partially visible headline is not skipped only if we check all the positions. Or we can change the docstring defining the visibility criteria. > I'd rather not add a dependency over seq.el anyway. Then, can as well use `mapcar', or even simply manual loop over line positions. Best, Ihor Bastien <b...@gnu.org> writes: > Hi, > > D <d.willi...@posteo.net> writes: > >>> Does it fix a problem for org-superstar-mode or a more general problem >>> in Org? >> >> It mostly fixes an org-superstar-mode problem (see >> https://github.com/integral-dw/org-superstar-mode/issues/19). > > Can you try the attached patch and tell wether it fixes your issue? > >>> If you use seq* functions, the code will be incompatible with previous >>> emacsen, right? >> >> Hmm, looking at the oldest available ELPA release (seq-1.0, 2015), >> seq-every-p should be fully backwards-compatible. The current package >> itself also has a fallback option for Emacs versions <25, so that should >> be fine. > > I'd rather not add a dependency over seq.el anyway. > > Thanks, > > -- > Bastien > diff --git a/lisp/org.el b/lisp/org.el > index a5c7dcf3b..f6e04e65c 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -20529,7 +20529,7 @@ non-nil it will also look at invisible ones." > ((and (= l level) > (or invisible-ok > (not (org-invisible-p > - (line-beginning-position))))) > + (1- (line-end-position)))))) > (cl-decf count) > (when (= l level) (setq result (point))))))) > (goto-char result))