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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76313 <at> debbugs.gnu.org
Subject: bug#76313: New function `replace-region`
Date: Mon, 17 Feb 2025 10:03:26 -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.

So does that mean you're OK with my new `replace-region`, and that
I should open a new bug-report with a proposal for how to merge
`replace-region-contents` and `replace-buffer-contents`?

Or something else?


        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.