From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10654: 24.0.93; isearch-yank-line moved from C-y Date: Sat, 04 Feb 2012 02:17:55 +0200 Organization: JURTA Message-ID: <87liojxvi0.fsf@mail.jurta.org> References: <1a8vkp9g2v.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328317596 28730 80.91.229.3 (4 Feb 2012 01:06:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2012 01:06:36 +0000 (UTC) Cc: 10654@debbugs.gnu.org To: Kevin Rodgers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 04 02:06:34 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtU5I-0006h0-1e for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 02:06:32 +0100 Original-Received: from localhost ([::1]:49799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtU5H-0001Dw-CX for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 20:06:31 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtU5E-0001DW-D1 for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 20:06:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtU5D-0000ze-2K for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 20:06:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtU5D-0000za-0A for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 20:06:27 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RtU5m-00023L-AM for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 20:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2012 01:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10654 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10654-submit@debbugs.gnu.org id=B10654.13283176067869 (code B ref 10654); Sat, 04 Feb 2012 01:07:02 +0000 Original-Received: (at 10654) by debbugs.gnu.org; 4 Feb 2012 01:06:46 +0000 Original-Received: from localhost ([127.0.0.1]:52942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtU5W-00022r-As for submit@debbugs.gnu.org; Fri, 03 Feb 2012 20:06:46 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:59097 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtU5U-00022e-TH for 10654@debbugs.gnu.org; Fri, 03 Feb 2012 20:06:45 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 4C1C6451C826; Fri, 3 Feb 2012 17:04:50 -0800 (PST) In-Reply-To: (Kevin Rodgers's message of "Fri, 03 Feb 2012 10:48:29 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56457 Archived-At: > 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)))))