GNU bug report logs -
#27897
25.1; Add REGION-NONCONTIGUOUS-P arg to other replace.el commands
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 1 Aug 2017 04:38:01 UTC
Severity: wishlist
Found in version 25.1
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27897 in the body.
You can then email your comments to 27897 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Tue, 01 Aug 2017 04:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 01 Aug 2017 04:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Subject line says it all.
The patch is trivial - just do the same thing to commands such as
`replace-string', `replace-regexp', `query-replace-regexp-eval', and
`map-query-replace-regexp' as you did to `query-replace' and
`query-replace-regexp': add REGION-NONCONTIGUOUS-P arg to the
interactive spec the same way, and pass it to `perform-replace' the same
way.
(Shouldn't this have been done in the first place?)
In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
of 2016-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
'configure --without-dbus --without-compress-install CFLAGS=-static'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Tue, 17 Apr 2018 21:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 27897 <at> debbugs.gnu.org (full text, mbox):
ping.
Do you need an explicit patch for this? Would that make a
difference in getting this done?
> The patch is trivial - just do the same thing to commands such as
> `replace-string', `replace-regexp', `query-replace-regexp-eval', and
> `map-query-replace-regexp' as you did to `query-replace' and
> `query-replace-regexp': add REGION-NONCONTIGUOUS-P arg to the
> interactive spec the same way, and pass it to `perform-replace' the same
> way.
>
> (Shouldn't this have been done in the first place?)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Wed, 18 Apr 2018 21:06:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 27897 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attached is a patch for this.
(I updated doc strings for arg REGION-NONCONTIGUOUS-P.
See also bug #31207, for other doc-string changes that
should be made.)
> ping.
>
> Do you need an explicit patch for this? Would that make a
> difference in getting this done?
>
> > The patch is trivial - just do the same thing to commands such as
> > `replace-string', `replace-regexp', `query-replace-regexp-eval', and
> > `map-query-replace-regexp' as you did to `query-replace' and
> > `query-replace-regexp': add REGION-NONCONTIGUOUS-P arg to the
> > interactive spec the same way, and pass it to `perform-replace' the
> same
> > way.
> >
> > (Shouldn't this have been done in the first place?)
[replace-2018-04-18.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Wed, 18 Apr 2018 21:44:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 27897 <at> debbugs.gnu.org (full text, mbox):
> -(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end)
> +(defun query-replace-regexp-eval (regexp to-expr &optional delimited start end region-noncontiguous-p)
> -(defun map-query-replace-regexp (regexp to-strings &optional n start end)
> +(defun map-query-replace-regexp (regexp to-strings &optional n start end region-noncontiguous-p)
But why not to add the arg backward like in all other commands?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Wed, 18 Apr 2018 23:27:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 27897 <at> debbugs.gnu.org (full text, mbox):
> > -(defun query-replace-regexp-eval (regexp to-expr &optional delimited
> start end)
> > +(defun query-replace-regexp-eval (regexp to-expr &optional delimited
> start end region-noncontiguous-p)
> > -(defun map-query-replace-regexp (regexp to-strings &optional n start
> end)
> > +(defun map-query-replace-regexp (regexp to-strings &optional n start
> end region-noncontiguous-p)
>
> But why not to add the arg backward like in all other commands?
PLEASE DO, here and elsewhere where it is missing, wherever
it makes sense.
I'm having enough trouble just getting REGION-NONCONTIGUOUS-P
added. ;-)
[And getting arguments described in doc strings (bug #31207).
I was afraid that someone might even complain that I added
some rudimentary mention of other args in this patch. But
I tried to sneak that in anyway. ;-)]
And some of the commands I added REGION-NONCONTIGUOUS-P to
already had BACKWARD, while others did not. Should we
assume that whoever did that did it on purpose and wisely?
Dunno. My purpose here was not to fix missing BACKWARD,
but if you want to think about that and take care of it,
please do - that would be great, along with applying my
patch for REGION-NONCONTIGUOUS-P.
I have the impression that someone added some stuff here
and there without bothering to think more about it and
doing it more systematically. But maybe not; maybe there
are good reasons why they did what they did. For
REGION-NONCONTIGUOUS-P, at least, it seems clear to me
that it is useful everywhere I added it.
Reply sent
to
Juri Linkov <juri <at> linkov.net>
:
You have taken responsibility.
(Thu, 19 Apr 2018 19:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Drew Adams <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Thu, 19 Apr 2018 19:38:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 27897-done <at> debbugs.gnu.org (full text, mbox):
> And some of the commands I added REGION-NONCONTIGUOUS-P to
> already had BACKWARD, while others did not. Should we
> assume that whoever did that did it on purpose and wisely?
query-replace-regexp-eval has no BACKWARD arg because
query-replace-regexp-eval is obsolete and should be removed.
map-query-replace-regexp has no BACKWARD arg because
map-query-replace-regexp has special logic for its prefix arg.
> Dunno. My purpose here was not to fix missing BACKWARD,
> but if you want to think about that and take care of it,
> please do - that would be great, along with applying my
> patch for REGION-NONCONTIGUOUS-P.
Thanks, your patch pushed to master as 75a32f4.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Thu, 19 Apr 2018 19:49:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 27897-done <at> debbugs.gnu.org (full text, mbox):
> Thanks, your patch pushed to master as 75a32f4.
Thank you.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Thu, 19 Apr 2018 20:13:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 27897-done <at> debbugs.gnu.org (full text, mbox):
> Thanks, your patch pushed to master as 75a32f4.
BTW, what does that mean, in terms of something I can test.
Does it mean, for example, (> emacs-major-version 26)?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Thu, 19 Apr 2018 20:34:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 27897 <at> debbugs.gnu.org (full text, mbox):
fixed 27897 27.0.50
thanks
>> Thanks, your patch pushed to master as 75a32f4.
>
> BTW, what does that mean, in terms of something I can test.
> Does it mean, for example, (> emacs-major-version 26)?
Thanks for the reminder, now marked as fixed in 27.
bug Marked as fixed in versions 27.0.50.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Apr 2018 20:34:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Fri, 20 Apr 2018 07:32:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 27897 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Date: Thu, 19 Apr 2018 22:36:53 +0300
> Cc: 27897-done <at> debbugs.gnu.org
>
> Thanks, your patch pushed to master as 75a32f4.
I think this needs to be reflected ion NEWS, and perhaps also in the
manuals.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Sat, 21 Apr 2018 20:04:02 GMT)
Full text and
rfc822 format available.
Message #39 received at 27897 <at> debbugs.gnu.org (full text, mbox):
>> Thanks, your patch pushed to master as 75a32f4.
>
> I think this needs to be reflected ion NEWS, and perhaps also in the
> manuals.
query-replace-regexp-eval and map-query-replace-regexp are obscure commands
that don't need to be documented and mentioned in NEWS. As for the commands
replace-string and replace-regexp, their other arguments also are
not documented.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#27897
; Package
emacs
.
(Sun, 22 Apr 2018 02:37:01 GMT)
Full text and
rfc822 format available.
Message #42 received at 27897 <at> debbugs.gnu.org (full text, mbox):
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 27897 <at> debbugs.gnu.org, drew.adams <at> oracle.com
> Date: Sat, 21 Apr 2018 22:59:11 +0300
>
> >> Thanks, your patch pushed to master as 75a32f4.
> >
> > I think this needs to be reflected ion NEWS, and perhaps also in the
> > manuals.
>
> query-replace-regexp-eval and map-query-replace-regexp are obscure commands
> that don't need to be documented and mentioned in NEWS. As for the commands
> replace-string and replace-regexp, their other arguments also are
> not documented.
The user-visible changes should be in NEWS. If you think the manuals
don't need updates on their behalf, mark the NEWS entry with "---".
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 20 May 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.