bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9918: 24.0.90; lazy-highlighting in Info mode


From: Juri Linkov
Subject: bug#9918: 24.0.90; lazy-highlighting in Info mode
Date: Thu, 03 Nov 2011 21:56:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu)

> * "Isearch: foo"
> * "Isearch: foo [failing]"
> * "Isearch: foo [failing, overwrapped]"
> * "Isearch: foo [failing, initial node]"

Yes, moving all prefixes into suffixes and always displaying the
search string at the fixed position in the message avoids this problem
where prefixes shift the search string to the right in the message, so
its position jumps left and right during Isearch depending on the length
of the composite prefix that makes more difficult to concentrate on
the search string displayed in the message.

> This approach raises a question: how to show the _error_ flags to make
> them distinguishable from the _informative_ flags?
>
> One possibility is to show all the flags the same way.  After all, the
> fact that the errors deactivate the Isearch should be enough for the
> user to know what's going on, I think.

I think to show all the flags the same way is better.

Of course, this should be postponed for 24.2.  But now I'd like to fix
the original problem you reported.  I think we should remove
`(not isearch-error)' from `isearch-lazy-highlight-new-loop'.
This is over-optimization.  It can't know for sure beforehand
whether lazy-highlighting will be able to highlight matches
even when isearch-error is non-nil.

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2011-10-30 01:56:03 +0000
+++ lisp/isearch.el     2011-11-03 19:55:07 +0000
@@ -2674,7 +2721,6 @@ (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)
       (setq isearch-lazy-highlight-start-limit beg
            isearch-lazy-highlight-end-limit end)
       (setq isearch-lazy-highlight-window       (selected-window)
@@ -2692,7 +2738,7 @@ (defun isearch-lazy-highlight-new-loop (
       (unless (equal isearch-string "")
        (setq isearch-lazy-highlight-timer
              (run-with-idle-timer lazy-highlight-initial-delay nil
-                                  'isearch-lazy-highlight-update))))))
+                                  'isearch-lazy-highlight-update)))))
 
 (defun isearch-lazy-highlight-search ()
   "Search ahead for the next or previous match, for lazy highlighting.






reply via email to

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