From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior Date: Mon, 24 Nov 2014 09:53:43 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416840869 25823 80.91.229.3 (24 Nov 2014 14:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2014 14:54:29 +0000 (UTC) Cc: 19145@debbugs.gnu.org To: Ken Mankoff Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 24 15:54:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xsv1y-0001lE-6f for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Nov 2014 15:54:22 +0100 Original-Received: from localhost ([::1]:53072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsv1x-0003a2-Rr for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Nov 2014 09:54:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsv1m-0003Zi-Km for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 09:54:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xsv1f-000883-4u for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 09:54:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xsv1f-00087x-1S for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 09:54:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xsv1e-0001Vc-N0 for bug-gnu-emacs@gnu.org; Mon, 24 Nov 2014 09:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Nov 2014 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19145 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19145-submit@debbugs.gnu.org id=B19145.14168408285772 (code B ref 19145); Mon, 24 Nov 2014 14:54:02 +0000 Original-Received: (at 19145) by debbugs.gnu.org; 24 Nov 2014 14:53:48 +0000 Original-Received: from localhost ([127.0.0.1]:43390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xsv1P-0001V2-TI for submit@debbugs.gnu.org; Mon, 24 Nov 2014 09:53:48 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:59471) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xsv1N-0001Ut-11 for 19145@debbugs.gnu.org; Mon, 24 Nov 2014 09:53:46 -0500 Original-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 Original-Received: by pastel.home (Postfix, from userid 20848) id 8F19B62B9; Mon, 24 Nov 2014 09:53:43 -0500 (EST) In-Reply-To: (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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96501 Archived-At: >> 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