GNU bug report logs - #27926
25.2; Let arg REGION-NONCONTIGUOUS-P do more

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 2 Aug 2017 22:42:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 25.2

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 27926 <at> debbugs.gnu.org
Subject: bug#27926: 25.2; Let arg REGION-NONCONTIGUOUS-P do more
Date: Sat, 15 Mar 2025 05:16:08 -0700
Drew Adams <drew.adams <at> oracle.com> writes:

> In `replace.el', some replacment commands now accept optional arg
> REGION-NONCONTIGUOUS-P, to allow replacement over the rectangular region
> (really, over any list of dotted position pairs (START . END)).
>
> Currently the arg is just a Boolean.  Please consider changing
> the behavior of the commands in this way:
>
> Let non-nil continue to mean the same thing: respect limits such as
> those that are returned by the value of `region-extract-function'.
> But allow two particular non-nil values to control that behavior in
> different ways, instead of requiring that code use
> `region-extract-function':
>
>   * A function as arg value would mean use what that function returns
>     instead of applying the function that is the value of
>     `region-extract-function' to `bounds' and using what that returns.
>     This can be handy in some contexts, just as binding
>     `region-extract-function' can be handy in other contexts.
>
>   * A non-function (i.e., non-lambda) list as arg value would be
>     expected to have the form of a value that `region-extract-function'
>     applied to `bounds' returns, and it would be used directly, instead
>     of invoking `region-extract-function' to get the list of zone limits.
>     This can be handy in still other contexts, where the limits might
>     already be available - no need to bind `region-extract-function' to
>     a function like (lambda (_ignore) THE-KNOWN-LIMITS).

What is the use case here?  Please show some example code before and
after making this change, and explain (as briefly as humanly possibly)
what are the benefits of making the above change.

It is hard to consider this in its current form.

Thanks.




This bug report was last modified 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.