From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: victorhge@gmail.com, 42424@debbugs.gnu.org
Subject: bug#42424: 27.0.90; replace-match: point is NOT left at the end of replacement
Date: Sun, 18 Oct 2020 10:24:19 +0200 [thread overview]
Message-ID: <87tuusj618.fsf@gnus.org> (raw)
In-Reply-To: <83tuussr1v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Oct 2020 20:25:32 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> Uhm... is that comment wrong? Aren't we moving point to the end of the
>> inserted replacement?
>
> Yes, it should say "end", not "start".
Fixed now.
> Personally, I wonder what was expected here. If the modification
> hooks modify the replaced text behind our back, how can the Lisp
> program which does that expect to have point where it belongs? Am I
> missing something?
No, the semantics are pretty unclear, and it's not obvious whether we
can guarantee anything here. But the bug reporter notes:
> Other types of modification (insert or delete) do not have this issue.
> `point' is adjusted before running modification hooks.
So I think the suggestion is to move point to the end of the replacement
before running the modification hooks, i.e., move the point logic to
replace_range. But I'm not actually sure where the modification hooks
are being run from...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-10-18 8:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-19 5:50 bug#42424: 27.0.90; replace-match: point is NOT left at the end of replacement Ren Victor
2020-10-17 9:49 ` Lars Ingebrigtsen
2020-10-17 17:25 ` Eli Zaretskii
2020-10-18 8:24 ` Lars Ingebrigtsen [this message]
2021-07-31 14:03 ` Lars Ingebrigtsen
2021-07-31 14:20 ` Eli Zaretskii
2021-07-31 14:28 ` Lars Ingebrigtsen
2021-07-31 14:49 ` Lars Ingebrigtsen
2021-07-31 15:10 ` Eli Zaretskii
2021-07-31 15:45 ` Lars Ingebrigtsen
2024-04-09 15:14 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=87tuusj618.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=42424@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=victorhge@gmail.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).