GNU bug report logs - #10654
24.0.93; isearch-yank-line moved from C-y

Previous Next

Package: emacs;

Reported by: "Aaron S. Hawley" <aaron.s.hawley <at> gmail.com>

Date: Mon, 30 Jan 2012 15:17:01 UTC

Severity: wishlist

Found in version 24.0.93

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
Cc: 10654 <at> debbugs.gnu.org
Subject: bug#10654: 24.0.93; isearch-yank-line moved from C-y
Date: Sat, 04 Feb 2012 02:17:55 +0200
> That approach would be a little less onerous if additional words or characters
> could be added to the search string by additional M-f and C-f without prefixing
> each with M-s.

If `C-k' for `isearch-yank-line' is not under consideration,
then I recommend to allow `M-s C-e C-e C-e ...' in 24.1
because `M-s C-e M-s C-e M-s C-e ...' is unusable.

This can be achieved with the patch below.

Other repeating key sequences `M-s M-f M-f M-f ...' and `M-s C-f C-f C-f ...'
could be implemented as well, but there is no urgent need for them now.

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2012-02-01 00:21:17 +0000
+++ lisp/isearch.el	2012-02-04 00:17:07 +0000
@@ -533,6 +533,9 @@ (defvar minibuffer-local-isearch-map
     map)
   "Keymap for editing Isearch strings in the minibuffer.")
 
+(defvar isearch-repeat-key nil)
+(defvar isearch-repeat-command nil)
+
 ;; Internal variables declared globally for byte-compiler.
 ;; These are all set with setq while isearching
 ;; and bound locally while editing the search string.
@@ -1662,6 +1665,8 @@
 (defun isearch-yank-line ()
   "Pull rest of line from buffer into search string."
   (interactive)
+  (setq isearch-repeat-key last-input-event
+	isearch-repeat-command 'isearch-yank-line)
   (isearch-yank-internal
    (lambda () (let ((inhibit-field-text-motion t))
 		(line-end-position (if (eolp) 2 1))))))
@@ -1962,8 +1967,13 @@ (defun isearch-other-meta-char (&optiona
                 (this-command-keys)))
 	 (main-event (aref key 0))
 	 (keylist (listify-key-sequence key))
+	 (repeat-key isearch-repeat-key)
          scroll-command isearch-point)
-    (cond ((and (= (length key) 1)
+    (setq isearch-repeat-key nil)
+    (cond ((and (eq main-event repeat-key) isearch-repeat-command)
+	   (setq isearch-repeat-key main-event)
+	   (command-execute isearch-repeat-command))
+	  ((and (= (length key) 1)
 		(let ((lookup (lookup-key local-function-key-map key)))
 		  (not (or (null lookup) (integerp lookup)
 			   (keymapp lookup)))))





This bug report was last modified 3 years and 116 days ago.

Previous Next


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