unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Olson <mwolson@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,
	10387@debbugs.gnu.org, Jari Aalto <jari.aalto@cante.net>
Subject: bug#10387: CODE wishlist: search-prop.el
Date: Thu, 12 Apr 2012 20:29:13 -0700	[thread overview]
Message-ID: <CAN4ruPi5ZJphKpgOw=Y1qJ3GMsi7dehKpBm4tSia=x7PJYfajQ@mail.gmail.com> (raw)
In-Reply-To: <jwvfwc8obvf.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

On Thu, Apr 12, 2012 at 2:55 PM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:

> > I like this.  Gnus uses text properties extensively, and searching for
> > them using the standard functions (`next-property-change' and friends)
> > is a hassle.
> > `search-property' looks like what I have needed in the past.
>
> text-property-any (and t-p-not-all) seems to do the same, except it only
> searches forward.  Is there some other difference I'm missing (other
> than the `cycle' which doesn't seem tremendously useful)?
>

Differences compared to text-property-any:

 - Includes helper functions 'search-property-forward' and
'search-property-backward' which move point and closely match the interface
and behavior of 'search-forward' and 'search-backward'.  (Except for
'count'.)  The interactive use is nice: when you need it, you really need
it.

 - I don't remember what the original use case was for 'cycle'.  Possibly
to emulate the effect of hitting TAB in Emacs Muse to go to the next URL
(behavior that I would remove if I was starting again from scratch).

 - In the initial release of the file to gnu.emacs.sources, I wrote this
blurb.  Maybe there was a related shortcoming in text-property-any at the
time.

Blurb: "It should work perfectly well both in the case where consecutive
characters have the property, and in that where a single character has
the property."

-- 
Michael Olson  |  http://mwolson.org/

[-- Attachment #2: Type: text/html, Size: 2094 bytes --]

  reply	other threads:[~2012-04-13  3:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  7:59 bug#10387: CODE wishlist: search-prop.el Jari Aalto
2012-04-12 20:07 ` Lars Magne Ingebrigtsen
2012-04-12 21:55   ` Stefan Monnier
2012-04-13  3:29     ` Michael Olson [this message]
2012-04-13 13:03       ` Stefan Monnier
2016-02-25  6:29         ` Lars Ingebrigtsen
2016-02-25 14:55           ` Drew Adams
2019-06-27 15:47   ` Lars Ingebrigtsen
2013-11-23 17:35 ` Drew Adams
2013-11-23 23:34   ` Juri Linkov
2013-11-24  0:00     ` Drew Adams
2013-11-24  1:01       ` Andreas Schwab
2013-11-24  1:07         ` Drew Adams
2013-11-24 11:36           ` Andreas Schwab
2013-11-24 16:51             ` Drew Adams
2013-11-24 17:04               ` Eli Zaretskii
2013-11-25  3:20                 ` Stefan Monnier
2013-11-25  9:55                   ` Andreas Schwab
2013-11-24 17:17               ` Andreas Schwab
2013-11-24 16:43           ` Stefan Monnier
2013-11-24 16:54             ` Drew Adams
2013-11-24 17:06               ` Eli Zaretskii
     [not found] <<87wr9h2kju.fsf@cante.cante.net>
     [not found] ` <<4e9dd7b9-9109-4f67-a9a2-d3c13635c566@default>
     [not found]   ` <<87eh664rrr.fsf@mail.jurta.org>
     [not found]     ` <<c05a5e24-a7be-4a23-9698-814b611e46e0@default>
     [not found]       ` <<878uwe62ae.fsf@igel.home>
     [not found]         ` <<7b510b39-00e7-49f6-a1ee-114652fd701c@default>
     [not found]           ` <<jwvfvqlwy23.fsf-monnier+emacsbugs@gnu.org>
     [not found]             ` <<dee893b9-9538-46ce-9c8e-18468026da14@default>
     [not found]               ` <<83vbzhbugs.fsf@gnu.org>
2013-11-24 17:49                 ` Drew Adams

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='CAN4ruPi5ZJphKpgOw=Y1qJ3GMsi7dehKpBm4tSia=x7PJYfajQ@mail.gmail.com' \
    --to=mwolson@gnu.org \
    --cc=10387@debbugs.gnu.org \
    --cc=jari.aalto@cante.net \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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).