emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @#$! new behavior of C-b & C-f in i-search


From: Juri Linkov
Subject: Re: @#$! new behavior of C-b & C-f in i-search
Date: Mon, 24 May 2004 11:48:55 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Peter Lee <address@hidden> writes:
>>>>> David Kastrup writes:
>     David> While multiple keypresses of that still require much more
>     David> action than C-f and C-b, I guess I could live with that.
>
> I wouldn't find this useful if it's more than a single keypress.
> Otherwise it becomes more efficient to simply M-e and edit the string.

M-e is a good method to delete characters from the search string,
but it can't append characters from the buffer where isearch is active.

But it's possible to use something like below.  When C-f is typed
in the end of the isearch minibuffer (activated by M-e) it could append
characters from the isearch buffer to the search string in the minibuffer.

(define-key minibuffer-local-isearch-map "\C-f"  
'isearch-yank-char-in-minibuffer)
(define-key minibuffer-local-isearch-map [right] 
'isearch-yank-char-in-minibuffer)

(defun isearch-yank-char-in-minibuffer ()
  "Pull next character from isearch buffer into end of search string in 
minibuffer."
  (interactive "p")
  (if (eobp)
      (insert
       (save-excursion
         (set-buffer (cadr (buffer-list)))
         (buffer-substring-no-properties
          (point) (progn (forward-char 1) (point)))))
    (forward-char 1)))

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]