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: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 76313 <at> debbugs.gnu.org
Subject: bug#76313: New function `replace-region`
Date: Sun, 16 Feb 2025 07:42:43 +0200
> Cc: monnier <at> iro.umontreal.ca
> Date: Sat, 15 Feb 2025 17:18:15 -0500
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 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?

What's wrong with replace-buffer-contents or replace-region-contents?




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.