[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlight failed part of isearch input
From: |
Juri Linkov |
Subject: |
Re: highlight failed part of isearch input |
Date: |
Sun, 15 Jul 2007 02:05:40 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> I think we should try to find a proper place in low-level isearch
> functions to fix such behavior, because for users it is confusing.
>
> I agree. Can you work on it?
The patch below fixes `isearch-del-char' to work correctly in all
reported cases. It failed because `isearch-search-and-update' works
only for adding characters to the successful search (it doesn't call
`isearch-search' for unsuccessful non-regexp search).
A new solution is to set search starting point to the isearch-other-end
and start the search from this position and try to find the remaining
string again.
Index: lisp/isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.298
diff -c -r1.298 isearch.el
*** lisp/isearch.el 9 Jul 2007 14:45:01 -0000 1.298
--- lisp/isearch.el 14 Jul 2007 22:59:45 -0000
***************
*** 1260,1269 ****
(ding)
(setq isearch-string (substring isearch-string 0 (- (or arg 1)))
isearch-message (mapconcat 'isearch-text-char-description
! isearch-string "")
! ;; Don't move cursor in reverse search.
! isearch-yank-flag t))
! (isearch-search-and-update))
(defun isearch-yank-string (string)
"Pull STRING into search string."
--- 1284,1296 ----
(ding)
(setq isearch-string (substring isearch-string 0 (- (or arg 1)))
isearch-message (mapconcat 'isearch-text-char-description
! isearch-string "")))
! ;; Use the isearch-other-end as new starting point to be able
! ;; to find the remaining part of the search string again.
! (if isearch-other-end (goto-char isearch-other-end))
! (isearch-search)
! (isearch-push-state)
! (isearch-update))
(defun isearch-yank-string (string)
"Pull STRING into search string."
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: highlight failed part of isearch input, (continued)
- Re: highlight failed part of isearch input, Stefan Monnier, 2007/07/11
- Re: highlight failed part of isearch input, David Kastrup, 2007/07/11
- RE: highlight failed part of isearch input, Drew Adams, 2007/07/11
- Re: highlight failed part of isearch input, Robert J. Chassell, 2007/07/11
- RE: highlight failed part of isearch input, Drew Adams, 2007/07/11
- Re: highlight failed part of isearch input, Juri Linkov, 2007/07/11
- Re: highlight failed part of isearch input, Robert J. Chassell, 2007/07/12
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/12
- Re: highlight failed part of isearch input, Juri Linkov, 2007/07/12
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/13
- Re: highlight failed part of isearch input,
Juri Linkov <=
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/15
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/23
- Re: highlight failed part of isearch input, Juri Linkov, 2007/07/14
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/15
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/12
- Re: highlight failed part of isearch input, Richard Stallman, 2007/07/11
- RE: highlight failed part of isearch input, Drew Adams, 2007/07/11
Re: highlight failed part of isearch input, Masatake YAMATO, 2007/07/10