GNU bug report logs - #76313
New function `replace-region`

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sat, 15 Feb 2025 22:19:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: phst <at> google.com, 76313 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, stefankangas <at> gmail.com
Subject: bug#76313: New function `replace-region`
Date: Mon, 31 Mar 2025 16:10:29 +0300
> From: Tassilo Horn <tsdh <at> gnu.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,   stefankangas <at> gmail.com,
>    phst <at> google.com,   76313 <at> debbugs.gnu.org
> Date: Mon, 31 Mar 2025 08:21:56 +0200
> 
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> > But I've changed my mind: I don't think we should unify
> > `replace-region-contents` and my proposed `replace-region`.
> >
> > [...]
> >
> > While that was partly true, some of the problems were a lot more
> > delicate: while `replace-region` is "easy" to use to do what I would
> > describe as "edits", `replace-region-contents` is a good bit more
> > delicate because its effect on point is less predictable.
> 
> I think that's a very good point.  Stefan's `replace-region` can be use
> to replace text with some arbitrary other text with predictable
> positioning of point.

And the same cannot be done by calling replace-region-contents with
MAX-SECS of zero?  If not, why not?




This bug report was last modified 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.