all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
@ 2016-12-30 22:08 Drew Adams
  2016-12-30 22:27 ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2016-12-30 22:08 UTC (permalink / raw)
  To: 25302

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'





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
  2016-12-30 22:08 bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u' Drew Adams
@ 2016-12-30 22:27 ` npostavs
  2016-12-30 22:46   ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: npostavs @ 2016-12-30 22:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25302

tags 25302 patch
quit

Drew Adams <drew.adams@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)





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
  2016-12-30 22:27 ` npostavs
@ 2016-12-30 22:46   ` Drew Adams
  2016-12-30 22:57     ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2016-12-30 22:46 UTC (permalink / raw)
  To: npostavs; +Cc: 25302

> This seems to fix it:
> -(memq this-command '(universal-argument
> +(memq this-command '(universal-argument universal-argument-more

Yes!  Please commit the fix.  Thx.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
  2016-12-30 22:46   ` Drew Adams
@ 2016-12-30 22:57     ` Drew Adams
  2016-12-31  5:37       ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2016-12-30 22:57 UTC (permalink / raw)
  To: npostavs; +Cc: 25302

> > 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)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
  2016-12-30 22:57     ` Drew Adams
@ 2016-12-31  5:37       ` npostavs
  2017-01-06  1:27         ` npostavs
  0 siblings, 1 reply; 6+ messages in thread
From: npostavs @ 2016-12-31  5:37 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25302

[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

Drew Adams <drew.adams@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.


[-- Attachment #2: patch v2 --]
[-- Type: text/plain, Size: 1342 bytes --]

From b92e54be715fd7880a4f3c260dfc360eff3f1e57 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sat, 31 Dec 2016 00:31:49 -0500
Subject: [PATCH v2] Fix isearch handling of C-u C-u...

* lisp/isearch.el: Add `isearch-scroll' property to
universal-argument-more so that `isearch-allow-scroll' will apply to it
as well.
(isearch-pre-command-hook): Let `isearch-allow-prefix' apply to
`universal-argument-more' as well (Bug#25302).
---
 lisp/isearch.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9846f0b..af82229 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2297,6 +2297,7 @@ isearch-fallback
 
 ;; Universal argument commands
 (put 'universal-argument 'isearch-scroll t)
+(put 'universal-argument-more 'isearch-scroll t)
 (put 'negative-argument 'isearch-scroll t)
 (put 'digit-argument 'isearch-scroll t)
 
@@ -2389,7 +2390,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)
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u'
  2016-12-31  5:37       ` npostavs
@ 2017-01-06  1:27         ` npostavs
  0 siblings, 0 replies; 6+ messages in thread
From: npostavs @ 2017-01-06  1:27 UTC (permalink / raw)
  To: Drew Adams; +Cc: 25302

# as mentioned in OP
found 25302 24.4

tags 25302 fixed
close 25302 26.1
quit

npostavs@users.sourceforge.net writes:

> Drew Adams <drew.adams@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...





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-06  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-30 22:08 bug#25302: 25.1; `isearch-allow-prefix' does not allow `C-u C-u' Drew Adams
2016-12-30 22:27 ` npostavs
2016-12-30 22:46   ` Drew Adams
2016-12-30 22:57     ` Drew Adams
2016-12-31  5:37       ` npostavs
2017-01-06  1:27         ` npostavs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.