GNU bug report logs - #13348
24.3.50; `C-s', `C-r', `RET' in `minibuffer-local-isearch-map'

Previous Next

Package: emacs;

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

Date: Thu, 3 Jan 2013 18:46:02 UTC

Severity: minor

Found in version 24.3.50

Done: Juri Linkov <juri <at> jurta.org>

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 13348 in the body.
You can then email your comments to 13348 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#13348; Package emacs. (Thu, 03 Jan 2013 18:46: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. (Thu, 03 Jan 2013 18:46: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: 24.3.50; `C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Thu, 3 Jan 2013 10:45:47 -0800
`M-e' in Isearch is `isearch-edit-string'.  Here is its doc:
 
  Edit the search string in the minibuffer.
  The following additional command keys are active while editing.
 
  M-x exit-minibuffer to resume incremental searching with the edited string.
  RET to do one nonincremental search.
  C-s to resume isearching forward.
  C-r to resume isearching backward.
  C-M-i to complete the search string using the search ring.
  C-x 8 RET to insert a Unicode character by name (with completion).
 
  If first char entered is C-w, then do word search instead.
 
Now do this: `C-s M-e C-h k C-s'.  You see this:
 
  C-s runs the command isearch-forward-exit-minibuffer, which is an
  interactive compiled Lisp function in `isearch.el'.
 
  It is bound to C-s.
 
  (isearch-forward-exit-minibuffer)
 
  Not documented.
 
Not documented?  Why not?  Emacs users deserve better.
 
These commands (for keys `C-s', `C-r', `RET') are explicitly called out
in the doc for `isearch-edit-string'.  They should have doc strings.
`C-M-i' (`isearch-complete-edit') does, and so should all of the other
keys mentioned in the doc of `isearch-edit-string'.
 
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2012-12-31 on ODIEONE
Bzr revision: 111388 rudalics <at> gmx.at-20121231113513-subz2dazg6yjukzh
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13348; Package emacs. (Fri, 04 Jan 2013 00:17:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13348 <at> debbugs.gnu.org
Subject: Re: bug#13348: 24.3.50;
	`C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Fri, 04 Jan 2013 02:04:28 +0200
>   (isearch-forward-exit-minibuffer)
>
>   Not documented.
>
> Not documented?  Why not?  Emacs users deserve better.

Is this what you expected?

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2013-01-02 16:13:04 +0000
+++ lisp/isearch.el	2013-01-04 00:03:23 +0000
@@ -1291,11 +1293,13 @@ (defun isearch-nonincremental-exit-minib
   (exit-minibuffer))

 (defun isearch-forward-exit-minibuffer ()
+  "Resume isearching forward."
   (interactive)
   (setq isearch-new-forward t)
   (exit-minibuffer))

 (defun isearch-reverse-exit-minibuffer ()
+  "Resume isearching backward."
   (interactive)
   (setq isearch-new-forward nil)
   (exit-minibuffer))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13348; Package emacs. (Fri, 04 Jan 2013 00:43:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>
Cc: 13348 <at> debbugs.gnu.org
Subject: RE: bug#13348: 24.3.50;
	`C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Thu, 3 Jan 2013 16:42:04 -0800
> Is this what you expected?

>  (defun isearch-forward-exit-minibuffer ()
> +  "Resume isearching forward."
> 
>  (defun isearch-reverse-exit-minibuffer ()
> +  "Resume isearching backward."

Sure, but why not say also what the searching is resuming _from_?

It's not necessarily the case that someone checking this documentation gets
there from `C-h k' from within an Isearch edit.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13348; Package emacs. (Tue, 07 May 2013 09:11:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13348 <at> debbugs.gnu.org
Subject: Re: bug#13348: 24.3.50;
	`C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Tue, 07 May 2013 11:49:18 +0300
>> Is this what you expected?
>
>>  (defun isearch-forward-exit-minibuffer ()
>> +  "Resume isearching forward."
>>
>>  (defun isearch-reverse-exit-minibuffer ()
>> +  "Resume isearching backward."
>
> Sure, but why not say also what the searching is resuming _from_?

It would be more helpful if you wrote these docstrings
as you want instead of explaining your wishes.
Now I added your additions below.

Also I noticed that `isearch-nonincremental-exit-minibuffer'
has no effect, so I removed it instead of adding a docstring
to this unused function:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2013-05-01 08:10:12 +0000
+++ lisp/isearch.el	2013-05-07 08:48:31 +0000
@@ -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)
@@ -1273,7 +1274,6 @@ (defun isearch-edit-string ()
 The following additional command keys are active while editing.
 \\<minibuffer-local-isearch-map>
 \\[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."
@@ -1303,17 +1303,14 @@ (defun isearch-edit-string ()
 	   (mapconcat 'isearch-text-char-description
 		      isearch-new-string "")))))
 
-(defun isearch-nonincremental-exit-minibuffer ()
-  (interactive)
-  (setq isearch-nonincremental t)
-  (exit-minibuffer))
-
 (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))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13348; Package emacs. (Wed, 08 May 2013 21:08:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13348 <at> debbugs.gnu.org
Subject: Re: bug#13348: 24.3.50;
	`C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Thu, 09 May 2013 00:04:53 +0300
> 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.
 \\<minibuffer-local-isearch-map>
 \\[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





Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Wed, 15 May 2013 23:24:01 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Wed, 15 May 2013 23:24:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13348-done <at> debbugs.gnu.org
Subject: Re: bug#13348: 24.3.50;
	`C-s', `C-r', `RET' in `minibuffer-local-isearch-map'
Date: Thu, 16 May 2013 02:22:20 +0300
> Not documented?  Why not?  Emacs users deserve better.

It is documented now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Jun 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 341 days ago.

Previous Next


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