From: Juri Linkov <juri@jurta.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 9918@debbugs.gnu.org
Subject: bug#9918: 24.0.90; lazy-highlighting in Info mode
Date: Tue, 01 Nov 2011 01:15:54 +0200 [thread overview]
Message-ID: <87vcr4pxau.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAH8Pv0g-G1RodnvTQR0xQvV9_ohzTi7PYX68yBm_AQ3GRnFDRQ@mail.gmail.com> (Dani Moncayo's message of "Mon, 31 Oct 2011 15:46:46 +0100")
> From "emacs -Q":
> 1. Open Info node "(emacs)Top" (C-h r).
> 2. Move point to the end of the first paragraph.
> 3. Type "C-s extensible".
>
> The word "extensible" (in the first line of the paragraph) should be
> lazy-highlighted, as happens if you repeat the experiment after doing
> "M-x text-mode".
The difference between this recipe in a normal buffer and an Info buffer
is in the line
(when (not isearch-error)
in `isearch-lazy-highlight-new-loop'. A normal Isearch starts
a new lazy highlighting loop even if there is no success
(`isearch-success' is nil) and no errors (`isearch-error' is nil).
But Info Isearch sets `isearch-error' to "initial node", so
`isearch-lazy-highlight-new-loop' doesn't start lazy-highlighting.
It seems with the error "initial node", it's still possible to
lazy-highlight other matches. So it's not a normal error,
and we can make an exception for this type of "error".
This will work with the following patch:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2011-10-30 14:41:20 +0000
+++ lisp/isearch.el 2011-10-31 23:12:01 +0000
@@ -2721,7 +2721,7 @@ (defun isearch-lazy-highlight-new-loop (
;; something important did indeed change
(lazy-highlight-cleanup t) ;kill old loop & remove overlays
(setq isearch-lazy-highlight-error isearch-error)
- (when (not isearch-error)
+ (when (or (not isearch-error) (equal isearch-error "initial node"))
(setq isearch-lazy-highlight-start-limit beg
isearch-lazy-highlight-end-limit end)
(setq isearch-lazy-highlight-window (selected-window)
But it's not good to hardcode it, so perhaps we should introduce
a special property for errors that are not quite an error,
and set it just for "initial node".
next prev parent reply other threads:[~2011-10-31 23:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 14:46 bug#9918: 24.0.90; lazy-highlighting in Info mode Dani Moncayo
2011-10-31 20:43 ` Eli Zaretskii
2011-10-31 21:00 ` Drew Adams
2011-10-31 21:08 ` Dani Moncayo
2011-10-31 21:13 ` Drew Adams
2011-10-31 21:30 ` Dani Moncayo
2011-10-31 21:39 ` Drew Adams
2011-10-31 23:15 ` Juri Linkov [this message]
2011-11-01 9:39 ` Dani Moncayo
2011-11-01 10:21 ` Dani Moncayo
2011-11-01 23:07 ` Juri Linkov
2011-11-02 7:54 ` Dani Moncayo
2011-11-03 9:07 ` Juri Linkov
2011-11-03 9:44 ` Dani Moncayo
2011-11-03 19:24 ` Dani Moncayo
2011-11-03 19:56 ` Juri Linkov
2011-11-03 20:43 ` Dani Moncayo
2011-11-03 21:11 ` Juri Linkov
2011-12-01 7:45 ` Juri Linkov
2011-11-19 21:04 ` 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=87vcr4pxau.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=9918@debbugs.gnu.org \
--cc=dmoncayo@gmail.com \
/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).