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#13348: 24.3.50; `C-s', `C-r', `RET' in `minibuffer-local-isearch-map' Date: Thu, 09 May 2013 00:04:53 +0300 Organization: JURTA Message-ID: <87wqr9mbd6.fsf@mail.jurta.org> References: <7482F5EE927A40CFB51A25788D9E5305@us.oracle.com> <87a9spu7t7.fsf@mail.jurta.org> <1D518890DCE34548A5A5BEC043950771@us.oracle.com> <87a9o7duul.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1368047291 2701 80.91.229.3 (8 May 2013 21:08:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 May 2013 21:08:11 +0000 (UTC) Cc: 13348@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 08 23:08:09 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UaBar-0007wM-AQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2013 23:08:09 +0200 Original-Received: from localhost ([::1]:34760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaBaq-0007p4-Id for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 May 2013 17:08:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaBal-0007or-MC for bug-gnu-emacs@gnu.org; Wed, 08 May 2013 17:08:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaBak-0002ZZ-7x for bug-gnu-emacs@gnu.org; Wed, 08 May 2013 17:08:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaBak-0002ZS-5S for bug-gnu-emacs@gnu.org; Wed, 08 May 2013 17:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UaBak-0003ip-Cs for bug-gnu-emacs@gnu.org; Wed, 08 May 2013 17:08:02 -0400 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: Wed, 08 May 2013 21:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13348-submit@debbugs.gnu.org id=B13348.136804723514221 (code B ref 13348); Wed, 08 May 2013 21:08:02 +0000 Original-Received: (at 13348) by debbugs.gnu.org; 8 May 2013 21:07:15 +0000 Original-Received: from localhost ([127.0.0.1]:34163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaBZz-0003hF-3l for submit@debbugs.gnu.org; Wed, 08 May 2013 17:07:15 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:42321 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaBZv-0003gw-Dr for 13348@debbugs.gnu.org; Wed, 08 May 2013 17:07:14 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E9F40258B9E91C; Wed, 8 May 2013 14:07:08 -0700 (PDT) In-Reply-To: <87a9o7duul.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 07 May 2013 11:49:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (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.x 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:74089 Archived-At: > Also I noticed that `isearch-nonincremental-exit-minibuffer' > has no effect, so I removed it instead of adding a docstring > to this unused function: Better than removing is to mark it obsolete. I propose also to rename the recently added function `isearch-insert-char-by-name' to `isearch-char-by-name' (using naming convention like in `isearch-other-meta-char' and `isearch-printing-char') because it doesn't insert a character to the buffer but adds a character to the search string: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-01 08:10:12 +0000 +++ lisp/isearch.el 2013-05-08 20:49:59 +0000 @@ -47,7 +47,7 @@ ;; modify the search string before executing the search. There are ;; three commands to terminate the editing: C-s and C-r exit the ;; minibuffer and search forward and reverse respectively, while C-m -;; exits and does a nonincremental search. +;; exits and searches in the last search direction. ;; Exiting immediately from isearch uses isearch-edit-string instead ;; of nonincremental-search, if search-nonincremental-instead is non-nil. @@ -515,12 +515,12 @@ (defvar isearch-mode-map (define-key map "\M-so" 'isearch-occur) (define-key map "\M-shr" 'isearch-highlight-regexp) - ;; The key translations defined in the C-x 8 prefix should insert - ;; characters into the search string. See iso-transl.el. + ;; The key translations defined in the C-x 8 prefix should add + ;; characters to the search string. See iso-transl.el. (define-key map "\C-x" nil) (define-key map [?\C-x t] 'isearch-other-control-char) (define-key map "\C-x8" nil) - (define-key map "\C-x8\r" 'isearch-insert-char-by-name) + (define-key map "\C-x8\r" 'isearch-char-by-name) map) "Keymap for `isearch-mode'.") @@ -528,7 +528,7 @@ (defvar isearch-mode-map (defvar minibuffer-local-isearch-map (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) - (define-key map "\r" 'isearch-nonincremental-exit-minibuffer) + (define-key map "\r" 'exit-minibuffer) (define-key map "\M-\t" 'isearch-complete-edit) (define-key map "\C-s" 'isearch-forward-exit-minibuffer) (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) @@ -679,6 +679,8 @@ (defun isearch-forward (&optional regexp Type \\[isearch-yank-pop] to replace string just yanked into search prompt with string killed before it. Type \\[isearch-quote-char] to quote control character to search for it. +Type \\[isearch-char-by-name] to add a character to search by Unicode name,\ + with completion. \\[isearch-abort] while searching or when search has failed cancels input\ back to what has been found successfully. @@ -1273,7 +1275,6 @@ (defun isearch-edit-string () The following additional command keys are active while editing. \\ \\[exit-minibuffer] to resume incremental searching with the edited string. -\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. \\[isearch-forward-exit-minibuffer] to resume isearching forward. \\[isearch-reverse-exit-minibuffer] to resume isearching backward. \\[isearch-complete-edit] to complete the search string using the search ring." @@ -1307,13 +1308,18 @@ (defun isearch-nonincremental-exit-minib (interactive) (setq isearch-nonincremental t) (exit-minibuffer)) +;; Changing the value of `isearch-nonincremental' has no effect here, +;; because `isearch-edit-string' ignores this change. Thus marked as obsolete. +(make-obsolete 'isearch-nonincremental-exit-minibuffer 'exit-minibuffer "24.4") (defun isearch-forward-exit-minibuffer () + "Resume isearching forward from the minibuffer that edits the search string." (interactive) (setq isearch-new-forward t) (exit-minibuffer)) (defun isearch-reverse-exit-minibuffer () + "Resume isearching backward from the minibuffer that edits the search string." (interactive) (setq isearch-new-forward nil) (exit-minibuffer)) @@ -1866,11 +1872,12 @@ (defun isearch-yank-line () (lambda () (let ((inhibit-field-text-motion t)) (line-end-position (if (eolp) 2 1)))))) -(defun isearch-insert-char-by-name () - "Read a character by its Unicode name and insert it into search string." +(defun isearch-char-by-name () + "Read a character by its Unicode name and add it to the search string. +Completion is available like in `read-char-by-name' used by `insert-char'." (interactive) (with-isearch-suspended - (let ((char (read-char-by-name "Insert character (Unicode name or hex): "))) + (let ((char (read-char-by-name "Add character to search (Unicode name or hex): "))) (when char (setq isearch-new-string (concat isearch-string (string char)) isearch-new-message (concat isearch-message === modified file 'doc/emacs/search.texi' --- doc/emacs/search.texi 2013-01-01 09:11:05 +0000 +++ doc/emacs/search.texi 2013-05-08 20:52:42 +0000 @@ -175,7 +175,7 @@ (@pxref{Faces}). The current search str @kindex M-e @r{(Incremental search)} To edit the current search string in the minibuffer without -replacing it with items from the search ring, type @kbd{M-e}. Type +replacing it with items from the search ring, type @kbd{M-e}. Type @key{RET}, @kbd{C-s} or @kbd{C-r} to finish editing the string and search for it. @node Error in Isearch