From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15245: Search and replace, but based on text properties (inclulding face properties) Date: Mon, 2 Sep 2013 11:01:52 -0700 (PDT) Message-ID: <46bb3911-d691-4381-8174-67ad23ddf9e4@default> References: <87r4d7yf1d.fsf@gmail.com> <0b79b9b5-706a-4739-b4a3-b6bd19aea0bf@default> <87d2or5erm.fsf@gmail.com> 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 1378145545 16088 80.91.229.3 (2 Sep 2013 18:12:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2013 18:12:25 +0000 (UTC) Cc: 15245@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 02 20:12:26 2013 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 1VGYbw-00088r-Pm for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Sep 2013 20:12:25 +0200 Original-Received: from localhost ([::1]:41501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGYbw-0001MX-B8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Sep 2013 14:12:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGYT0-0007gc-OG for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 14:03:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGYSs-0003io-6D for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 14:03:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGYSs-0003ia-01 for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 14:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VGYSr-0006wl-Pc for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 14:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Sep 2013 18:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15245 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15245-submit@debbugs.gnu.org id=B15245.137814492526628 (code B ref 15245); Mon, 02 Sep 2013 18:03:01 +0000 Original-Received: (at 15245) by debbugs.gnu.org; 2 Sep 2013 18:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:37767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGYRw-0006vQ-FV for submit@debbugs.gnu.org; Mon, 02 Sep 2013 14:02:04 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:19151) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGYRu-0006uv-Lj for 15245@debbugs.gnu.org; Mon, 02 Sep 2013 14:02:03 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r82I1tK9026074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Sep 2013 18:01:56 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r82I1t6Y027529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Sep 2013 18:01:55 GMT Original-Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r82I1tDI027520; Mon, 2 Sep 2013 18:01:55 GMT In-Reply-To: <87d2or5erm.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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:77913 Archived-At: > > It could be incorporated into vanilla Emacs. >=20 > Does this mean you are offering it up as a patch to Emacs? If *yes*, I > am willing to give it a test run. Yes, of course. I have offered my code generally. > Btw, can it convert the HTML rendered by eww in to let's say Oddmuse, > Creole or Markdown formats? No idea, and I know almost nothing about eww, Oddmuse, and Creole. Also, when you say "convert" it makes me realize that you asked about search and *replace*, not just search. Not sure what you have in mind there. To be clear, this feature does only search. It just limits the contexts to be searched to buffer zones that have given text or overlay properties. For example, you can search for `en' within zones that have either face `font-lock-keyword-face' or face `font-lock-comment-face' (or whatever). > By text properties, it need not necessarily be faces it can be any > other text property (that stores some data) Correct; it is not limited to property `face'. From the description: Besides relying on other code to set 'face' and other text properties for use with 'C-t', you can use command 'isearchp-put-prop-on-region' (outside of Isearch) to add a text property to a zone of text. By default, it applies the last property and value whose zones you searched using 'C-t', but a prefix argument lets you specify the property and value to apply. This gives you an interactive way to set up zones for text-property search ('C-t'). For property 'face', empty input removes all faces from the region. And for properties `face' and `font-lock-face', you can pick multiple faces, as in the example I mentioned above. Text is searched that has a face text (or perhaps overlay) property that includes any of the faces you choose.