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 Kangas <stefankangas <at> gmail.com>
Cc: 76313 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, tsdh <at> gnu.org
Subject: bug#76313: New function `replace-region`
Date: Sat, 08 Mar 2025 10:48:59 +0200
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Fri, 7 Mar 2025 20:23:09 +0000
> Cc: 76313 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, tsdh <at> gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > but it doesn't solve the problem, either: the
> > other APIs still exist, so the potential confusion what to use when is
> > still there.  I very much doubt that you will be able to catch all the
> > subtleties in our documentation to avoid the confusion, but feel free
> > to try convincing me otherwise.
> 
> I don't fully understand what exactly you are asking for here.  Would
> you like me to propose a documentation patch on top of Stefan Monnier's
> patch?
> 
> I don't know if this is sufficient, but I suggest putting
> `replace-region` at the top of (info "(elisp) Replacing").  I don't
> think it will be very hard to explain the specialized nature of a
> renamed `replace-region-carefully`.  It's doable even if we don't rename
> it, I think, although the `replace-region-contents` name is a fair bit
> less self-explanatory.
> 
> I'm sure that we can come up with good documentation if we collaborate
> to make it so; we usually do.

I'm saying that the documentation aspect of this is not the real
problem.  Once we agree on the code and API changes, updating the
documentation is a no-brainer, and I don't expect it to trigger an
argument.

The problem here is how to provide the functionality without
complicating Emacs with yet another API, where we already have two.




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.