[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: move to fail position in Isearch edit
From: |
Mathias Dahl |
Subject: |
Re: move to fail position in Isearch edit |
Date: |
Tue, 11 Nov 2008 08:13:46 +0100 |
It sounds very useful. I know I would like it since I do these kinds
of errors myself.
2008/11/11, Drew Adams <address@hidden>:
> Any interest in this? I bind it to `M-e' in `minibuffer-local-isearch-map',
> so
> `M-e M-e' puts the cursor at the match failure position.
>
> If you type a search string quickly and mistype a char or two, this lets you
> correct the typo without discarding and retyping the rest of the search
> string:
> `M-e M-e <corrections> C-s'.
>
> (defun isearch-goto-success-end ()
> "Go to end of search string text that matches."
> (interactive)
> (goto-char (point-max))
> (let ((cmds isearch-cmds)
> succ-msg)
> (when (or (not isearch-success) isearch-error)
> (while (or (not (isearch-success-state (car cmds)))
> (isearch-error-state (car cmds)))
> (pop cmds))
> (setq succ-msg (and cmds (isearch-message-state (car cmds))))
> (backward-char (- (length isearch-string) (length succ-msg))))))
>
> (define-key minibuffer-local-isearch-map
> "\M-e" 'isearchp-goto-success-end)
>
>
>
>