GNU bug report logs - #25302
25.1; `isearch-allow-prefix' does not allow `C-u C-u'

Previous Next

Package: emacs;

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

Date: Fri, 30 Dec 2016 22:10:01 UTC

Severity: normal

Tags: fixed, patch

Found in versions 25.1, 24.4

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.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 25302 in the body.
You can then email your comments to 25302 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25302; Package emacs. (Fri, 30 Dec 2016 22:10: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. (Fri, 30 Dec 2016 22:10:03 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Fri, 30 Dec 2016 14:08:32 -0800 (PST)
1. emacs -Q

2. Ensure that `isearch-allow-prefix' is non-nil, which it is by default.

3. Search for anything, such as character `e', then hit `C-u C-u':

 C-s e C-u C-u

The second `C-u' terminates Isearch.  It should not.  The raw prefix arg
`(16)' should be passed through to whatever command is invoked by the
next key sequence.

The second `C-u' acts as if `isearch-allow-prefix' were nil.

Note that in Emacs 23, if `isearch-allow-scroll' is non-nil then `C-u
C-u' is passed through OK.  (In Emacs 23, `isearch-allow-prefix' does
not exist.)

But in Emacs 24.4 and later even the workaround of setting
`isearch-allow-scroll' to `t' does not work, to correct the
prefix-arg problem.  The second `C-u' always exits Isearch.

So this is a regression wrt that workaround.  The regression was introduced in Emacs 24.4, which is also when `isearch-allow-prefix'
was introduced.



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#25302; Package emacs. (Fri, 30 Dec 2016 22:27:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25302 <at> debbugs.gnu.org
Subject: Re: bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Fri, 30 Dec 2016 17:27:43 -0500
tags 25302 patch
quit

Drew Adams <drew.adams <at> oracle.com> writes:

> 1. emacs -Q
>
> 2. Ensure that `isearch-allow-prefix' is non-nil, which it is by default.
>
> 3. Search for anything, such as character `e', then hit `C-u C-u':
>
>  C-s e C-u C-u
>
> The second `C-u' terminates Isearch.  It should not.  The raw prefix arg
> `(16)' should be passed through to whatever command is invoked by the
> next key sequence.
>
> The second `C-u' acts as if `isearch-allow-prefix' were nil.

This seems to fix it:

diff --git i/lisp/isearch.el w/lisp/isearch.el
index 9846f0b..04a9af1 100644
--- i/lisp/isearch.el
+++ w/lisp/isearch.el
@@ -2389,7 +2389,7 @@ isearch-pre-command-hook
       (setq this-command 'isearch-edit-string))
      ;; Handle a scrolling function or prefix argument.
      ((or (and isearch-allow-prefix
-	       (memq this-command '(universal-argument
+               (memq this-command '(universal-argument universal-argument-more
 				    digit-argument negative-argument)))
 	  (and isearch-allow-scroll
 	       (symbolp this-command)




Added tag(s) patch. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 30 Dec 2016 22:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25302; Package emacs. (Fri, 30 Dec 2016 22:47:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: 25302 <at> debbugs.gnu.org
Subject: RE: bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Fri, 30 Dec 2016 14:46:35 -0800 (PST)
> This seems to fix it:
> -(memq this-command '(universal-argument
> +(memq this-command '(universal-argument universal-argument-more

Yes!  Please commit the fix.  Thx.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25302; Package emacs. (Fri, 30 Dec 2016 22:59:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: 25302 <at> debbugs.gnu.org
Subject: RE: bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Fri, 30 Dec 2016 14:57:53 -0800 (PST)
> > This seems to fix it:
> > -(memq this-command '(universal-argument
> > +(memq this-command '(universal-argument universal-argument-more
> 
> Yes!  Please commit the fix.  Thx.

But a guess about the regression for `isearch-allow-scroll' is that
it also needs to be added here:

 ;; Universal argument commands
 (put 'universal-argument 'isearch-scroll t)
 (put 'negative-argument 'isearch-scroll t)
 (put 'digit-argument 'isearch-scroll t)

IOW, add (put 'universal-argument-more 'isearch-scroll t)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25302; Package emacs. (Sat, 31 Dec 2016 05:37:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25302 <at> debbugs.gnu.org
Subject: Re: bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Sat, 31 Dec 2016 00:37:13 -0500
[Message part 1 (text/plain, inline)]
Drew Adams <drew.adams <at> oracle.com> writes:

> But a guess about the regression for `isearch-allow-scroll' is that
> it also needs to be added here:
>
>  ;; Universal argument commands
>  (put 'universal-argument 'isearch-scroll t)
>  (put 'negative-argument 'isearch-scroll t)
>  (put 'digit-argument 'isearch-scroll t)
>
> IOW, add (put 'universal-argument-more 'isearch-scroll t)

Agreed.

[v2-0001-Fix-isearch-handling-of-C-u-C-u.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25302; Package emacs. (Fri, 06 Jan 2017 01:27:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25302 <at> debbugs.gnu.org
Subject: Re: bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
Date: Thu, 05 Jan 2017 20:27:19 -0500
# as mentioned in OP
found 25302 24.4

tags 25302 fixed
close 25302 26.1
quit

npostavs <at> users.sourceforge.net writes:

> Drew Adams <drew.adams <at> oracle.com> writes:
>
>> But a guess about the regression for `isearch-allow-scroll' is that
>> it also needs to be added here:
>>
>>  ;; Universal argument commands
>>  (put 'universal-argument 'isearch-scroll t)
>>  (put 'negative-argument 'isearch-scroll t)
>>  (put 'digit-argument 'isearch-scroll t)
>>
>> IOW, add (put 'universal-argument-more 'isearch-scroll t)
>
> Agreed.

Pushed as [1: 69b9224] 

1: 2017-01-05 20:20:42 -0500 69b9224a327ade40f3dab9b8ae6d9553462ced07
  Fix isearch handling of C-u C-u...




bug Marked as found in versions 24.4. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 06 Jan 2017 01:27:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 06 Jan 2017 01:27:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 25302 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 06 Jan 2017 01:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Feb 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 196 days ago.

Previous Next


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