Subject: RE: bug#15245: Search and replace, but based on text properties (inclulding face properties)

From: Drew Adams <[email-masked]>
Date: Mon, 2 Sep 2013 08:29:14 -0700 (PDT)

> The underlying use-case on how such a feature could be put to good use
> is explained in the following bug (which is filed against eww)
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15244

FWIW, this feature is available in isearch+.el since 2011.
It could be incorporated into vanilla Emacs.
>From the Commentary:

;;  * Ability to search within character-property zones.  Example:
;;    search within zones having a `face' text property with a value
;;    of `font-lock-comment-face' or `font-lock-string-face'.  Search
;;    overlays or text properties.  From within Isearch: `C-t' (or
;;    `C-M-t' for regexp search).  First time, or with a prefix
;;    argument, you are prompted for the property and its values.  See
;;    the doc string of command `isearchp-char-prop-forward'.
;;
;;  * 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 arg 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.

Code: http://www.emacswiki.org/emacs/download/isearch%2b.el
More description: http://www.emacswiki.org/IsearchPlus