From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nljlistbox2@gmail.com (N. Jackson) Newsgroups: gmane.emacs.bugs Subject: bug#20092: 24.4.91; False matches with incremental search in Info Date: Thu, 12 Mar 2015 00:31:56 -0300 Message-ID: <87zj7ix55f.fsf@moondust.localdomain> References: <87egov3udi.fsf@moondust.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426131206 7530 80.91.229.3 (12 Mar 2015 03:33:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2015 03:33:26 +0000 (UTC) To: 20092@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 12 04:33:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YVtry-0004w9-3G for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Mar 2015 04:33:10 +0100 Original-Received: from localhost ([::1]:57905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVtrx-00031a-AG for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Mar 2015 23:33:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVtrt-00031K-TX for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 23:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVtrq-0004gI-MW for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 23:33:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVtrq-0004gE-JO for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 23:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YVtrq-0006py-7l for bug-gnu-emacs@gnu.org; Wed, 11 Mar 2015 23:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nljlistbox2@gmail.com (N. Jackson) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Mar 2015 03:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20092-submit@debbugs.gnu.org id=B20092.142613112826212 (code B ref 20092); Thu, 12 Mar 2015 03:33:02 +0000 Original-Received: (at 20092) by debbugs.gnu.org; 12 Mar 2015 03:32:08 +0000 Original-Received: from localhost ([127.0.0.1]:43322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVtqx-0006oh-FL for submit@debbugs.gnu.org; Wed, 11 Mar 2015 23:32:07 -0400 Original-Received: from mail-ie0-f173.google.com ([209.85.223.173]:34877) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YVtqv-0006no-Bx for 20092@debbugs.gnu.org; Wed, 11 Mar 2015 23:32:05 -0400 Original-Received: by ieclw3 with SMTP id lw3so13121739iec.2 for <20092@debbugs.gnu.org>; Wed, 11 Mar 2015 20:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=0DVk8YeMHhLIX92kVyZOCsw3va1FfCozC9uUfR4W0jM=; b=0QakfC/Xl0k/HfCs1yJ6+/z58dMm/PntN+EZjmJBoNd09hyQUkWqpb2gnOmgosNkVk +p/Yy8q0xXZiCuOROgv/N0+PtbNW1LrdZN6Mp/P2h3Wzd3Zhuh9QoW1wvlHCAUZQlp1L NfxLbJ40d7zjSBimmtn09RJhv8Aa/QDPOoiJCGq3u1tsL0oMveB/0REtiPzELATKpPnQ xgoUsdMdOgJGeMoACkKrc567jnH/23KMAYZ13HUkgtZhpmI3eO/vEEyQ0TtHr68CLSa7 86aNANtC8vikK/AZRt3cNPP2pBJ3ZeG4sGvOeOe44D1YjGaL8AbwLVmerufHyXTM/qvI Z8bg== X-Received: by 10.50.50.142 with SMTP id c14mr69585273igo.42.1426131119496; Wed, 11 Mar 2015 20:31:59 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (blk-7-145-248.eastlink.ca. [71.7.145.248]) by mx.google.com with ESMTPSA id w3sm11107491igz.1.2015.03.11.20.31.57 for <20092@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 20:31:58 -0700 (PDT) In-Reply-To: <87egov3udi.fsf@moondust.localdomain> (N. Jackson's message of "Wed, 11 Mar 2015 21:57:29 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:100399 Archived-At: At 21:57 -0300 on Wednesday 2015-03-11, N. Jackson wrote: > In the top level node of Emacs Info, incremental search is matching text > that isn't there. > > My search text was "sage". Repeatedly pressing C-s, I get four or five > correct matches, then I end up in the "GNU C library functions and > macros" section where I get several false matches with point placed at > the end of the line. (E.g. On the entry "err: (libc)".) > > I'm guessing there is some invisible text there (I don't know how I can > check; switching to fundamental mode reveals nothing), but probably > I-search shouldn't be finding it. Further to my report, I did a bit of poking around. Setting the variable Info-hide-note-references to nil allows me to see the invisible text. An example of an entry that was showing a false match for "sage" was * err: (libc) and setting Info-hide-note-references to nil, this displays as * err: (libc)Error Messages. ^^^^ which at least shows what I-search was finding. For me the value of search-invisible is `open' (which I assume is the default). The bug does *not* manifest itself when I set search-invisible to nil. I found this function in info.el: #+BEGIN_SRC emacs-lisp (defun Info-isearch-filter (beg-found found) "Test whether the current search hit is a visible useful text. Return non-nil if the text from BEG-FOUND to FOUND is visible and is not in the header line or a tag table." (save-match-data (let ((backward (< found beg-found))) (not (or (and (not search-invisible) (if backward (or (text-property-not-all found beg-found 'invisible nil) (text-property-not-all found beg-found 'display nil)) (or (text-property-not-all beg-found found 'invisible nil) (text-property-not-all beg-found found 'display nil)))) ;; Skip node header line (and (save-excursion (forward-line -1) (looking-at "\^_")) (forward-line (if backward -1 1))) ;; Skip Tag Table node (save-excursion (and (search-backward "\^_" nil t) (looking-at "\^_\n\\(Tag Table\\|Local Variables\\)")))))))) #+END_SRC I don't know elisp, but if this function is relevant here (I have no idea if it is and I don't even know if runs in this context; I didn't try running the debugger yet as I don't yet know how) and if it is intended to make I-search ignore the invisible text, then the (not search-invisible) form looks suspect perhaps? (not 'open) => nil (not t) => nil (not nil) => t So here, for search-invisible to be `open' is equivalent to it being t which would explain the buggy behaviour that I see. Or am I missing something? Thanks.