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


Message #23 received at 76313 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 76313 <at> debbugs.gnu.org
Subject: Re: bug#76313: New function `replace-region`
Date: Mon, 17 Feb 2025 14:20:20 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 76313 <at> debbugs.gnu.org
> Date: Sun, 16 Feb 2025 21:45:03 -0500
> 
> >> I'm not sure it'd be a good idea, tho: `replace-region-contents` is
> >> a "heavy" operation, involving narrowing and another buffer, whereas
> >> `replace-region` is meant to be a low-level operation (if we implement
> >> it in C, we could arguably use it as *the* low-level operation and
> >> define `insert` and `delete-region` on top of it).
> >
> > On the downside, we already have 2 APIs for this, so having a 3rd one
> > will only make the confusion more prominent.
> 
> We could start by merging `replace-region-contents` and
> `replace-buffer-contents`.

Fine by me, thanks.




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.