unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 15245@debbugs.gnu.org
Subject: bug#15245: Search and replace, but based on text properties (inclulding face properties)
Date: Mon, 2 Sep 2013 11:01:52 -0700 (PDT)	[thread overview]
Message-ID: <46bb3911-d691-4381-8174-67ad23ddf9e4@default> (raw)
In-Reply-To: <87d2or5erm.fsf@gmail.com>

> > It could be incorporated into vanilla Emacs.
> 
> 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.





  reply	other threads:[~2013-09-02 18:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  5:21 bug#15245: Search and replace, but based on text properties (inclulding face properties) Jambunathan K
2013-09-02 15:29 ` Drew Adams
2013-09-02 17:12   ` Jambunathan K
2013-09-02 18:01     ` Drew Adams [this message]
2013-09-02 18:25       ` Jambunathan K
2013-09-02 18:43         ` Drew Adams
2013-09-02 19:44           ` Juri Linkov
2013-09-02 20:03             ` Drew Adams
2013-11-15  4:55 ` Jambunathan K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46bb3911-d691-4381-8174-67ad23ddf9e4@default \
    --to=drew.adams@oracle.com \
    --cc=15245@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).