From: Juri Linkov <juri@jurta.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 13402@debbugs.gnu.org
Subject: bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch]
Date: Thu, 21 Feb 2013 02:45:31 +0200 [thread overview]
Message-ID: <871ucaiirw.fsf@mail.jurta.org> (raw)
In-Reply-To: <20130220223759.GA2644@acm.acm> (Alan Mackenzie's message of "Wed, 20 Feb 2013 22:37:59 +0000")
>> The result is that the first space character is not lazy-highlighted.
>> I think this is wrong.
>
> :-). I'm not sure. It has a certain logic behind it. I think a missing
> lazy-highlight is much less disturbing than an obtrusive one.
Alan, I completely agree with you. Your logic makes perfect sense.
An obtrusive lazy-highlight is too disturbing.
But I also think that my logic makes sense as well
since a missing lazy-highlight is too bad.
Fortunately, it is possible to combine both logics
with a small patch that you can see below.
The key point is that the lazy-highlighting loop should start
from the same position where the main search function found
the beginning of the match!
Currently the boundary of the lazy-highlighting loop starts at the end
of the found match (the value of `(point)'). But the match found by
the main search function (and highlighted by the primary face `isearch')
begins at `isearch-other-end'. So currently they are mutually inconsistent.
This patch moves the boundary of lazy-highlighting from the end
of the found match to its beginning - like in the main search function.
Thus it brings the logic of `isearch-lazy-highlight-search' closer to
the logic of the main search function in `isearch-search'.
In the result of removing this inconsistency, this patch passes
the test case that you posted in your original bug report,
i.e. placing point at the start of the second paragraph
(" Each entry in a ....") and typing `C-s M-s C-e' (isearch-yank-line)
doesn't highlight the gap preceding the paragraph with lazy-highlight face.
And it also passes other tests that I tried.
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2013-02-01 23:38:41 +0000
+++ lisp/isearch.el 2013-02-21 00:45:05 +0000
@@ -2936,8 +2936,8 @@ (defun isearch-lazy-highlight-new-loop (
(setq isearch-lazy-highlight-window (selected-window)
isearch-lazy-highlight-window-start (window-start)
isearch-lazy-highlight-window-end (window-end)
- isearch-lazy-highlight-start (point)
- isearch-lazy-highlight-end (point)
+ isearch-lazy-highlight-start (or isearch-other-end (point))
+ isearch-lazy-highlight-end (or isearch-other-end (point))
isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
next prev parent reply other threads:[~2013-02-21 0:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 13:25 bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page Alan Mackenzie
2013-01-10 18:21 ` Andreas Schwab
2013-01-11 0:43 ` Juri Linkov
2013-02-13 9:47 ` Alan Mackenzie
2013-02-13 17:53 ` Juri Linkov
2013-02-13 21:59 ` Alan Mackenzie
2013-02-14 9:16 ` Juri Linkov
2013-02-14 20:09 ` bug#13402: 24.2.92 pretest: bugs in isearch-yank-line in info page. [Patch] Alan Mackenzie
[not found] ` <20130214200937.GA3336@acm.acm>
2013-02-14 23:53 ` Glenn Morris
2013-02-15 7:47 ` Juri Linkov
2013-02-15 10:10 ` Juri Linkov
2013-02-15 11:55 ` Alan Mackenzie
2013-02-15 13:20 ` Alan Mackenzie
2013-02-16 21:50 ` Juri Linkov
2013-02-17 10:03 ` Juri Linkov
2013-02-19 14:50 ` Alan Mackenzie
2013-02-20 10:49 ` Juri Linkov
2013-02-20 22:37 ` Alan Mackenzie
2013-02-21 0:45 ` Juri Linkov [this message]
2013-02-21 12:27 ` Alan Mackenzie
2013-02-21 17:09 ` Glenn Morris
2013-02-21 17:48 ` Juri Linkov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871ucaiirw.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=13402@debbugs.gnu.org \
--cc=acm@muc.de \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).