From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#25592: Feature request: sorting overlays Date: Tue, 7 Feb 2017 15:07:19 -0500 Message-ID: <4ce360e1-93b0-988d-89e0-9a5d58fa7d25@live.com> References: <837f5avzdm.fsf@gnu.org> <75813a2b-ba63-e356-d766-cd9ae77b28e2@live.com> <83mve4uxwr.fsf@gnu.org> <83tw8bt1mh.fsf@gnu.org> <1d90ade3-b0a4-f07a-d424-b052a68fd4a7@live.com> <83r33etluz.fsf@gnu.org> <21abc5a1-0777-cd33-ff26-2cd0853e9161@live.com> <83wpd47aqi.fsf@gnu.org> <31fe1609-78eb-6a03-762e-431fd7cfd987@live.com> <83o9yg77a4.fsf@gnu.org> <8be0ce54-f490-556b-4d84-3c1c9a146e34@live.com> <83mvdx6i0s.fsf@gnu.org> <63b6a300-4892-260a-2054-c922485ee192@live.com> <83inol6agx.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s9c0Sk0Vo1mvN9hfgSQdlh03fnbOGQNgJ" X-Trace: blaine.gmane.org 1486498095 16792 195.159.176.226 (7 Feb 2017 20:08:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2017 20:08:15 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: 25592@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 21:08:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cbC3c-00046t-OU for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2017 21:08:09 +0100 Original-Received: from localhost ([::1]:56183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbC3h-000687-Lz for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2017 15:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbC3b-00067q-EF for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 15:08:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbC3W-0007Fv-Dk for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 15:08:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32875) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbC3W-0007Eq-B8 for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 15:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cbC3W-0001qO-3u for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2017 15:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2017 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25592 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25592-submit@debbugs.gnu.org id=B25592.14864980577059 (code B ref 25592); Tue, 07 Feb 2017 20:08:02 +0000 Original-Received: (at 25592) by debbugs.gnu.org; 7 Feb 2017 20:07:37 +0000 Original-Received: from localhost ([127.0.0.1]:59307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbC37-0001pm-JN for submit@debbugs.gnu.org; Tue, 07 Feb 2017 15:07:37 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.10]:58745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbC35-0001pZ-0x for 25592@debbugs.gnu.org; Tue, 07 Feb 2017 15:07:36 -0500 Original-Received: from [128.30.9.127] ([128.30.9.127]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.184]) with ESMTPSA (Nemesis) id 0M6mdY-1cGWVI23vA-00wY2A; Tue, 07 Feb 2017 21:07:28 +0100 In-Reply-To: <83inol6agx.fsf@gnu.org> X-Provags-ID: V03:K0:Bcero+75PqBHFJt1jN+pKym60mmh9Bo1NqVjqSXKs1qhwAOKMh8 REkxCU3++5mo0zyl6PLQOIq4lntjzAjRvwUwCZcPE6jaH50GXk2QeKb7Mx1hraSDyhjSk3p tdKeUA51fcvSv3maGx95C/NdyOejANW8s8Erlajgj/B2y3rWy/K957WK17eZ+xBb4v/Lj5i FCuWSReXtuj9zoW8bzUdA== X-UI-Out-Filterresults: notjunk:1;V01:K0:8rdctltOaco=:QTF8foX32LSMX4JLTDhlql OAqrQTjmweKPSrSNdREek5uSZZdmKefoPiqUXuF3yVaaRCZxliVN7RUMon2b+Z7YHqItVHyaH xBRm0ckX8wccJVKZfDCnBQYZYTtVIjKfzH7BR1XOCVWAdAlgEdgFe4mNjzWko++cyXyLkv6mQ QVDaMtExqssLym6EXOO0B/sQkQOd7dLGpqUz3oJGGTLz4AW5QHZYdO2OamFOKhbEFHDy8/RRA Y9uBGtd0Q1d7baaGWsZiiAv2OIuPF9DSrkROkJDNAABT1EMmgoKiK5wNQiWZ/JW6IicmAc/wc BheDRymfLD/gmhF0PnTs246kAvlqwiDUtGhLoZiye2YWehSXbuoGzc+c/vpIkCxVvyUGl85AI MD9SmJEm8tGFEzD1uMPkqWGWO016+zIHwvTrkkZzGN75DcgT9c9IF3UHVcUfZmDV6iZ0Kri/g MeVb66JsT6M0wuM3zXrdQR2g6rfKy1qf2ovmBdfq5biTaZCmXZGi/0FVSrjMT6J7Rn7LE9tEc y4+7yJTOKW7Z1KnPjjaImv4DahWOF9hVLiPKwyPX8mxamdSSsw/Nb4NOFiuoJnrpnwCdDPoOJ hx1x1+4GaTWn27AmM/P1otYd+ls+sclTBy6b5amsj3KuItEb7fpoeldG5Ndvr2xiYjizD2taI 0nvvHU9ri181p5hNGZN2hqBL108cZCO9TVyAd8twYmxSNbOM8Z9OuMQGumUfwjt6f7tI= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:129099 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --s9c0Sk0Vo1mvN9hfgSQdlh03fnbOGQNgJ Content-Type: multipart/mixed; boundary="MwSRngehNVh5srWFlT9s6jEff9MAbEg2T"; protected-headers="v1" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Eli Zaretskii Cc: 25592@debbugs.gnu.org Message-ID: <4ce360e1-93b0-988d-89e0-9a5d58fa7d25@live.com> Subject: Re: bug#25592: Feature request: sorting overlays References: <837f5avzdm.fsf@gnu.org> <75813a2b-ba63-e356-d766-cd9ae77b28e2@live.com> <83mve4uxwr.fsf@gnu.org> <83tw8bt1mh.fsf@gnu.org> <1d90ade3-b0a4-f07a-d424-b052a68fd4a7@live.com> <83r33etluz.fsf@gnu.org> <21abc5a1-0777-cd33-ff26-2cd0853e9161@live.com> <83wpd47aqi.fsf@gnu.org> <31fe1609-78eb-6a03-762e-431fd7cfd987@live.com> <83o9yg77a4.fsf@gnu.org> <8be0ce54-f490-556b-4d84-3c1c9a146e34@live.com> <83mvdx6i0s.fsf@gnu.org> <63b6a300-4892-260a-2054-c922485ee192@live.com> <83inol6agx.fsf@gnu.org> In-Reply-To: <83inol6agx.fsf@gnu.org> --MwSRngehNVh5srWFlT9s6jEff9MAbEg2T Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-02-07 14:56, Eli Zaretskii wrote: > For the face property, no, because it can have many attributes, and > they must be merged. Likewise for before-string and after-string > properties. But still, these overlays are applied by the display > engine in a specific priority order (before-strings in the order of > increasing priority, after-strings in the decreasing order) at that > particular locations. So you need to do the same to produce the same > effect. Indeed, but I don't need to re-sort them at each position: I can just sor= t them once and for all, can't I? > But for other properties, like the display property, yes, you can > apply only the highest. Yup, that makes sense. =20 > And that was your original example, AFAIR. I don't remember; sorry if I was unclear :/ The face property is one of = the ones I care most about, because it's one of the few ones for which "t= ext-property-at" isn't enough. I will try to implement your approach of iterating over ranges of text. = Thanks for all the pointers! Independently of my use case, though, would = you object to a patch adding a function that takes a list of overlays fro= m the same buffer and sorts them? Cl=C3=A9ment. --MwSRngehNVh5srWFlT9s6jEff9MAbEg2T-- --s9c0Sk0Vo1mvN9hfgSQdlh03fnbOGQNgJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYmij3AAoJEPqg+cTm90wjDkIP/04ekznwKEsARfpxx8uD03RW fTx5xn1Heb8daBTqD9pOyUAlLltcqAFlnjHnUQ1qhYqC605YlwONAetGnVpru4jL 8arcA/dnmPjrQhKOpbCDeGbfHpMZysClH4ZwCgEwE69rh66svuaznnaScfLcFd8u eFa+HV46t3DR8bCXMolonmNhJlkJUxybEBBId2jSMVw18Q9MS/WgVa68+L/1nxO6 vBCql9mo891xfS1lizZZFDU3bVtt4iSZwzumjhokCUsbKjb5ZLXuUuTBuvbthR5h 88ifwyggN2HD2SA0Tse2Wulek6MDw3AqKDdar8uuQJ8YmWCLrbHCniajbl4WQscg n4vJwmBx4QyW5s4I5Mq2Cd7nB1/w2DrSYPS+UZX+BBYs5r6/nFSMcvvip2hJqvAt L7r4jEgdGG4HMop6M3r9u2P4EUrYDwRYwLGUASD1aOenObsDLRRzOQ6yjrpwYl9G BqaBbie9UGTU8JU4JoE7b50UMQH9zuyiQTgOe4wb4urmXArC5uvWl3UZVIqxqIOg jIHM8zHlfrHgshCfalCmJRhmiMQCZLFjAB0F9rKt9G3rhL8CfCN0V1qpXeVaEJQr lxxq8mVfXJHQw7CAGo4aqmjtPdUR+dc492eTRqZK7JgWinTLDpAoJMmKWeJD/tFf 3CncfzZHdNOkYvpAMA1z =sUN8 -----END PGP SIGNATURE----- --s9c0Sk0Vo1mvN9hfgSQdlh03fnbOGQNgJ--