GNU logs - #34764, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 05 Mar 2019 22:16:02 +0000
Resent-Message-ID: <handler.34764.B.155182413013080 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 34764 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs <bug-gnu-emacs@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.155182413013080
          (code B ref -1); Tue, 05 Mar 2019 22:16:02 +0000
Received: (at submit) by debbugs.gnu.org; 5 Mar 2019 22:15:30 +0000
Received: from localhost ([127.0.0.1]:33560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1ILR-0003Ou-Q7
	for submit <at> debbugs.gnu.org; Tue, 05 Mar 2019 17:15:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34858)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cpitclaudel@HIDDEN>) id 1h1ILP-0003Oh-N1
 for submit <at> debbugs.gnu.org; Tue, 05 Mar 2019 17:15:28 -0500
Received: from lists.gnu.org ([209.51.188.17]:54897)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <cpitclaudel@HIDDEN>)
 id 1h1ILH-0007Wr-6I
 for submit <at> debbugs.gnu.org; Tue, 05 Mar 2019 17:15:20 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49226)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <cpitclaudel@HIDDEN>) id 1h1ILG-0007ws-9V
 for bug-gnu-emacs@HIDDEN; Tue, 05 Mar 2019 17:15:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cpitclaudel@HIDDEN>) id 1h1ILA-0007TD-3o
 for bug-gnu-emacs@HIDDEN; Tue, 05 Mar 2019 17:15:15 -0500
Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:43148)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <cpitclaudel@HIDDEN>)
 id 1h1IL4-0007QJ-Of
 for bug-gnu-emacs@HIDDEN; Tue, 05 Mar 2019 17:15:08 -0500
Received: by mail-qt1-x835.google.com with SMTP id y4so10686554qtc.10
 for <bug-gnu-emacs@HIDDEN>; Tue, 05 Mar 2019 14:15:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:subject:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=GIwuXZmUQsaDBCJyDKVAXap/CKcMOU1OVKziItbPsWk=;
 b=TrId3RKQgIOpsfS8mjV8znI15MRdNZPtzobbQ6BmFR3RZwk2OzorVIO3gNCV1g/ouh
 ssvYBo4P3srLW16i+IzYO94I47Bi308P27mVIFnZYAaa9hG1Jq2bCD2lF+KVhSoeYyqd
 5udtVQBUxFJhjPn/Nvu3BZKC5vXF5q4+l27rIrQElxqmReRvmY0EgH0Yipw/KQx4FaJB
 +kAz1D6JWo4tBwWnbaNOC+Kg2FmJrmi+O/nwq4hxQnxdtBaiudJyHWGGE5ArEnFqtEYo
 f+Umn28n0MVJ4DVeUc9f824+k8Zlodnt7ZPymVBS8YwKTKAwtnepd3QyMl8bqx504sMn
 WwzQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:subject:message-id:date:user-agent
 :mime-version:content-language:content-transfer-encoding;
 bh=GIwuXZmUQsaDBCJyDKVAXap/CKcMOU1OVKziItbPsWk=;
 b=MzMDcbwgfsjRT2a6tPZAbVJEjikEaz7DuE4HH96HSeJcYcUx5Yua5AVR71BUtBxXhB
 wiPxPtW+DkiYxOsKOixqU2qcT6I5r1777UkAmc1AeE2qNR6jMVgFErNji0SImSQLavoG
 TX9LGrAB9NVeinmTubcO5arAK2ia2+UAKIB+iok9h7U3srSIiBEHy70J0wCJRZHupHah
 ay1BnyUgTRjAWUygkmi+8QBrROFpdAeQUbpl6L4kOuf9nhLWi15uAHeeSxiiRNsQ5vf/
 eyl/719PSoBYWOlfh7JGpemoEiEvwqaWXFy5pksCmpF5MbBvS652l1aZsyJsYAxVFOAx
 iMRw==
X-Gm-Message-State: APjAAAVjt4UhHMOJawVLS39ekKe06vuOr18X+/scgD2NwDYBgUn/qOmA
 lvSof7/BsD+s+FMfkuHssyzSbWTg
X-Google-Smtp-Source: APXvYqz+fURPO0+Gdi+cvSdvmVL+VSNpJlBc3a+QgfqVperJBLfvSHqnfabHaz4wYwIGKB1dSOan9g==
X-Received: by 2002:aed:23c8:: with SMTP id k8mr3247317qtc.101.1551824104581; 
 Tue, 05 Mar 2019 14:15:04 -0800 (PST)
Received: from [128.30.10.34] (30-10-34.wireless.csail.mit.edu. [128.30.10.34])
 by smtp.googlemail.com with ESMTPSA id p15sm7084310qta.81.2019.03.05.14.15.04
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 05 Mar 2019 14:15:04 -0800 (PST)
From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Message-ID: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
Date: Tue, 5 Mar 2019 17:15:03 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::835
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi all,

When turned off, prettify-symbols-mode removes 'composition' from font-lock-extra-keywords, but not prettify-symbols-start or prettify-symbols-end; as a result, every time prettify-symbols-mode is turned on, it adds two new elements to font-lock-extra-keywords.

(I ran into this issue because I added a watcher on font-lock-extra-keywords to debug an intermittent font-lock problem, and the increasingly long lists of prettify-symbol-* entries made things harder to read).

I'm happy to provide a patch, but I'm a bit puzzled by the implementation:

    (remove-hook 'post-command-hook #'prettify-symbols--post-command-hook t)
    (when prettify-symbols--keywords
      (font-lock-remove-keywords nil prettify-symbols--keywords)
      (setq prettify-symbols--keywords nil))
    (when (memq 'composition font-lock-extra-managed-props)
      (setq font-lock-extra-managed-props (delq 'composition
                                                font-lock-extra-managed-props))
      (with-silent-modifications
        (remove-text-properties (point-min) (point-max) '(composition nil))))))

Would it be simpler to just call font-lock-unfontify-region-function and remove all three properties from font-lock-extra-managed-props?

Cheers,
Clément.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-02-28 built on clem-w50-mint
Repository revision: 5d60229bf1a9a496102fc2a3ef9e57dcce7bef10
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Linux Mint 19.1




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Subject: bug#34764: Acknowledgement (prettify-symbols-mode pollutes
 font-lock-extra-keywords)
Message-ID: <handler.34764.B.155182413013080.ack <at> debbugs.gnu.org>
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
X-Gnu-PR-Message: ack 34764
X-Gnu-PR-Package: emacs
Reply-To: 34764 <at> debbugs.gnu.org
Date: Tue, 05 Mar 2019 22:16:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 34764 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
34764: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34764
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 05 Mar 2019 23:55:02 +0000
Resent-Message-ID: <handler.34764.B34764.155183007723797 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>, 34764 <at> debbugs.gnu.org
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.155183007723797
          (code B ref 34764); Tue, 05 Mar 2019 23:55:02 +0000
Received: (at 34764) by debbugs.gnu.org; 5 Mar 2019 23:54:37 +0000
Received: from localhost ([127.0.0.1]:33608 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1JtM-0006Bl-Se
	for submit <at> debbugs.gnu.org; Tue, 05 Mar 2019 18:54:37 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:41736)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1h1JtK-0006BW-Bp
 for 34764 <at> debbugs.gnu.org; Tue, 05 Mar 2019 18:54:35 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x25NsSiI129369;
 Tue, 5 Mar 2019 23:54:28 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=c+OYY0EYI6Tmvs+Y9ERR7Ny8AlB55Tswx7zRMcEdPaQ=;
 b=xOd7vp2QP5/lWEutoZfXhNdvWFpo/Q5d23O7WDiqLjcBx8rwdvx5AVltWXZXxepvioYe
 j82klNXJ9uPvz11Utxn8SEOo6S0CMbORLVYFwtOU+zWSwmkiIzY4i3NAQpCIPF384Uyx
 i64yEhp2bVh+gCkEZ7n/PGKy/mFV0M7oPR/YpR45LcRkHT2hrPmuair7T95BPqNFLjFO
 5SWWMh60NO5UnsUAO044YfjtqCcVk0jIwzGKivf7eJxcTJ06b3+2vGTg9qzHdO4vH998
 jEoUeFm3qYGHjOVbbOupiDKAhjrwdelIVc5R0BLhX3jwW55IVMbnnNDmu9bLKgGNDpZt Qw== 
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp2130.oracle.com with ESMTP id 2qyfbe8yra-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 05 Mar 2019 23:54:28 +0000
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x25NsRuV000397
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 5 Mar 2019 23:54:27 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x25NsRWB020720;
 Tue, 5 Mar 2019 23:54:27 GMT
MIME-Version: 1.0
Message-ID: <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
Date: Tue, 5 Mar 2019 15:54:26 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
In-Reply-To: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4810.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9186
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=925 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1903050154
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I'm a bit puzzled by the implementation:
>=20
> (remove-hook 'post-command-hook
>              #'prettify-symbols--post-command-hook t)
>     (when prettify-symbols--keywords
>       (font-lock-remove-keywords nil prettify-symbols--keywords)
>       (setq prettify-symbols--keywords nil))
>     (when (memq 'composition font-lock-extra-managed-props)
>       (setq font-lock-extra-managed-props
>             (delq 'composition font-lock-extra-managed-props))
>       (with-silent-modifications
>         (remove-text-properties (point-min) (point-max)
>                                 '(composition nil))))))

I'm ignorant wrt prettify-symbols stuff.  But to me
it smells like a bug for some optional code (e.g. a
mode) to change a general setting such as `composition'
for `font-lock-extra-managed-props' etc. when it's done.

Should prettify-* assume it's the only code that cares
about property `composition'?  Or that it was the one
that added/set it in the first place?

Typically, I use a library-specific property instead
(e.g. `my-composition') and do whatever is needed to
give that property an effect like the general (global)
property, without interfering with that general property.

Maybe that's not appropriate for prettify-*.  Dunno.

Or I keep track of the initial state before adding
`composition', and then reset that property only if it
wasn't used to begin with (i.e., restore its value).

But that's not foolproof either, since some other code
can affect things after prettify-* is turned on, so
restoring to the state before it was turned on isn't
necessarily TRT.

Maybe such a save/restore approach is not easy/possible
for prettify-*.  Dunno.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 06 Mar 2019 03:51:02 +0000
Resent-Message-ID: <handler.34764.B34764.155184423912747 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>, 34764 <at> debbugs.gnu.org
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.155184423912747
          (code B ref 34764); Wed, 06 Mar 2019 03:51:02 +0000
Received: (at 34764) by debbugs.gnu.org; 6 Mar 2019 03:50:39 +0000
Received: from localhost ([127.0.0.1]:33658 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1NZm-0003JX-Ot
	for submit <at> debbugs.gnu.org; Tue, 05 Mar 2019 22:50:39 -0500
Received: from mail-qt1-f172.google.com ([209.85.160.172]:45277)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cpitclaudel@HIDDEN>) id 1h1NZk-0003Iy-5z
 for 34764 <at> debbugs.gnu.org; Tue, 05 Mar 2019 22:50:37 -0500
Received: by mail-qt1-f172.google.com with SMTP id d18so11388828qtg.12
 for <34764 <at> debbugs.gnu.org>; Tue, 05 Mar 2019 19:50:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=6Ut6iVGkDeeGz8ghw9wVK3OksxhskDiCjLUbAnB5zAY=;
 b=qU+PG/ntSDiFMPoezFRFwjnZOOV2KDmv3RKzgAYudVIwwuRyOkgZYzS5rU/plnWbFM
 YX8gss4HdQwmx4tTRFvLKpcEEufGb44C9h2WyR7Po3536MleYSlpcjp8qpSwBvnxUzHJ
 jrgUemMdN6+O0JyyMaGonbzFkRtbPO96VEtn7LH8x5sqfjnEnhhVV7HDjLukBEJkbvhF
 Qfl9lSZ70/+Eo/MjzRu/NSUQ4pJEMVozEhX2EkzKebYzaE/CBAM0uIvn4o557zQVEIyO
 vbOlKWJrBoX+lWNsU6+S7l26GXN/uM13TjyYxMMWb2Gl+WAWBdZI39YAer+fv0fnf75Y
 bd5g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=6Ut6iVGkDeeGz8ghw9wVK3OksxhskDiCjLUbAnB5zAY=;
 b=F3/hbhMhcNRxE8XvZhasEq9FRQpmf53TInWHO9M/WkfQ+NFzTK/bU/5RiI6rFLhoCw
 t5sTZo6dN/6LMnP95EciaLAyB2QvicRSEWhv9FyO835jrycrb6vAcfWXIKvuFEW+5Tp0
 7gaZftqMRANbtNoP4MmtvVp78xo+Arh/X7ToQqx8mSgzyAeTwm5ZiBqqZpXs6VbZcjmR
 h914Ty0gq3H7kF4v1nY7xVXml8n+yq9vkDeLmUo6aZ0ge/dFKWmN4h8lUqKUuE4AJU7E
 EUZRU+BFwKOyHW6Qt3wgYeLC446J9blUESmHVjDBK2xVjMpxj+yUBB1S0rOHLSW76FqE
 fegQ==
X-Gm-Message-State: APjAAAXPXUz7sd7CEVR3jAo0GcyG5AG4woI69S1RDfzqwztqHxeehtPC
 sizqzJXMGSW/Tpc+BofRqCcMp3Iq
X-Google-Smtp-Source: APXvYqyOOp4yUwqjERWAz3tBcSrG7fotDwZ7o7JOAVqeMbZgCYQSeugZPiIXrzOtWkViqizjcHfD6g==
X-Received: by 2002:ac8:19e3:: with SMTP id s32mr3943276qtk.287.1551844230384; 
 Tue, 05 Mar 2019 19:50:30 -0800 (PST)
Received: from ?IPv6:2601:184:4180:66e7:68f1:6275:fdcf:c833?
 ([2601:184:4180:66e7:68f1:6275:fdcf:c833])
 by smtp.googlemail.com with ESMTPSA id i33sm309472qti.74.2019.03.05.19.50.28
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 05 Mar 2019 19:50:29 -0800 (PST)
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Message-ID: <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
Date: Tue, 5 Mar 2019 22:50:28 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.1
MIME-Version: 1.0
In-Reply-To: <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Drew,

On 05/03/2019 18.54, Drew Adams wrote:
> I'm ignorant wrt prettify-symbols stuff.  But to me
> it smells like a bug for some optional code (e.g. a
> mode) to change a general setting such as `composition'
> for `font-lock-extra-managed-props' etc. when it's done.

Thanks for pointing this out.  I agree that it's an issue, though fairly orthogonal to the specific issue I created the bug for (the two properties I would like to see removed from fl-extra-managed-props are both adequately prefixed with `prettify-symbol-').

> Should prettify-* assume it's the only code that cares
> about property `composition'?  Or that it was the one
> that added/set it in the first place?

Indeed, this general problem has dogged me in a number of plugins I wrote, too.

> Typically, I use a library-specific property instead
> (e.g. `my-composition') and do whatever is needed to
> give that property an effect like the general (global)
> property, without interfering with that general property.

I never thought about this solution.  This is great actually!   I'm aware of char-property-alias-alist, but I never quite realized that it provided an elegant solution to the problem of restoring font-lock-extra-managed-props when disabling a minor mode (the only user in the emacs source tree seems to befont-lock).  Is that the mechanism you had in mind?

> Maybe that's not appropriate for prettify-*.  Dunno.
> 
> Or I keep track of the initial state before adding
> `composition', and then reset that property only if it
> wasn't used to begin with (i.e., restore its value).
> 
> But that's not foolproof either, since some other code
> can affect things after prettify-* is turned on, so
> restoring to the state before it was turned on isn't
> necessarily TRT.
>
> Maybe such a save/restore approach is not easy/possible
> for prettify-*.  Dunno.

Right, I think that approach is doomed, because modes are not enable and disabled in a well-parenthesized manner (you can enable A, enable B, disable A, and disable B)

Thanks for the cool idea about char-property-alias-alist!
Clément.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 06 Mar 2019 06:24:02 +0000
Resent-Message-ID: <handler.34764.B34764.155185339628299 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>, 34764 <at> debbugs.gnu.org
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.155185339628299
          (code B ref 34764); Wed, 06 Mar 2019 06:24:02 +0000
Received: (at 34764) by debbugs.gnu.org; 6 Mar 2019 06:23:16 +0000
Received: from localhost ([127.0.0.1]:33678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1PxT-0007MN-P9
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2019 01:23:16 -0500
Received: from userp2130.oracle.com ([156.151.31.86]:42996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1h1PxS-0007Lx-IN
 for 34764 <at> debbugs.gnu.org; Wed, 06 Mar 2019 01:23:15 -0500
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x266Is8P009305;
 Wed, 6 Mar 2019 06:23:08 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=4hKfO6+bWs+7AWshNRUDzMMA5i8f6GS0KC7iBoaKaHU=;
 b=AwKUXRxmlbXU7X+RXVBsFsihYBSsGcdXjZ4NySUd+t9i3zHCr6Uw8TssjWgMjQG/Q9tA
 fRJ8ne/A377+KnyQyjeJuZz8mDZEaDD7JGOidX/7zw73qZ8Vz8td9X8uzCsy3fKba0Ru
 Fuu26LIFX5hFFmbs7QO28U4SXHX4Q//u9cos20XY7CCbIwH32xYOS+ULypc/qvRGBAqM
 tJdIwyYlWxuKDs0clHLf/F8Ks6EyXKGffTlBDYaiDDFpfdjGVLDkqRQHl5jKGWIFp/tV
 c3R/t1qb+pfOWMKFxxtp/AFJHvT8RMn9fKKESDsuEp36PveiaZnn0Z03GCPETKFBy4fT LA== 
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by userp2130.oracle.com with ESMTP id 2qyh8u9tnj-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 Mar 2019 06:23:08 +0000
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x266N8Y9025251
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 6 Mar 2019 06:23:08 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x266N7ah008103;
 Wed, 6 Mar 2019 06:23:08 GMT
MIME-Version: 1.0
Message-ID: <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
Date: Tue, 5 Mar 2019 22:23:06 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
 <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
In-Reply-To: <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4810.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9186
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=524 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1903060043
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > Typically, I use a library-specific property instead
> > (e.g. `my-composition') and do whatever is needed to
> > give that property an effect like the general (global)
> > property, without interfering with that general property.
>=20
> I never thought about this solution.  This is great actually!   I'm
> aware of char-property-alias-alist, but I never quite realized that it
> provided an elegant solution to the problem of restoring font-lock-
> extra-managed-props when disabling a minor mode (the only user in the
> emacs source tree seems to befont-lock).  Is that the mechanism you had
> in mind?

No, in fact I wasn't aware of `char-property-alias-alist'. ;-)

I just meant in some way to try to have a library-specific
property control or replace a general property.  I don't
have in mind a general mechanism for doing that.

> > Maybe that's not appropriate for prettify-*.  Dunno.
> >
> > Or I keep track of the initial state before adding
> > `composition', and then reset that property only if it
> > wasn't used to begin with (i.e., restore its value).
> >
> > But that's not foolproof either, since some other code
> > can affect things after prettify-* is turned on, so
> > restoring to the state before it was turned on isn't
> > necessarily TRT.
> >
> > Maybe such a save/restore approach is not easy/possible
> > for prettify-*.  Dunno.
>=20
> Right, I think that approach is doomed, because modes are not enable
> and disabled in a well-parenthesized manner (you can enable A, enable
> B, disable A, and disable B)

Yes.  But it kinda depends on how "big", longlasting or
important a (minor) mode is.  If it's something that
you tend to leave on a lot, as a basic Emacs customization
then you can sometimes live with just restoring the
previously ~virgin state when you toggle it off briefly.

But yeah, it depends.
=20
> Thanks for the cool idea about char-property-alias-alist!

It was your idea!  Let us know how you make do with it.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 06 Mar 2019 06:51:01 +0000
Resent-Message-ID: <handler.34764.B34764.15518550596937 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>, 34764 <at> debbugs.gnu.org
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.15518550596937
          (code B ref 34764); Wed, 06 Mar 2019 06:51:01 +0000
Received: (at 34764) by debbugs.gnu.org; 6 Mar 2019 06:50:59 +0000
Received: from localhost ([127.0.0.1]:33689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1QOJ-0001np-8o
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2019 01:50:59 -0500
Received: from mail-qk1-f177.google.com ([209.85.222.177]:42569)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cpitclaudel@HIDDEN>) id 1h1QOH-0001nY-2n
 for 34764 <at> debbugs.gnu.org; Wed, 06 Mar 2019 01:50:57 -0500
Received: by mail-qk1-f177.google.com with SMTP id y140so6205610qkb.9
 for <34764 <at> debbugs.gnu.org>; Tue, 05 Mar 2019 22:50:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=MG+I+vl8KX0wHN3+D4H2A/T/cdKBcQNzLYBm8GH7bmY=;
 b=tQCKzKDqfJHzlpW2mX2IN0aaemzd/gTKsO+Q3EcfydeKFRNxzFt1Tg85331RPs2KyR
 JbG/8yvV1BwO3V+9Vws3Zx9VhYFv07XwwWtom9fcy3LQodlgcdXi92U2ETF5tZSsiAUa
 /kMx3k50F1/GfUZz+vLqmoje0HB7CkhN/C+iJ9atnobM8EIsDG8Yuv79dTMzxtacI3oj
 mo/4MPhf8/9Q4U2EfUBrROPvQJrtYRYQ1onPSvntMVrlcPzxdA++VqURnAgWz4UOGE+B
 MF/57QcM3Vxhy8lOuFwycza5tDzABfM9FqI6/WqTToXRj0nJKWilFrXsmSfJmZtpffw2
 mv0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=MG+I+vl8KX0wHN3+D4H2A/T/cdKBcQNzLYBm8GH7bmY=;
 b=MCVqymjOZRm9Sqiljx594ndUz3+OLO1wxA0Ka/534CGW5yNt68O3FtF0Dv33yDAGII
 Hrm3tNaT7YmfeekssGSpzNti7Re9+MPjNzTMjT30vcHm5v+lmdt80Bl9Y49kJ+HnOQ1o
 glxFhWOaYyOv5M/XiTSOp1Uxe7L94f7JYU1oHsNBdRBoREGJuFGBpBoDdmjJsU4S4GiN
 HFM0mywXaUFAnuo22d8qXjRUfBabDD4tQh8l1lILIurpNqmhxq82daMK59eksU0oU2dD
 g6l4jKZDaI7ESY3uUHS2Di2ayoAYvddQN7SMyGEXUysnRPJezA+a2hvkHFALd3Xy9MrO
 eNNg==
X-Gm-Message-State: APjAAAWYa/IIqY68Lf6SGQLCO/dgql+QLC47rTNCwtY7HxAOGoYmLsqW
 8CL8Qs7H+fI3NOR6xfFTJwZMATLh
X-Google-Smtp-Source: APXvYqwZZixL1DwI3jU/RWFeI7o8jrkSYeuB6pRzLvc5vEzoBAeq7PZ5vzdva3Xsu8TqxWhnKp9y7A==
X-Received: by 2002:a37:d88:: with SMTP id 130mr4574017qkn.314.1551855051346; 
 Tue, 05 Mar 2019 22:50:51 -0800 (PST)
Received: from ?IPv6:2601:184:4180:66e7:68f1:6275:fdcf:c833?
 ([2601:184:4180:66e7:68f1:6275:fdcf:c833])
 by smtp.googlemail.com with ESMTPSA id n78sm542724qkn.10.2019.03.05.22.50.50
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 05 Mar 2019 22:50:50 -0800 (PST)
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
 <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
 <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Message-ID: <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN>
Date: Wed, 6 Mar 2019 01:50:49 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.1
MIME-Version: 1.0
In-Reply-To: <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 06/03/2019 01.23, Drew Adams wrote: 
> No, in fact I wasn't aware of `char-property-alias-alist'. ;-)
> 
> I just meant in some way to try to have a library-specific
> property control or replace a general property.  I don't
> have in mind a general mechanism for doing that.

Font font-lock-extra-managed-props, at least, char-property-alias-alist seems perfect: you can declare my-abc to be an alias of abc, add my-abc to char-property-alias-alist when the minor mode gets activated, remove it when it gets deactivated, and as a bonus when clearing fontification font-lock will only clear the instances of abc that it applied itself. Very neat.

Clément.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 06 Mar 2019 15:39:02 +0000
Resent-Message-ID: <handler.34764.B34764.15518866906652 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>, 34764 <at> debbugs.gnu.org
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.15518866906652
          (code B ref 34764); Wed, 06 Mar 2019 15:39:02 +0000
Received: (at 34764) by debbugs.gnu.org; 6 Mar 2019 15:38:10 +0000
Received: from localhost ([127.0.0.1]:34586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h1YcU-0001jE-DS
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2019 10:38:10 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:38376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1h1YcS-0001ix-4B
 for 34764 <at> debbugs.gnu.org; Wed, 06 Mar 2019 10:38:08 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x26FXs45081265;
 Wed, 6 Mar 2019 15:38:02 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=0Ua8A5UP+AJdETudetvKzwNun3o5ld4TNNAASRFQn5s=;
 b=yETMyaa9ASFs36lvFnq10gHSsWr6u0DEWZZOWwlYSnRjyx8no3A/MowUM3XNGkt5K8Y+
 v8fsl1C9lGfcsuzSYxnfRWtMbKRX9igar+lbQF085JNs6QYXigwwPz6CMWby4AwhSDmk
 D7twBGlQgDPkPkTI4ZwNQMoixs8V8uzwwvmbPp2UynDp8SCmNNefl7cumzeMb8LiYEWA
 Fx50AwlMk2H5Cj72h7lxBXBQXSlYMQ0dOAD2h35IysekUniluNV3Ux+DpjddfBWtToIY
 a8xbdYFYhObtPitIEeFXoe/Vh3Ft21lGQK95m2qObVEht9iTidORyoS++HZjkmif4fqn 7g== 
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp2130.oracle.com with ESMTP id 2qyfbecr9h-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 06 Mar 2019 15:38:01 +0000
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x26FbtlB008063
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 6 Mar 2019 15:37:56 GMT
Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x26FbtLO016618;
 Wed, 6 Mar 2019 15:37:55 GMT
MIME-Version: 1.0
Message-ID: <675352ab-203d-45eb-afe4-0a09021c967f@default>
Date: Wed, 6 Mar 2019 07:37:54 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
 <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
 <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
 <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN>
In-Reply-To: <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4810.0 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9187
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1903060108
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > No, in fact I wasn't aware of `char-property-alias-alist'. ;-)
> >
> > I just meant in some way to try to have a library-specific
> > property control or replace a general property.  I don't
> > have in mind a general mechanism for doing that.
>=20
> Font font-lock-extra-managed-props, at least, char-property-alias-alist
> seems perfect: you can declare my-abc to be an alias of abc, add my-abc
> to char-property-alias-alist when the minor mode gets activated, remove
> it when it gets deactivated, and as a bonus when clearing fontification
> font-lock will only clear the instances of abc that it applied itself.
> Very neat.

Yes, font-lock is a special case, because it already
deals in such a general way with a _list_ of properties,
"managing" them similarly.

Beyond that, one's code needs, one way or another, to
ensure that a library-specific property can have the
effect of the general, global one.  That's not built-in,
AFAIK.
_________

There is another case, which I forgot to mention, where
there is something general and built-in, but not
only for properties.  That's `buffer-invisibility-spec'.

By that I mean that you can add your own entries to
that spec, and you can remove them.  Other entries are
not affected.  (There are even specific functions to
add and remove.)

Something similar happens with hooks.

These are all places/constructs designed to be
modified by more than one library for more than one
purpose.  They are all, in a general sense, "hooks".

Another example, in the realm of properties, is the
exceptional way we treat property `face': code generally
handles both the case where the property value is a
single symbol (e.g. `lazy-highlight') and the case where
the value is a list of such.  Again: easy to add and
remove, without affecting what might be there from other
code.

A property whose value is expected/allowed to be a list
of values, each of which can determine the behavior,
is more flexible.

Whether this could or should be generalized, I don't
know.  But it sure is easier to keep the effects of
some code (e.g. a mode) separate in the cases where
we've planned ahead for a list of behavior-modifying
entries rather than just a single such.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 30 Oct 2019 19:31:02 +0000
Resent-Message-ID: <handler.34764.B34764.157246385924682 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Cc: 34764 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.157246385924682
          (code B ref 34764); Wed, 30 Oct 2019 19:31:02 +0000
Received: (at 34764) by debbugs.gnu.org; 30 Oct 2019 19:30:59 +0000
Received: from localhost ([127.0.0.1]:51505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPtgJ-0006Pj-CB
	for submit <at> debbugs.gnu.org; Wed, 30 Oct 2019 15:30:59 -0400
Received: from quimby.gnus.org ([80.91.231.51]:33354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iPtgH-0006LW-Gq
 for 34764 <at> debbugs.gnu.org; Wed, 30 Oct 2019 15:30:58 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1iPtgC-0002cm-ED; Wed, 30 Oct 2019 20:30:54 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
 <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
 <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
 <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN>
Date: Wed, 30 Oct 2019 20:30:51 +0100
In-Reply-To: <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN>
 ("=?UTF-8?Q?Cl=C3=A9ment?=
 Pit-Claudel"'s message of "Wed, 6 Mar 2019 01:50:49 -0500")
Message-ID: <87imo6owt0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN> writes: > Font
    font-lock-extra-managed-props, at least, > char-property-alias-alist seems
    perfect: you can declare my-abc to be > an alias of abc, add my-abc to char-property-alias-alist
    when the > minor mode [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Cl=C3=A9ment Pit-Claudel <cpitclaudel@HIDDEN> writes:

> Font font-lock-extra-managed-props, at least,
> char-property-alias-alist seems perfect: you can declare my-abc to be
> an alias of abc, add my-abc to char-property-alias-alist when the
> minor mode gets activated, remove it when it gets deactivated, and as
> a bonus when clearing fontification font-lock will only clear the
> instances of abc that it applied itself. Very neat.

Sounds like a good idea.  Did you work up a patch along these lines?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#34764: prettify-symbols-mode pollutes font-lock-extra-keywords
Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 30 Oct 2019 20:59:02 +0000
Resent-Message-ID: <handler.34764.B34764.15724690834027 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 34764
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 34764 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
Received: via spool by 34764-submit <at> debbugs.gnu.org id=B34764.15724690834027
          (code B ref 34764); Wed, 30 Oct 2019 20:59:02 +0000
Received: (at 34764) by debbugs.gnu.org; 30 Oct 2019 20:58:03 +0000
Received: from localhost ([127.0.0.1]:51674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iPv2Z-00012t-FU
	for submit <at> debbugs.gnu.org; Wed, 30 Oct 2019 16:58:03 -0400
Received: from mail-qk1-f172.google.com ([209.85.222.172]:44449)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cpitclaudel@HIDDEN>) id 1iPv2X-00012I-KL
 for 34764 <at> debbugs.gnu.org; Wed, 30 Oct 2019 16:58:01 -0400
Received: by mail-qk1-f172.google.com with SMTP id m16so3998177qki.11
 for <34764 <at> debbugs.gnu.org>; Wed, 30 Oct 2019 13:58:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=Q5TEMfQ1nBFb7Hw6ECSAzWWl8omt9L1vF1kZa+FhKJA=;
 b=Z5XFQKoIm9HnixBZ0vLPlBXg7Yc2EKM09qB6THUaRLrKY1LflNeKvf4zqOuLCyHQHS
 +KpbEualdFcWrS4eITae3EYfC+TppMpKGDCnuCJ6mZV4Y9VOocnBsmOnTxxDpjV/5S3e
 eEVN43ARuyl5jlgAU1tVZrL+xB1OsYrUAt0vQGrn+zLxjgAhK9KoVaMSL4Y+BZ1cEWeQ
 8SimXrp+TV/mmF+j9J5YvebamnqMrmO88TdcQ+DSO4MGzBhbAGfjdWQu5uqIIvtKove4
 P9VHrucwsNBuZq4PFUojCSz/kBe3Z69iNsdNfZk/E0Su3t7zzjDhavQWCENwQxWSet1f
 wY3w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=Q5TEMfQ1nBFb7Hw6ECSAzWWl8omt9L1vF1kZa+FhKJA=;
 b=OzirXgTgFuAcdEeo9K52kP9QIgNFtYARjaQQRjNnlJopwSQmT8HhAiJogbRlc17Rtm
 V7EyK09CkHFFUFAN4EOgYcOOtMp/PfBU8myOD+UlQUEW+hjwsPIR+7lAUPHWmdUdhGu+
 dg0o7NusaA1NGYfET0A20i9w81RXUcrV89cgeyJ6TUlo7xk0ULkmMW7CT/trbnTcvjjJ
 j3KH5qQ1PTlW7tDSF3QDuckLbCY95NCzZfXQwR3f+pPcNWd8yHEYkeihm1j1wsPbrxjy
 6kivYpLleC8WZpSmTTNCZT3sQiulMizV+7+clxAeamOUr6jeucD19QzPEdI8uYAmklUh
 M0lg==
X-Gm-Message-State: APjAAAVmNytOXmh1hMldbVEC0IWnqu1cHWHHUqeIJF0AiWDUYKFnzO29
 172q0Bztq6eIV3Aj39gGj03ahMoy
X-Google-Smtp-Source: APXvYqzZTrQwmK/btDKdSpjE19OXiGrdRg75WK8aOMEm2Tv9M/YbwSBFf/DXqRkqo8duJoD5DC0Alw==
X-Received: by 2002:a05:620a:634:: with SMTP id
 20mr2013712qkv.330.1572469075594; 
 Wed, 30 Oct 2019 13:57:55 -0700 (PDT)
Received: from [128.30.9.205] (30-9-205.wireless.csail.mit.edu. [128.30.9.205])
 by smtp.googlemail.com with ESMTPSA id n55sm828827qta.24.2019.10.30.13.57.54
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 30 Oct 2019 13:57:55 -0700 (PDT)
References: <42355266-99e2-403a-8dd2-8a5320659d1b@HIDDEN>
 <733dfaa9-55c2-4eb6-be1f-e1e880285546@default>
 <aad3efd1-b5ae-405f-2731-890beff06dac@HIDDEN>
 <69cbd68d-71c8-4f03-a6e1-d6f0bec26900@default>
 <4ef305f9-6501-c360-b635-63d5574abd55@HIDDEN> <87imo6owt0.fsf@HIDDEN>
From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel <cpitclaudel@HIDDEN>
Message-ID: <30602a9f-2568-f338-ab54-71b1916608db@HIDDEN>
Date: Wed, 30 Oct 2019 16:57:54 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <87imo6owt0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 2019-10-30 15:30, Lars Ingebrigtsen wrote:
> Clément Pit-Claudel <cpitclaudel@HIDDEN> writes:
> 
>> Font font-lock-extra-managed-props, at least,
>> char-property-alias-alist seems perfect: you can declare my-abc to be
>> an alias of abc, add my-abc to char-property-alias-alist when the
>> minor mode gets activated, remove it when it gets deactivated, and as
>> a bonus when clearing fontification font-lock will only clear the
>> instances of abc that it applied itself. Very neat.
> 
> Sounds like a good idea.  Did you work up a patch along these lines?

No, I didn't; I didn't find the time to :/






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.