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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#76313: closed (New function `replace-region`)
Date: Tue, 18 Feb 2025 20:05:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 18 Feb 2025 15:04:22 -0500
with message-id <jwvtt8rxbnr.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#76313: New function `replace-region`
has caused the debbugs.gnu.org bug report #76313,
regarding New function `replace-region`
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
76313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76313
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: New function `replace-region`
Date: Sat, 15 Feb 2025 17:18:15 -0500
[Message part 3 (text/plain, inline)]
Tags: patch

We often need to replace a chunk of buffer text with something else.
It is easy enough to do with `insert` + `delete-region`, but that
has suboptimal behavior w.r.t markers, so rather than let coders
reinvent a slightly-better replacement I propose we add a dedicated
function for it.

So I suggest the patch below.  Comments?  Objections?


        Stefan
[replace-region.patch (text/patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76313-done <at> debbugs.gnu.org
Subject: Re: bug#76313: New function `replace-region`
Date: Tue, 18 Feb 2025 15:04:22 -0500
> So basically, you reject every attempt to compromise that I could come
> up with, and keep pressing for your original proposal, whose downsides
> I prefer not to sustain.  Are you really saying that your way is the
> only way? why?

Never mind,


        Stefan



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.