From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: C-f in isearch's non-incremental minibuffer edit
Date: Sun, 17 Apr 2005 18:02:30 -0400 [thread overview]
Message-ID: <87y8bh83ti.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1DNFJH-0005UZ-KL@fencepost.gnu.org> (Richard Stallman's message of "Sun, 17 Apr 2005 15:19:59 -0400")
>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
>> Could you tell me, at the level of user-visible behavior, how its
>> currently differs from the usual history functionality?
> No. It basically works the same, although maybe it doesn't skip
> things in quite the same order.
> Could you show me that patch again? The code you're removing
> must have had some motivation. It might not be a good motivation,
> but we can't judge it without seeing what it was.
Here you go,
Stefan
--- orig/lisp/isearch.el
+++ mod/lisp/isearch.el
@@ -405,12 +403,6 @@
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map "\r" 'isearch-nonincremental-exit-minibuffer)
- (define-key map "\M-n" 'isearch-ring-advance-edit)
- (define-key map [next] 'isearch-ring-advance-edit)
- (define-key map [down] 'isearch-ring-advance-edit)
- (define-key map "\M-p" 'isearch-ring-retreat-edit)
- (define-key map [prior] 'isearch-ring-retreat-edit)
- (define-key map [up] 'isearch-ring-retreat-edit)
(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)
@@ -937,8 +903,6 @@
\\[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-ring-advance-edit] to replace the search string with the next item in the search ring.
-\\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring.
\\[isearch-complete-edit] to complete the search string using the search ring.
\\<isearch-mode-map>
If first char entered is \\[isearch-yank-word-or-char], then do word search instead."
@@ -1024,12 +1024,12 @@
(isearch-unread e))
(setq cursor-in-echo-area nil)
(setq isearch-new-string
- (let (junk-ring)
(read-from-minibuffer
(isearch-message-prefix nil isearch-nonincremental)
isearch-string
minibuffer-local-isearch-map nil
- 'junk-ring nil t))
+ (if isearch-regexp 'regexp-search-ring 'search-ring)
+ nil t)
isearch-new-message
(mapconcat 'isearch-text-char-description
isearch-new-string "")))
@@ -1860,49 +1890,6 @@
(interactive)
(isearch-ring-adjust nil))
-(defun isearch-ring-advance-edit (n)
- "Insert the next element of the search history into the minibuffer.
-With prefix arg N, insert the Nth element."
- (interactive "p")
- (let* ((yank-pointer-name (if isearch-regexp
- 'regexp-search-ring-yank-pointer
- 'search-ring-yank-pointer))
- (yank-pointer (eval yank-pointer-name))
- (ring (if isearch-regexp regexp-search-ring search-ring))
- (length (length ring)))
- (if (zerop length)
- ()
- (set yank-pointer-name
- (setq yank-pointer
- (mod (- (or yank-pointer 0) n)
- length)))
-
- (delete-field)
- (insert (nth yank-pointer ring))
- (goto-char (point-max)))))
-
-(defun isearch-ring-retreat-edit (n)
- "Insert the previous element of the search history into the minibuffer.
-With prefix arg N, insert the Nth element."
- (interactive "p")
- (isearch-ring-advance-edit (- n)))
-
-;;(defun isearch-ring-adjust-edit (advance)
-;; "Use the next or previous search string in the ring while in minibuffer."
-;; (isearch-ring-adjust1 advance)
-;; (erase-buffer)
-;; (insert isearch-string))
-
-;;(defun isearch-ring-advance-edit ()
-;; (interactive)
-;; (isearch-ring-adjust-edit 'advance))
-
-;;(defun isearch-ring-retreat-edit ()
-;; "Retreat to the previous search string in the ring while in the minibuffer."
-;; (interactive)
-;; (isearch-ring-adjust-edit nil))
-
-
(defun isearch-complete1 ()
;; Helper for isearch-complete and isearch-complete-edit
;; Return t if completion OK, nil if no completion exists.
next prev parent reply other threads:[~2005-04-17 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-16 12:53 C-f in isearch's non-incremental minibuffer edit Stefan Monnier
2005-04-17 1:49 ` Richard Stallman
2005-04-17 2:20 ` Stefan Monnier
2005-04-17 19:19 ` Richard Stallman
2005-04-17 22:02 ` Stefan Monnier [this message]
2005-04-18 21:06 ` Richard Stallman
2005-04-18 22:46 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y8bh83ti.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.