unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ken Mankoff <mankoff@gmail.com>
Cc: 19145@debbugs.gnu.org
Subject: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior
Date: Mon, 24 Nov 2014 09:53:43 -0500	[thread overview]
Message-ID: <jwvwq6ksljd.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m2a93iyejk.fsf@gmail.com> (Ken Mankoff's message of "Sat, 22 Nov 2014 18:57:19 -0500")

>> 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





  reply	other threads:[~2014-11-24 14:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 17:40 bug#19145: 24.4; prettify-symbols-mode inconsistent behavior Ken Mankoff
2014-11-21 18:15 ` Stefan Monnier
2014-11-21 19:22   ` Ken Mankoff
2014-11-22 16:23     ` Stefan Monnier
2014-11-22 23:57       ` Ken Mankoff
2014-11-24 14:53         ` Stefan Monnier [this message]
2014-11-25  9:49           ` Ted Zlatanov
2014-11-25 14:51             ` Stefan Monnier
2014-11-25 15:17               ` Ted Zlatanov
2014-11-25 17:36                 ` Stefan Monnier
2014-11-25 18:53                   ` Ted Zlatanov
2014-11-26  2:23                     ` Stefan Monnier
2014-11-25 14:53             ` Ken Mankoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwq6ksljd.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=19145@debbugs.gnu.org \
    --cc=mankoff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).