From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: `search-invisible' and text property `invisible' Date: Thu, 27 Jun 2013 13:53:52 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372366442 2801 80.91.229.3 (27 Jun 2013 20:54:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2013 20:54:02 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 27 22:54:02 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UsJCb-0003f5-L7 for ged-emacs-devel@m.gmane.org; Thu, 27 Jun 2013 22:54:01 +0200 Original-Received: from localhost ([::1]:47392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsJCb-0003fU-C1 for ged-emacs-devel@m.gmane.org; Thu, 27 Jun 2013 16:54:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsJCY-0003fN-D2 for emacs-devel@gnu.org; Thu, 27 Jun 2013 16:53:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsJCX-0006Ym-73 for emacs-devel@gnu.org; Thu, 27 Jun 2013 16:53:58 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsJCW-0006YM-US for emacs-devel@gnu.org; Thu, 27 Jun 2013 16:53:57 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5RKla4C007364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 Jun 2013 20:47:37 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5RKrrai012577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 27 Jun 2013 20:53:54 GMT Original-Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5RKrrx0026890 for ; Thu, 27 Jun 2013 20:53:53 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161154 Archived-At: Current behavior for `search-invisible' values: t - Finds any invisible-text match, whether due to an overlay property or a text property. You cannot *see* the text found, but you can see where it is (i.e., situate it relative to surrounding text that is visible). open - Finds an invisible match only if due to an overlay. Only overlay-induced invisible text can be opened, so that you can see the matched text. But there is no technical reason why `open' could not at least do what `t' does: find invisible text no matter how it is made invisible. IOW, it could *open* invisible text due to an overly and just *find* (without opening) invisible text due to text property `invisible'. Would that be more useful? A priori, I think so. But perhaps there are good arguments not to do it? The fix is trivial, AFAICT. In `isearch-isearch', change this: (or (eq search-invisible t) (not (isearch-range-invisible (match-beginning 0) (match-end 0)))) to this: search-invisible Easy to try, to see what you think. [Yes, the typical use case for matching hidden text is what `open' was designed for (outlines etc.). But why not let `open' be at least as good as `t' at finding invisible text of any kind?]