unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: 64724@debbugs.gnu.org
Subject: bug#64724: 30.0.50; Inconsistency between manual, comments in the code, and implementation of point adjustment
Date: Wed, 19 Jul 2023 07:02:21 +0000	[thread overview]
Message-ID: <87bkg81j0i.fsf@localhost> (raw)

Hi,

This is a followup of https://orgmode.org/list/87ilag1pth.fsf@localhost

We recently ran into some subtleties of point adjustment near invisible
regions with sticky 'invisible property.

The actual code in `set_point_both' makes sure to move point across
invisible sticky region if point happens to end up right before front
sticky invisible or right after rear sticky invisible region.

However, 22.6 Adjusting Point After Commands does not mention this
scenario.

Further, `set_point_both' contains the following comments:

	  /* If the preceding character is both intangible and invisible,
	     and the invisible property is `rear-sticky', perturb it so
	     that the search starts one character earlier -- this ensures
	     that point can never move to the end of an invisible/
	     intangible/rear-sticky region.  */
	  charpos = adjust_for_invis_intang (charpos, -1, -1, 1);
          <...>
      	  /* If the following character is both intangible and invisible,
	     and the invisible property is `front-sticky', perturb it so
	     that the search starts one character later -- this ensures
	     that point can never move to the beginning of an
	     invisible/intangible/front-sticky region.  */
	  charpos = adjust_for_invis_intang (charpos, 0, 1, 1);

However, 'intanglible text property is, in fact, not necessary to
trigger the adjustment.

May you (1) document this behaviour in the manual; (2) clarify what's up
with intanglible.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-07-18 built on localhost
Repository revision: aba3d13ea8d712bca1b3f23ac7db7e38c2165b3c
Repository branch: feature/named-lambdas
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Gentoo Linux

-- 
Ihor Radchenko // yantar92,
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	other threads:[~2023-07-19  7:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19  7:02 Ihor Radchenko [this message]
2023-07-19 16:43 ` bug#64724: 30.0.50; Inconsistency between manual, comments in the code, and implementation of point adjustment Eli Zaretskii
2023-07-19 17:31   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-20  9:57     ` Ihor Radchenko
2023-07-21  2:47       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-20  9:51   ` Ihor Radchenko
2023-07-20 10:27     ` Eli Zaretskii
2023-07-21  7:50       ` Ihor Radchenko
2023-07-21 10:51         ` Eli Zaretskii
2023-07-21 12:14           ` Ihor Radchenko
2023-07-21 12:44             ` Eli Zaretskii
2023-07-21 12:56               ` Ihor Radchenko
2023-07-21 13:07                 ` Eli Zaretskii
2023-07-21 13:18                   ` Ihor Radchenko
2023-07-21 14:58         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-21 15:15           ` Eli Zaretskii
2023-07-22 13:57             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-23  6:54               ` Ihor Radchenko
2023-07-22  6:13           ` Ihor Radchenko
2023-07-21  2:39     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-21  9:11       ` Ihor Radchenko

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87bkg81j0i.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=64724@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).