GNU bug report logs - #19145
24.4; prettify-symbols-mode inconsistent behavior

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Ken Mankoff <mankoff@HIDDEN>; dated Fri, 21 Nov 2014 17:54:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 18:53:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 13:53:25 2014
Received: from localhost ([127.0.0.1]:45229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtLEq-00049f-IP
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 13:53:25 -0500
Received: from mail-qa0-f46.google.com ([209.85.216.46]:55597)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <tzz@HIDDEN>) id 1XtLEo-00049X-GW
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 13:53:23 -0500
Received: by mail-qa0-f46.google.com with SMTP id u7so831740qaz.19
 for <19145 <at> debbugs.gnu.org>; Tue, 25 Nov 2014 10:53:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google;
 h=from:to:cc:subject:organization:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:user-agent
 :mime-version:content-type;
 bh=ce4CTYcbw4i3nBi5hA7zCuaxpQJ0H750HRHF6y3kThE=;
 b=uaN4WrhYxz3CerfHuiR0A1DIYMtvpo/oahy/qzZapW7rKQ28ZoXAFETp4jj/KPU0Bb
 AN89eHBW6rdnXlRqWtXZ/IHqNHzC1hpzv4uvtIGWtbTsn3b5FHxhZnqrkgtgFvv/VRvR
 WMVM2+eI/ghoN0MuqUGnmfKkE6apx+t3UgVmI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:organization:references
 :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id
 :user-agent:mime-version:content-type;
 bh=ce4CTYcbw4i3nBi5hA7zCuaxpQJ0H750HRHF6y3kThE=;
 b=VKOLY/GA5GPqLAtIsKr7++Z9TwZZWI8Lk2PROVA92v4nRkWLLLnxJ21KF8b3T4hORs
 ar6ldBnJelQ//zb3YVIo9Ebn9iNjfIIqQqR/lG3KXD3W16Z9iglMtPPEECLVH7N4c0o1
 AGr5dhJKuIPunvm98x1lWJ1qA9yeJrE7cV3OApseLKDIL8LMfYRoRF5m5+EfiAt3lBdO
 cjGdHMQoFKz8Fx6uX6QSmfEIU8TJHTfSyWAVOwYhUiFEmGYe5xJdDbVF0MpRkgOiHWj/
 d4rbfLoUZIrJE80TLN4w/pfDBqHCErbn7o9YZ6dyvq9b929oTyF6Stjr+t21/U4/4j8l
 q0ZA==
X-Gm-Message-State: ALoCoQn22+HoJW/NOwa9NxII5Lltw0x7GLJnU/Rg0xsiiHLtmFcPUaD5BIzCu1jar1U3ruhbI4Wi
X-Received: by 10.140.29.165 with SMTP id b34mr39295922qgb.94.1416941601889;
 Tue, 25 Nov 2014 10:53:21 -0800 (PST)
Received: from flea (c-98-229-61-72.hsd1.ma.comcast.net. [98.229.61.72])
 by mx.google.com with ESMTPSA id o40sm1817150qga.23.2014.11.25.10.53.21
 for <multiple recipients>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Tue, 25 Nov 2014 10:53:21 -0800 (PST)
From: Ted Zlatanov <tzz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
 <87tx1n4nl4.fsf@HIDDEN>
 <jwvwq6jnxk7.fsf-monnier+emacsbugs@HIDDEN>
 <87ppcbe2cq.fsf@HIDDEN>
 <jwvy4qzmbdd.fsf-monnier+emacsbugs@HIDDEN>
X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;
 d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT=
 D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx"
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Tue, 25 Nov 2014 13:53:59 -0500
In-Reply-To: <jwvy4qzmbdd.fsf-monnier+emacsbugs@HIDDEN> (Stefan Monnier's
 message of "Tue, 25 Nov 2014 12:36:28 -0500")
Message-ID: <87egsrcdrs.fsf@HIDDEN>
User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org, Ken Mankoff <mankoff@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)

On Tue, 25 Nov 2014 12:36:28 -0500 Stefan Monnier <monnier@HIDDEN> wrote: 

>> But that would require some special adaptation because it wouldn't work
>> in reverse. IOW, how do you propose to preserve the current behavior of
>> the prettified symbol "delta" while also allowing for the regex "delta"?

SM> We could allow elements of the form (REGEXP CHARACTER PREDICATE)
SM> instead of only (STRING . CHARACTER) in p-s-alist.

OK, that would work and be backwards compatible.  Do you want me to
attempt it?

Ted




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 17:36:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 12:36:40 2014
Received: from localhost ([127.0.0.1]:45196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtK2W-0001gW-1w
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 12:36:40 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:46855)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XtK2Q-0001gG-52
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 12:36:34 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAPHaStJ007011;
 Tue, 25 Nov 2014 12:36:29 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id C5180653E; Tue, 25 Nov 2014 12:36:28 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ken Mankoff <mankoff@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Message-ID: <jwvy4qzmbdd.fsf-monnier+emacsbugs@HIDDEN>
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
 <87tx1n4nl4.fsf@HIDDEN>
 <jwvwq6jnxk7.fsf-monnier+emacsbugs@HIDDEN>
 <87ppcbe2cq.fsf@HIDDEN>
Date: Tue, 25 Nov 2014 12:36:28 -0500
In-Reply-To: <87ppcbe2cq.fsf@HIDDEN> (Ted Zlatanov's message of "Tue, 25
 Nov 2014 10:17:41 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0.2
X-NAI-Spam-Rules: 2 Rules triggered
	GEN_SPAM_FEATRE=0.2, RV5136=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5136> : inlines <1558> : streams
 <1348503> : uri <1836106>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.3 (-)

> But that would require some special adaptation because it wouldn't work
> in reverse. IOW, how do you propose to preserve the current behavior of
> the prettified symbol "delta" while also allowing for the regex "delta"?

We could allow elements of the form (REGEXP CHARACTER PREDICATE)
instead of only (STRING . CHARACTER) in p-s-alist.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 15:17:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 10:17:08 2014
Received: from localhost ([127.0.0.1]:45099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtHrX-0006GO-Ax
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 10:17:07 -0500
Received: from mail-qg0-f41.google.com ([209.85.192.41]:39500)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <tzz@HIDDEN>) id 1XtHrU-0006GG-No
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 10:17:05 -0500
Received: by mail-qg0-f41.google.com with SMTP id j5so557180qga.14
 for <19145 <at> debbugs.gnu.org>; Tue, 25 Nov 2014 07:17:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google;
 h=from:to:cc:subject:organization:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:user-agent
 :mime-version:content-type;
 bh=xD6m+bY7fIBi6FxIltVOjfNGB6llhs2qgtYF4Yep+oU=;
 b=chDLf8/S581kq4gwjXzLOh1YzF9PflWoOglUd/EIipHzHv3mFuvVItUWZcCEvnGlN7
 l5AIIcBGRrTgyk88vn4UzgR8/u852I8eK7tqMvZI3hlKPu6EO7gzrEAJ0apbKXNqC5qY
 Y2aLL/4HZctt5aAGOcYbY8/nkcyQFQultriB4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:organization:references
 :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id
 :user-agent:mime-version:content-type;
 bh=xD6m+bY7fIBi6FxIltVOjfNGB6llhs2qgtYF4Yep+oU=;
 b=btJUkieVl9VJ9IJmhe4YV5KfiQK5fKusTQo37IES+668iVEvV16k6DrNUKKnD67fD4
 8FW8rj5ImA9Mf+fYivjV9EuipGyg/+nKwl+2uCy3Qz5AceRiMu85mzrecVoLUPlkLlkU
 qo9c+U8ktNdfCnHCdH2QDtWl3ovUHA5qGUfrspyMDULoFWLTObgRvnTQQaS+rHHH03YQ
 chOzhMoHP1jsxqH6uk4zeBqjUvVFMVgrOCdHwCEBEbKodU9avQ0ISEW8wAumMi2tMEbq
 21YRnR3uS7dpi4K4uBIs8yoEWGOq12TLW5jJGool0jOhIBtXj9VDgoAGHZHotjHRejop
 XPqA==
X-Gm-Message-State: ALoCoQko6fkSFXbDxfY+ekP2zJ8ivlf3bIkv+Xu0fC1UGzrvU3XN5dmCwA7V7+qsR/FDOHsEb38C
X-Received: by 10.224.96.136 with SMTP id h8mr38415370qan.13.1416928624272;
 Tue, 25 Nov 2014 07:17:04 -0800 (PST)
Received: from flea (c-98-229-61-72.hsd1.ma.comcast.net. [98.229.61.72])
 by mx.google.com with ESMTPSA id 111sm1279819qgj.34.2014.11.25.07.17.03
 for <multiple recipients>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Tue, 25 Nov 2014 07:17:03 -0800 (PST)
From: Ted Zlatanov <tzz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
 <87tx1n4nl4.fsf@HIDDEN>
 <jwvwq6jnxk7.fsf-monnier+emacsbugs@HIDDEN>
X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;
 d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT=
 D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx"
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Tue, 25 Nov 2014 10:17:41 -0500
In-Reply-To: <jwvwq6jnxk7.fsf-monnier+emacsbugs@HIDDEN> (Stefan Monnier's
 message of "Tue, 25 Nov 2014 09:51:56 -0500")
Message-ID: <87ppcbe2cq.fsf@HIDDEN>
User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org, Ken Mankoff <mankoff@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)

On Tue, 25 Nov 2014 09:51:56 -0500 Stefan Monnier <monnier@HIDDEN> wrote: 

SM> But w.r.t "delta" in "delta_x" it would make a lot of sense for
SM> prettify-symbols-mode to provide support for that.
>> I don't think it would--I would keep `prettify-symbols-mode' strict. I
>> think Ken needs a different mode that's yet to be written:
>> `prettify-regex-mode'?

SM> By "provide support for that", I meant to provide the option to specify
SM> symbols with regexps.

But that would require some special adaptation because it wouldn't work
in reverse. IOW, how do you propose to preserve the current behavior of
the prettified symbol "delta" while also allowing for the regex "delta"?

Ted




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 14:54:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 09:54:01 2014
Received: from localhost ([127.0.0.1]:44714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtHVB-0005Z6-7S
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 09:54:01 -0500
Received: from mail-qg0-f45.google.com ([209.85.192.45]:36045)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mankoff@HIDDEN>) id 1XtHV9-0005Yu-9k
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 09:53:59 -0500
Received: by mail-qg0-f45.google.com with SMTP id f51so511959qge.18
 for <19145 <at> debbugs.gnu.org>; Tue, 25 Nov 2014 06:53:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type;
 bh=HQUusLVeGHKxAQN5Axil1VnTwYkuU9UfsKlsWcuV7VA=;
 b=MzPTQxP6V8Yx4xRwpnfopIU6zVD9tvtHAxGXyAjTWpB58SuWpXPDDRqD5Vv+nzx+hg
 E3tY3IEdxo0nMtgJ3raRPhpxkzFpY9H+aePfmjytjXAz+D4bNUdieP68Ug1fqTBMFJJg
 A50yyuwqXrG5DqKZJZOqnvDcL9RtyqxJxgnfYYwOcwETrYCqAY/dCSgGWiEoe/db0IlL
 o0+M8YnxacBILvYY3QdbmHIhYl1l6dphEFEeeCnQsNM1/cBHF2CWJxB8uhh+OuZTIUtu
 hW+eJJufrNXv+m93+CI+xNyBe1nv5AK7lB8OC+KZZfibb24KxsXX5PfQsX4mbzlHp4dx
 wUPQ==
X-Received: by 10.140.98.202 with SMTP id o68mr37669880qge.49.1416927238745;
 Tue, 25 Nov 2014 06:53:58 -0800 (PST)
Received: from gorgonzola ([71.58.77.153])
 by mx.google.com with ESMTPSA id j101sm1233301qge.24.2014.11.25.06.53.55
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 25 Nov 2014 06:53:58 -0800 (PST)
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN> <87tx1n4nl4.fsf@HIDDEN>
From: Ken Mankoff <mankoff@HIDDEN>
To: Ted Zlatanov <tzz@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
In-reply-to: <87tx1n4nl4.fsf@HIDDEN>
Date: Tue, 25 Nov 2014 09:53:53 -0500
Message-ID: <m2oarvwcu6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)


* On 2014-11-25 at 04:49, Ted Zlatanov wrote:
> On Mon, 24 Nov 2014 09:53:43 -0500 Stefan Monnier <monnier@HIDDEN> wrote: 
>
> SM> Duh!  Sorry, I somehow failed to see "python-mode" in your original
> SM> bug report.  So yes, you're trying to prettify subparts of identifiers,
> SM> and prettify-symbols-mode currently provides no support at all for that.
> ...
> SM> But w.r.t "delta" in "delta_x" it would make a lot of sense for
> SM> prettify-symbols-mode to provide support for that.
>
> I don't think it would--I would keep `prettify-symbols-mode' strict. I
> think Ken needs a different mode that's yet to be written:
> `prettify-regex-mode'?

This mode exists - pretty-symbols-mode
https://github.com/drothlis/pretty-symbols

I just try to use official packages when possible, hence my recent
switch to prettify-symbols-mode.

  -k.
  




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 14:51:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 09:51:58 2014
Received: from localhost ([127.0.0.1]:44706 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtHTC-0005VT-CX
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 09:51:58 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37508)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XtHTB-0005VM-Bv
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 09:51:57 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAPEpuP1005580;
 Tue, 25 Nov 2014 09:51:56 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 454B7653E; Tue, 25 Nov 2014 09:51:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ken Mankoff <mankoff@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Message-ID: <jwvwq6jnxk7.fsf-monnier+emacsbugs@HIDDEN>
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
 <87tx1n4nl4.fsf@HIDDEN>
Date: Tue, 25 Nov 2014 09:51:56 -0500
In-Reply-To: <87tx1n4nl4.fsf@HIDDEN> (Ted Zlatanov's message of "Tue, 25
 Nov 2014 04:49:11 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV5136=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5136> : inlines <1557> : streams
 <1348440> : uri <1836091>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.3 (-)

SM> But w.r.t "delta" in "delta_x" it would make a lot of sense for
SM> prettify-symbols-mode to provide support for that.
> I don't think it would--I would keep `prettify-symbols-mode' strict. I
> think Ken needs a different mode that's yet to be written:
> `prettify-regex-mode'?

By "provide support for that", I meant to provide the option to specify
symbols with regexps.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 25 Nov 2014 09:48:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 04:48:38 2014
Received: from localhost ([127.0.0.1]:44573 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XtCjd-0004G0-RX
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2014 04:48:38 -0500
Received: from mail-qg0-f43.google.com ([209.85.192.43]:37316)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <tzz@HIDDEN>) id 1XtCjb-0004Fo-4B
 for 19145 <at> debbugs.gnu.org; Tue, 25 Nov 2014 04:48:35 -0500
Received: by mail-qg0-f43.google.com with SMTP id q108so121707qgd.30
 for <19145 <at> debbugs.gnu.org>; Tue, 25 Nov 2014 01:48:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google;
 h=from:to:cc:subject:organization:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:user-agent
 :mime-version:content-type:content-transfer-encoding;
 bh=qtphnifSiUUogirrNb504VcaZ6SSBNKDCcQNV0gax2w=;
 b=d9EdCS8e8k477gp+iSeLLk/k70y+I+9I+IXhRhpi2073G6QMvzcLhJFjVelkmUC3sh
 MK5ydk5Xcfacr4yi/HsuqCNVroJ6fXV8UTGZo0CbVeZ0IDV/OEcp9fyun2dSytpdYSU0
 U+iMMFAJ7mge0FG1avmmIe42nPrE9cmbl9KOU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:organization:references
 :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id
 :user-agent:mime-version:content-type:content-transfer-encoding;
 bh=qtphnifSiUUogirrNb504VcaZ6SSBNKDCcQNV0gax2w=;
 b=W3Bo7v+HoObtAiancW08ECG1VVtHv/EwXNCmsZ3TLpehkGpHA8n+N1fx9vqX0VDtz7
 Y8dO+8ptRzRuh3/ngB1sQsoQaxMJPszofGqJR40Z6ze67m/3y4X3x5dqOmiDLUFbjzXh
 jvX4QABa0Q0U/TaRElajTvowjah7qgMd9g9OAdplhAoIqm2u2DcjcEtPnmHNEFLB+SJV
 frbZRA/zxT9jwXLe4rcyRPrDy5OsPE/dsbZOvw6GV7Mx3cgHN1tg2gRkT3yIWCevPrUd
 AlzC/NX5gWXG8PdtuzmwH1bB5Kj9100m6/rvSLo0Oe35YWbwanNHmQlAlzdXPP9MPaJQ
 elUw==
X-Gm-Message-State: ALoCoQmO+6QcRCmyxQrEyDANgDbsTFZOxtLI1Gf3NeR7zranIEMlzEfrh9ixNVhsWX4uDMNxheAr
X-Received: by 10.229.252.201 with SMTP id mx9mr35654946qcb.4.1416908914635;
 Tue, 25 Nov 2014 01:48:34 -0800 (PST)
Received: from flea (c-98-229-61-72.hsd1.ma.comcast.net. [98.229.61.72])
 by mx.google.com with ESMTPSA id o30sm561197qge.33.2014.11.25.01.48.33
 for <multiple recipients>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Tue, 25 Nov 2014 01:48:34 -0800 (PST)
From: Ted Zlatanov <tzz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
 <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;
 d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT=
 D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx"
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Tue, 25 Nov 2014 04:49:11 -0500
In-Reply-To: <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN> (Stefan Monnier's
 message of "Mon, 24 Nov 2014 09:53:43 -0500")
Message-ID: <87tx1n4nl4.fsf@HIDDEN>
User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org, Ken Mankoff <mankoff@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)

On Mon, 24 Nov 2014 09:53:43 -0500 Stefan Monnier <monnier@HIDDEN=
> wrote:=20

SM> Duh!  Sorry, I somehow failed to see "python-mode" in your original
SM> bug report.  So yes, you're trying to prettify subparts of identifiers,
SM> and prettify-symbols-mode currently provides no support at all for that.
...
SM> But w.r.t "delta" in "delta_x" it would make a lot of sense for
SM> prettify-symbols-mode to provide support for that.

I don't think it would--I would keep `prettify-symbols-mode' strict. I
think Ken needs a different mode that's yet to be written:
`prettify-regex-mode'?

"delta_x" is an entirely different thing from "delta" in all the
programming languages I can think of, so I would not expect to see =CE=B4_x
all over the code just because I want to prettify deltas themselves. If
anything, it would make finding the real standalone deltas harder.

Ted




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 24 Nov 2014 14:53:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 24 09:53:48 2014
Received: from localhost ([127.0.0.1]:43390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xsv1P-0001V2-TI
	for submit <at> debbugs.gnu.org; Mon, 24 Nov 2014 09:53:48 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:59471)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1Xsv1N-0001Ut-11
 for 19145 <at> debbugs.gnu.org; Mon, 24 Nov 2014 09:53:46 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAOErhWq003196;
 Mon, 24 Nov 2014 09:53:43 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 8F19B62B9; Mon, 24 Nov 2014 09:53:43 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ken Mankoff <mankoff@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Message-ID: <jwvwq6ksljd.fsf-monnier+emacsbugs@HIDDEN>
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN> <m2a93iyejk.fsf@HIDDEN>
Date: Mon, 24 Nov 2014 09:53:43 -0500
In-Reply-To: <m2a93iyejk.fsf@HIDDEN> (Ken Mankoff's message of "Sat, 22 Nov
 2014 18:57:19 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV5135=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5135> : inlines <1556> : streams
 <1347893> : uri <1835961>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.3 (-)

>> So, is this setting correct (i.e. does your language treat "delta_x"
>> as a single identifier, and you're trying to prettify subparts of
>> identifiers)?
> I'm not sure. I'm just using python and elpy (and therefore
> python-mode).

Duh!  Sorry, I somehow failed to see "python-mode" in your original
bug report.  So yes, you're trying to prettify subparts of identifiers,
and prettify-symbols-mode currently provides no support at all for that.

> that everything is working as it should, and I'm just running into an
> edge case that can only be covered by a more complex implementation that
> uses regexes?

Exactly.

for _x and **2, I think prettify-symbols-mode is probably not a good
solution anyway (because it won't extend to _xy or to **24).  You'd be
better off with a font-lock rule which just shifts the text up/down (you
might like to look at the way we do just that in text-mode.el), which
can work with any sequence of character rather than being limited to
those few characters which have a "superscript" form in Unicode.

But w.r.t "delta" in "delta_x" it would make a lot of sense for
prettify-symbols-mode to provide support for that.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 22 Nov 2014 23:57:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 22 18:57:21 2014
Received: from localhost ([127.0.0.1]:42112 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XsKYL-0001A6-82
	for submit <at> debbugs.gnu.org; Sat, 22 Nov 2014 18:57:21 -0500
Received: from mail-qc0-f173.google.com ([209.85.216.173]:59692)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mankoff@HIDDEN>) id 1XsKYI-00019y-Ty
 for 19145 <at> debbugs.gnu.org; Sat, 22 Nov 2014 18:57:19 -0500
Received: by mail-qc0-f173.google.com with SMTP id i17so5407389qcy.32
 for <19145 <at> debbugs.gnu.org>; Sat, 22 Nov 2014 15:57:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type;
 bh=hZHTv6o4Dz5n4FqdJETGgOVR418GZUIXq3znTsTrWb8=;
 b=ySzZ7Li0TFt4LYth8xJj1mH91opEKaNw+dYYsjfBYkASru3X4u73FSYyHBwpTxHFMN
 6Qu2Hn7C5WorLK9viJ4UH4uvK4CIL+eksi+O/zc6uA+xoDKGZyA8FhoiAaCULWKYofcg
 A4AE2CTo9YIuI8WUQ1MJ1RpUAbqD0ShD14q8xNwWDcTAc2NUuFXPNrS6WBFzOlZD0PzN
 mLcrjXC8cgVmrcMAqohC46c420PNKgFh2uc2FDT6K2o0FnFDh/glVfC7GYnp7vKuxcQj
 jLf8e0hjuE3pwkZ1Nia7mZ2aDIP5y5pegF6un5xk0l6voILCKsWE9dkHjV1Ud+Wbo3V0
 SwSA==
X-Received: by 10.224.138.2 with SMTP id y2mr18124900qat.52.1416700638430;
 Sat, 22 Nov 2014 15:57:18 -0800 (PST)
Received: from gorgonzola (c-71-58-77-153.hsd1.pa.comcast.net. [71.58.77.153])
 by mx.google.com with ESMTPSA id
 w7sm8286409qge.17.2014.11.22.15.57.17 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 22 Nov 2014 15:57:17 -0800 (PST)
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
 <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN>
From: Ken Mankoff <mankoff@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
In-reply-to: <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN>
Date: Sat, 22 Nov 2014 18:57:19 -0500
Message-ID: <m2a93iyejk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)


* On 2014-11-22 at 11:23, Stefan Monnier wrote:
>> Much improved! Of my examples, only one case no longer works which is
>> delta_x or foo_x_x_x_x, for example.
>
> This would seem to indicate that the syntax-table of the major-mode in
> effect has marked the underscore character with "symbol syntax"
> (denoted confusingly enough by an underscore character, in the `C-u
> C-x =' help).
>
> Such a setting is appropriate is "delta_x" is one identifier, but not
> if it's supposed to be 3 elements (identifier "delta", infix "_", and
> identifier "x").
>
> So, is this setting correct (i.e. does your language treat "delta_x"
> as a single identifier, and you're trying to prettify subparts of
> identifiers)?

I'm not sure. I'm just using python and elpy (and therefore
python-mode). I think underscores are normal characters, and a_b is a
generic variable name, three characters long. There is nothing special
about _ or _b (compared to LaTeX and LaTeX-mode, where there is
meaning).

Does this mean I should file an issue with python-mode, or more likely
that everything is working as it should, and I'm just running into an
edge case that can only be covered by a more complex implementation that
uses regexes?

  -k.
  




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 22 Nov 2014 16:24:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 22 11:24:00 2014
Received: from localhost ([127.0.0.1]:41917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XsDTc-0007MA-83
	for submit <at> debbugs.gnu.org; Sat, 22 Nov 2014 11:24:00 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:47861)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XsDTa-0007M2-9D
 for 19145 <at> debbugs.gnu.org; Sat, 22 Nov 2014 11:23:58 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAMGNuUN001369;
 Sat, 22 Nov 2014 11:23:56 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id 713BF43AC; Sat, 22 Nov 2014 11:23:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ken Mankoff <mankoff@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Message-ID: <jwv389bw6n1.fsf-monnier+emacsbugs@HIDDEN>
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
 <m24mtspdde.fsf@HIDDEN>
Date: Sat, 22 Nov 2014 11:23:56 -0500
In-Reply-To: <m24mtspdde.fsf@HIDDEN> (Ken Mankoff's message of
 "Fri, 21 Nov 2014 14:22:53 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV5133=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5133> : inlines <1554> : streams
 <1346833> : uri <1835707>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.3 (-)

> Much improved! Of my examples, only one case no longer works which is
> delta_x or foo_x_x_x_x, for example.

This would seem to indicate that the syntax-table of the major-mode in
effect has marked the underscore character with "symbol syntax"
(denoted confusingly enough by an underscore character,
in the `C-u C-x =' help).

Such a setting is appropriate is "delta_x" is one identifier, but not if
it's supposed to be 3 elements (identifier "delta", infix "_", and
identifier "x").

So, is this setting correct (i.e. does your language treat "delta_x" as
a single identifier, and you're trying to prettify subparts of
identifiers)?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 21 Nov 2014 19:23:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 21 14:23:02 2014
Received: from localhost ([127.0.0.1]:41208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XrtnJ-0004j6-R1
	for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 14:23:02 -0500
Received: from mail-qg0-f43.google.com ([209.85.192.43]:45280)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mankoff@HIDDEN>) id 1XrtnH-0004ir-S2
 for 19145 <at> debbugs.gnu.org; Fri, 21 Nov 2014 14:23:00 -0500
Received: by mail-qg0-f43.google.com with SMTP id q108so4186625qgd.16
 for <19145 <at> debbugs.gnu.org>; Fri, 21 Nov 2014 11:22:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:from:to:cc:subject:in-reply-to:date:message-id
 :mime-version:content-type:content-transfer-encoding;
 bh=eoPslBTlDSlA4q7mDP8d4cMQg/6e2yjEBogRIk4AHqs=;
 b=T2WSz7XMCQT5f43i53GuO7o9jPWSJ8wL4aNFVTtyuG5LH49RT0KUYQzIc2vw64/s8D
 +B0i3MPMq+/fGVWOL00qX1JHS4R75CBouMvPbW8NWnptSZO2zsg0ynakgxQ3pqAgY1f9
 CVgsf1uNWd42chmOVgUsofeeL+zD9lxjeQcPfXd3YkPpffQ79WeBlNbZBlaFZJ/BVIp1
 vXXiwysd0E89DVGYNlw/z+/YALCA+6ztpMczn4qbow8d9QbOGfbKzgRPil+s0HiG61bc
 gvlyf+nU+jfVlMlUZpMWey/IUIf70YY9jxalbCG0r2ozibbFdqJDzjr9ewdfpk2VOBL/
 1mgA==
X-Received: by 10.224.45.65 with SMTP id d1mr8824853qaf.43.1416597779177;
 Fri, 21 Nov 2014 11:22:59 -0800 (PST)
Received: from gorgonzola.whoi.edu (c-71-58-77-153.hsd1.pa.comcast.net.
 [71.58.77.153])
 by mx.google.com with ESMTPSA id b17sm3677659qah.35.2014.11.21.11.22.55
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 21 Nov 2014 11:22:58 -0800 (PST)
References: <m27fyopi4j.fsf@HIDDEN>
 <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
From: Ken Mankoff <mankoff@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
In-reply-to: <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
Date: Fri, 21 Nov 2014 14:22:53 -0500
Message-ID: <m24mtspdde.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.7 (/)


* On 2014-11-21 at 13:15, Stefan Monnier wrote:
>> Some symbols are sometimes not being treated correctly depending on
>> what characters follow. For example, I have the following setup for
>> coding Python:
>
>>     (prettify-symbols-mode t)
>>     (global-prettify-symbols-mode t)
>>     (add-hook 'python-mode-hook
>>               (lambda ()
>>                 (push '("**2" . ?²) prettify-symbols-alist)
>>                 (push '("_x" . ?ᵪ) prettify-symbols-alist)
>>                 (push '("delta" . ?δ) prettify-symbols-alist)))
>
> Can you try the patch below and see if it does what you want?
>
>
> diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
> index 5037020..475dd32 100644
> --- a/lisp/progmodes/prog-mode.el
> +++ b/lisp/progmodes/prog-mode.el
> @@ -73,11 +73,13 @@ Regexp match data 0 points to the chars."
>    ;; Check that the chars should really be composed into a symbol.
>    (let* ((start (match-beginning 0))
>  	 (end (match-end 0))
> -	 (syntaxes (if (eq (char-syntax (char-after start)) ?w)
> -		       '(?w ?_) '(?. ?\\)))
> +	 (syntax-beg (if (eq (char-syntax (char-after start)) ?w)
> +                         '(?w ?_) '(?. ?\\)))
> +	 (syntax-end (if (eq (char-syntax (char-before end)) ?w)
> +                         '(?w ?_) '(?. ?\\)))
>  	 match)
> -    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes)
> -	    (memq (char-syntax (or (char-after end) ?\s)) syntaxes)
> +    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntax-beg)
> +	    (memq (char-syntax (or (char-after end) ?\s)) syntax-end)
>              ;; syntax-ppss could modify the match data (bug#14595)
>              (progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
>  	;; No composition for you.  Let's actually remove any composition


Much improved! Of my examples, only one case no longer works which is
delta_x or foo_x_x_x_x, for example.

  -k.
  




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at 19145 <at> debbugs.gnu.org:


Received: (at 19145) by debbugs.gnu.org; 21 Nov 2014 18:15:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 21 13:15:09 2014
Received: from localhost ([127.0.0.1]:41180 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xrsjc-000335-24
	for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 13:15:09 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:37249)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>) id 1XrsjX-00032R-7u
 for 19145 <at> debbugs.gnu.org; Fri, 21 Nov 2014 13:15:04 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sALIF2P7014746;
 Fri, 21 Nov 2014 13:15:02 -0500
Received: by pastel.home (Postfix, from userid 20848)
 id EAEBC43B8; Fri, 21 Nov 2014 13:15:01 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ken Mankoff <mankoff@HIDDEN>
Subject: Re: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Message-ID: <jwv389c8lqy.fsf-monnier+emacsbugs@HIDDEN>
References: <m27fyopi4j.fsf@HIDDEN>
Date: Fri, 21 Nov 2014 13:15:01 -0500
In-Reply-To: <m27fyopi4j.fsf@HIDDEN> (Ken Mankoff's message of
 "Fri, 21 Nov 2014 12:40:12 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV5132=0
X-NAI-Spam-Version: 2.3.0.9393 : core <5132> : inlines <1553> : streams
 <1346327> : uri <1835586>
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: 19145
Cc: 19145 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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.3 (-)

> Some symbols are sometimes not being treated correctly depending on what
> characters follow. For example, I have the following setup for coding
> Python:

>     (prettify-symbols-mode t)
>     (global-prettify-symbols-mode t)
>     (add-hook 'python-mode-hook
>               (lambda ()
>                 (push '("**2" . ?=C2=B2) prettify-symbols-alist)
>                 (push '("_x" . ?=E1=B5=AA) prettify-symbols-alist)
>                 (push '("delta" . ?=CE=B4) prettify-symbols-alist)))

Can you try the patch below and see if it does what you want?


        Stefan


diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 5037020..475dd32 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -73,11 +73,13 @@ Regexp match data 0 points to the chars."
   ;; Check that the chars should really be composed into a symbol.
   (let* ((start (match-beginning 0))
 	 (end (match-end 0))
-	 (syntaxes (if (eq (char-syntax (char-after start)) ?w)
-		       '(?w ?_) '(?. ?\\)))
+	 (syntax-beg (if (eq (char-syntax (char-after start)) ?w)
+                         '(?w ?_) '(?. ?\\)))
+	 (syntax-end (if (eq (char-syntax (char-before end)) ?w)
+                         '(?w ?_) '(?. ?\\)))
 	 match)
-    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes)
-	    (memq (char-syntax (or (char-after end) ?\s)) syntaxes)
+    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntax-beg)
+	    (memq (char-syntax (or (char-after end) ?\s)) syntax-end)
             ;; syntax-ppss could modify the match data (bug#14595)
             (progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
 	;; No composition for you.  Let's actually remove any composition




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2014 17:53:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 21 12:53:06 2014
Received: from localhost ([127.0.0.1]:41145 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XrsOG-0002Tx-Hr
	for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 12:53:05 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33762)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mankoff@HIDDEN>) id 1XrsCP-0002BN-HN
 for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 12:40:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mankoff@HIDDEN>) id 1XrsCF-0001Kl-Pb
 for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 12:40:49 -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,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:45494)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mankoff@HIDDEN>) id 1XrsCF-0001Kf-NT
 for submit <at> debbugs.gnu.org; Fri, 21 Nov 2014 12:40:39 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35409)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mankoff@HIDDEN>) id 1XrsC6-0005nr-Ku
 for bug-gnu-emacs@HIDDEN; Fri, 21 Nov 2014 12:40:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mankoff@HIDDEN>) id 1XrsBr-0001Ak-Rd
 for bug-gnu-emacs@HIDDEN; Fri, 21 Nov 2014 12:40:30 -0500
Received: from mail-qa0-x235.google.com ([2607:f8b0:400d:c00::235]:35807)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <mankoff@HIDDEN>) id 1XrsBr-0001AY-O1
 for bug-gnu-emacs@HIDDEN; Fri, 21 Nov 2014 12:40:15 -0500
Received: by mail-qa0-f53.google.com with SMTP id bm13so3705993qab.40
 for <bug-gnu-emacs@HIDDEN>; Fri, 21 Nov 2014 09:40:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version:content-type
 :content-transfer-encoding;
 bh=s087inD89jqe0nEvs726/0rGhsUBA3URHwCYYcdBVZE=;
 b=EY1zHFz21qWhXj1adayEtnS5zQ3e0SI/2bc/exE2yPFMPWcgwU0h3TVaClwxEwkagR
 wdJjze21aI08kZC+iZqu3/orJaGl02GY7+n330uEqLQLgz5aP0K/DKN+hJ5XsoFW8IpD
 m5tk7LCc9umi1Kg0UPba7x15r7D5Dztw0jJ2fHB8CktFkqBLr2AuVOb7LZXVPVSzeuYv
 XpxNccUvXt3nknu48KquZIOhMgBS0Zn0H4kOW5RYIu0B8EKpqQtKWCmTL8PQRJ4YzGXq
 IRiuAyIZ+SySkdzs2+dfF6/mqa6GbgvN+ecRKx/6MQRu5Vo/VXy/HYpqIv/tHLaj2027
 CTeQ==
X-Received: by 10.229.105.196 with SMTP id u4mr8097773qco.27.1416591615017;
 Fri, 21 Nov 2014 09:40:15 -0800 (PST)
Received: from gorgonzola.whoi.edu (c-71-58-77-153.hsd1.pa.comcast.net.
 [71.58.77.153])
 by mx.google.com with ESMTPSA id p78sm5166886qgp.44.2014.11.21.09.40.13
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 21 Nov 2014 09:40:13 -0800 (PST)
From: Ken Mankoff <mankoff@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.4; prettify-symbols-mode inconsistent behavior
Date: Fri, 21 Nov 2014 12:40:12 -0500
Message-ID: <m27fyopi4j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 21 Nov 2014 12:53:02 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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: -4.0 (----)


I'm having issues with the new prettify-symbols-mode. I'm not sure if
this is a bug, or just a fact that the implementation is limited, in
which case this is a feature request for a more complete implementation.

Some symbols are sometimes not being treated correctly depending on what
characters follow. For example, I have the following setup for coding
Python:

    (prettify-symbols-mode t)
    (global-prettify-symbols-mode t)
    (add-hook 'python-mode-hook
              (lambda ()
                (push '("**2" . ?²) prettify-symbols-alist)
                (push '("_x" . ?ᵪ) prettify-symbols-alist)
                (push '("delta" . ?δ) prettify-symbols-alist)))


The issue may be somewhat subjective. For example, should foo_xx appear
with a subscript x and then a normal x? Or should it appear as I assume
you are reading it with no prettification? I would argue for the latter.
What about foo_x+2? Regardless, I've created a matrix of
prettifications, what I'd expect, and what happens.

| Characters | Expected               | Actual                        | Good? |
|------------+------------------------+-------------------------------+-------|
| foo_x      | subscript x            | subscript x                   | Y     |
| foo**2     | superscript 2          | superscript 2                 | Y     |
| delta      | delta symbol           | delta symbol                  | Y     |
| foo_x+     | subscript x            | No subscript                  | N     |
| foo_xi     | no subscript           | subscript                     | N     |
| foo_x[42]  | subscript              | subscript                     | Y     |
| foo_x**2   | subscript, superscript | no subscript, yes superscript | N     |
| foo**200   | no superscript         | superscript 2                 | N     |
| delta(42)  | delta symbol(42)       | symbol                        | Y     |
| delta+42   | symbol                 | symbol                        | Y     |
| delta**2   | symbol, superscript    | symbol, superscritp           | Y     |
| delta_x    | symbol, subscript      | no symbol                     | N     |

There are some inconsistencies, like why _x+ loses prettification, but
delta+ retains it, or why foo_x_x_x works, but delta_x does not.

Thanks,

  -k.





Acknowledgement sent to Ken Mankoff <mankoff@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#19145; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 25 Nov 2014 19:00:03 UTC

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