unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pitclaudel@live.com>
Cc: 22761@debbugs.gnu.org
Subject: bug#22761: Surprising interaction between font-lock, invisible text, and point (self-insert-command and insert behave differently)
Date: Mon, 22 Feb 2016 17:53:55 +0200	[thread overview]
Message-ID: <8337skn3l8.fsf@gnu.org> (raw)
In-Reply-To: <56CA5405.10304@live.com> (message from Clément Pit--Claudel on Sun, 21 Feb 2016 19:19:17 -0500)

> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
> Date: Sun, 21 Feb 2016 19:19:17 -0500
> 
> The problem happens when editing ‘a_foo_b’ to replace ‘foo’ by ‘bar’ (to get ‘a_bar_b’). Removing ‘foo’ leaves ‘__’ in the buffer, which font-lock recognizes: the whole string gets displayed as ‘ab’. Even then, the point is still between the two underscores (it hasn't moved after font-lock added the invisible property to the underscores). Pressing ‘b’ to start inserting ‘bar’ works fine (I end up with ‘a_b_c’), except for one thing: the point gets moved after the second underscore. Thus, pressing ‘ar’ to complete ‘bar’ ends up inserting ‘a_b_arb’.

Did you try binding global-disable-point-adjustment to a non-nil
value?





  reply	other threads:[~2016-02-22 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22  0:19 bug#22761: Surprising interaction between font-lock, invisible text, and point (self-insert-command and insert behave differently) Clément Pit--Claudel
2016-02-22 15:53 ` Eli Zaretskii [this message]
2016-02-22 16:03   ` Clément Pit--Claudel
2016-02-22 16:38     ` Eli Zaretskii
2016-02-22 17:36       ` Clément Pit--Claudel
2019-10-30 15:55         ` Lars Ingebrigtsen

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=8337skn3l8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22761@debbugs.gnu.org \
    --cc=clement.pitclaudel@live.com \
    /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).