From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#9918: 24.0.90; lazy-highlighting in Info mode Date: Tue, 01 Nov 2011 01:15:54 +0200 Organization: JURTA Message-ID: <87vcr4pxau.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1320103137 8161 80.91.229.12 (31 Oct 2011 23:18:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Oct 2011 23:18:57 +0000 (UTC) Cc: 9918@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 01 00:18:53 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RL181-0002X7-16 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Nov 2011 00:18:53 +0100 Original-Received: from localhost ([::1]:37473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL180-0000YD-DZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Oct 2011 19:18:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL17x-0000Xd-Lf for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 19:18:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RL17w-0004DH-GW for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 19:18:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL17w-0004D2-9O for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 19:18:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RL1A5-0002zZ-OE for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 19:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Oct 2011 23:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9918 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9918-submit@debbugs.gnu.org id=B9918.132010324811476 (code B ref 9918); Mon, 31 Oct 2011 23:21:01 +0000 Original-Received: (at 9918) by debbugs.gnu.org; 31 Oct 2011 23:20:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL19r-0002z2-U4 for submit@debbugs.gnu.org; Mon, 31 Oct 2011 19:20:48 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL19p-0002yt-TI for 9918@debbugs.gnu.org; Mon, 31 Oct 2011 19:20:47 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id C1C636E8079; Mon, 31 Oct 2011 16:18:30 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7A156451C2E1; Mon, 31 Oct 2011 16:18:29 -0700 (PDT) In-Reply-To: (Dani Moncayo's message of "Mon, 31 Oct 2011 15:46:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 31 Oct 2011 19:21:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53377 Archived-At: > 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".