From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Text property searching Date: Mon, 16 Apr 2018 22:17:06 +0100 Message-ID: References: <87lgdo5bb3.fsf@mouse.gnus.org> <87in8r16b0.fsf@mouse.gnus.org> <87d0yz15a3.fsf@mouse.gnus.org> <87604r143y.fsf@mouse.gnus.org> <87604qx4tj.fsf@mouse.gnus.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c9cc6b046050569fdbf8e" X-Trace: blaine.gmane.org 1523913342 24297 195.159.176.226 (16 Apr 2018 21:15:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2018 21:15:42 +0000 (UTC) Cc: emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 16 23:15:38 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8BTJ-00066f-LH for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2018 23:15:33 +0200 Original-Received: from localhost ([::1]:44476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8BVQ-0006gg-AQ for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2018 17:17:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8BVE-0006fu-WE for emacs-devel@gnu.org; Mon, 16 Apr 2018 17:17:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8BV9-00043L-UG for emacs-devel@gnu.org; Mon, 16 Apr 2018 17:17:32 -0400 Original-Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]:39450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8BV9-00043D-Ot for emacs-devel@gnu.org; Mon, 16 Apr 2018 17:17:27 -0400 Original-Received: by mail-qt0-x22c.google.com with SMTP id l8so13144641qtp.6 for ; Mon, 16 Apr 2018 14:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6cRYnINbjKjrHZERgmKMzHtURMqui9q1wd4oOa7dd7k=; b=nRvUlu6iO92P/wmca+tkErtnLNpzY1l91gRQJW35/fEf4XLZ8SH4GnTXmYNQDBCFFH Qx5XP1cdKGYSlOMEoXkRLd+6emOmiTj2mZlxdWQI1ZXvpZHQduECL/jAdny4RzZOsRl6 2b+XUeZ8DHnspvtnVraVeXkrwQ8E8yw+xdAAFkK34NFUGTfsO0Da4kq4v2jVSxWZ41+g eTe29ZApllgwD9lE/2gCPt+WUY02RsyQP80d0H0ylGUbdj67GNnPLCnFs0uR4bW5cRjQ bOa1hxI4EIkts8ffCiGcr/LKc8TBaW35ClMdqzb2u8rIXNxJMjAR5OH2flFsvLAC35QN S3sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6cRYnINbjKjrHZERgmKMzHtURMqui9q1wd4oOa7dd7k=; b=OVJzJP2ZoUvmuT+r75zWrJr8QGEYXfgZ3m4AEmRIBAO0LgmCDERaZTbCToRi01H1vb Ysxpp6idc+gUBVpmjPm2+71Oo6RpMZdyOB0/hNWHqIbao/eZw4KtLINObhgkMez6Pm1n 7Ttjl2gUtP5W4bxcNIgw+H6BFovLUawd7jblVAsCfv16kXFjCxzL/lZK1/CQ1dZEE753 zO19XxxZ4XI4KjzMFzPkRMqJ0mcdwp1WCzuKlSfFK2OpY0JFvn30MYTgzUQlVdTtw7CS S8nExcQIv/4BQkVnPq8PpMGJtCRgYGzVbxxOawdMLQOL1IzA35L7IvPVM/qIPxZrgYkR f6fA== X-Gm-Message-State: ALQs6tAZI638yG1lxA+QLieQ+wGclNq79XDMkkQqdIetoE+28gpsnufX 7ARBdxbt+w03BYfhyCohAKUeOxr4pZ1Mi+oQA938pb8q X-Google-Smtp-Source: AIpwx48ZiZbrRGpNqKOJajEp5ixCbB7U4oD4EfO6FeFm099XDOJHKDAOy7qy6Euox/vhRqY1WIhrFzxi8oPej5SwLS8= X-Received: by 10.200.15.150 with SMTP id b22mr5221743qtk.301.1523913447194; Mon, 16 Apr 2018 14:17:27 -0700 (PDT) Original-Received: by 10.12.148.200 with HTTP; Mon, 16 Apr 2018 14:17:06 -0700 (PDT) In-Reply-To: <87604qx4tj.fsf@mouse.gnus.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224685 Archived-At: --f403045c9cc6b046050569fdbf8e Content-Type: text/plain; charset="UTF-8" On Mon, Apr 16, 2018 at 9:40 PM, Lars Ingebrigtsen wrote: > > So I think it might make sense to just leave that complication out of > this function, because it's rather obscure (categories and stuff that > sounds way too complicate :-)). FWIW this goes to 2 (with-temp-buffer (progn (insert "foo bar zot") (put-text-property 2 3 'face nil) (put-text-property 5 6 'face 'bold) (goto-char (point-min)) (goto-char (next-property-change (point))))) but fair enough, it can always be added later with minimum breakage I think. Though if it's not super-complicated to implement we would be missing a good oportunity to cover a corner case, however obscure. Precisely one that next-single-property-change makes it hard to handle. --f403045c9cc6b046050569fdbf8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On M= on, Apr 16, 2018 at 9:40 PM, Lars Ingebrigtsen <larsi@gnus.org>= wrote:

So I think it might make sense to just leave that complication out of
this function, because it's rather obscure (categories and stuff that sounds way too complicate :-)).

FWIW this g= oes to 2

(with-temp-buffer
=C2=A0 (= progn
=C2=A0 =C2=A0 (insert "foo bar zot")
= =C2=A0 =C2=A0 (put-text-property 2 3 'face nil)
=C2=A0 =C2=A0= (put-text-property 5 6 'face 'bold)
=C2=A0 =C2=A0 (goto-= char (point-min))
=C2=A0 =C2=A0 (goto-char (next-property-change = (point)))))

but fair enough, it can always b= e added later with minimum breakage I think. Though
if it's n= ot super-complicated to implement we would be missing a good oportunity
to cover a corner case, however obscure. Precisely one that=C2=A0
next-single-property-change makes it hard to handle.

=

--f403045c9cc6b046050569fdbf8e--