From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Olson Newsgroups: gmane.emacs.bugs Subject: bug#10387: CODE wishlist: search-prop.el Date: Thu, 12 Apr 2012 20:29:13 -0700 Message-ID: References: <87wr9h2kju.fsf@cante.cante.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0ce0d07cd0b74904bd871400 X-Trace: dough.gmane.org 1334287795 2499 80.91.229.3 (13 Apr 2012 03:29:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2012 03:29:55 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 10387@debbugs.gnu.org, Jari Aalto To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 13 05:29:53 2012 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 1SIXCq-0008U0-EJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Apr 2012 05:29:52 +0200 Original-Received: from localhost ([::1]:58213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIXCp-0003xj-RV for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Apr 2012 23:29:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIXCm-0003xe-M6 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 23:29:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SIXCk-0008To-A1 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 23:29:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SIXCk-0008Tj-68 for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 23:29:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SIXDx-0008SG-Qw for bug-gnu-emacs@gnu.org; Thu, 12 Apr 2012 23:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Olson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Apr 2012 03:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 10387-submit@debbugs.gnu.org id=B10387.133428785632487 (code B ref 10387); Fri, 13 Apr 2012 03:31:01 +0000 Original-Received: (at 10387) by debbugs.gnu.org; 13 Apr 2012 03:30:56 +0000 Original-Received: from localhost ([127.0.0.1]:55423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIXDr-0008Rv-7O for submit@debbugs.gnu.org; Thu, 12 Apr 2012 23:30:56 -0400 Original-Received: from mail-bk0-f44.google.com ([209.85.214.44]:49402) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIXDo-0008Rn-V5 for 10387@debbugs.gnu.org; Thu, 12 Apr 2012 23:30:54 -0400 Original-Received: by bkuw5 with SMTP id w5so1971525bku.3 for <10387@debbugs.gnu.org>; Thu, 12 Apr 2012 20:29:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=APobgTfR5EqK3k7KkcbcrozT8o7H4qVB2x/91hWC9G0=; b=Vy+EL2UOINLcoad/4lczLY5dqnoZ1cI4z5/0G51WsOUgWsCdqUSKY92XdqhhA8JvnR fafkH0YkDWygzNoRucK9W98m/FR7fdo4ATwoOuwqSzTLANT6Dhjg22oZ7/YS85V1aYq/ a4hFJLRCojOKaCPUA7fEce8vT7D1VWC2jgwSUV+iUbmJ+vfuxSYXJvMbHh9h5YGp/zFY eDsD8aDzKaFhc1QCUf/ZbNFfrKAgs78LDpGbXIniAVl6xYwHhaGCc6ncLod+P6pAe0ZO 1KhWNN2glootgbN/G9bZyuUryh+9lEsI32mU5TxLxyJ/o8FqB4OgD2AHvXJh0x37mhyB sSQg== Original-Received: by 10.205.139.67 with SMTP id iv3mr39670bkc.8.1334287774299; Thu, 12 Apr 2012 20:29:34 -0700 (PDT) Original-Received: by 10.204.163.145 with HTTP; Thu, 12 Apr 2012 20:29:13 -0700 (PDT) X-Originating-IP: [99.116.250.80] In-Reply-To: X-Google-Sender-Auth: tGad2dh_wHD0U7iyvA-4B24AvTk X-Gm-Message-State: ALoCoQmnA9M67+Z2pZJWqjKSaKD5NPhFdmI25L7MsF7KKEaA1WmsB205ztghjFaqHZahqHp1DPr9 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58969 Archived-At: --000e0ce0d07cd0b74904bd871400 Content-Type: text/plain; charset=UTF-8 On Thu, Apr 12, 2012 at 2:55 PM, Stefan Monnier 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/ --000e0ce0d07cd0b74904bd871400 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Apr 12, 2012 at 2:55 PM, Stefan Monnier = <monnier@i= ro.umontreal.ca> wrote:
> I like this. =C2=A0Gnus uses text properties extensi= vely, and searching for
> them using the standard functions (`next-property-change' and frie= nds)
> 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 o= nly
searches forward. =C2=A0Is there some other difference I'm missing (oth= er
than the `cycle' which doesn't seem tremendously useful)?
<= div>
Differences compared to text-property-any:

=C2=A0- Includes helper functions 'search-property-forward' an= d 'search-property-backward' which move point and closely match the= interface and behavior of 'search-forward' and 'search-backwar= d'. =C2=A0(Except for 'count'.) =C2=A0The interactive use is ni= ce: when you need it, you really need it.

=C2=A0- I don't remember what the original use case= was for 'cycle'. =C2=A0Possibly to emulate the effect of hitting T= AB in Emacs Muse to go to the next URL (behavior that I would remove if I w= as starting again from scratch).

=C2=A0- In the initial release of the file to gnu.emacs= .sources, I wrote this blurb. =C2=A0Maybe there was a related shortcoming i= n 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=C2= =A0 |=C2=A0 http://mwolso= n.org/
--000e0ce0d07cd0b74904bd871400--