all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Bastien <bzg@gnu.org>, D <d.williams@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Re: Re: Re: org-forward-heading-same-level and the invisible-ok argument
Date: Mon, 07 Sep 2020 14:25:36 +0800	[thread overview]
Message-ID: <87bliiyufz.fsf@localhost> (raw)
In-Reply-To: <87h7saqiod.fsf@gnu.org>

> 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 <bzg@gnu.org> writes:

> Hi,
>
> D <d.williams@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))


  reply	other threads:[~2020-09-07  6:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 16:46 org-forward-heading-same-level and the invisible-ok argument D
2020-08-26  1:30 ` Ihor Radchenko
2020-08-26 21:33   ` [PATCH] " D
2020-08-27 11:49     ` Ihor Radchenko
2020-08-28 12:27       ` [PATCH] " D
2020-08-28 13:43         ` Ihor Radchenko
2020-08-28 17:49           ` D
2020-08-29  5:10             ` Ihor Radchenko
2020-08-30 22:07               ` [PATCH] " D
2020-09-06  6:35                 ` Bastien
2020-09-06 11:09                   ` D
2020-09-07  5:06                     ` Bastien
2020-09-07  6:25                       ` Ihor Radchenko [this message]
2020-09-07 18:31                         ` D
2020-09-08  9:28                           ` Bastien
2020-09-08 20:00                             ` D
2020-09-09  8:09                               ` Bastien
2020-09-09  4:15                             ` Ihor Radchenko
2020-09-09  8:08                               ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bliiyufz.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=bzg@gnu.org \
    --cc=d.williams@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.