unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Converting compositions to strings
Date: Mon, 30 Jan 2017 00:13:34 -0500	[thread overview]
Message-ID: <fe43fcaf-6fca-4ee7-4fbc-d4dd983e9e33@gmail.com> (raw)

Hi emacs-devel,

Many compositions can be represented as strings: for example, prettify-symbols-mode composes "lambda" into "λ", and nameless prettifies the name of the current package as ":" or "::".

How can I reconstruct these strings from the value of the 'composition' text property?  Small experiments suggest that for single-character compositions the property has the shape (_ _ [?λ]) and for multi-character compositions (_ _ [?x _ ?y _ …]), but I also found instances of the shape ((_ ?x _ _)), and ((_ . ?x)) (I think).

Is there a recipe that I can use to construct a string representation of a composition? (I realize that many compositions can't adequately be represented as plain strings; I'm only interested in those that can).

Thanks!
Clément.



             reply	other threads:[~2017-01-30  5:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30  5:13 Clément Pit-Claudel [this message]
2017-01-30 13:34 ` Converting compositions to strings Stefan Monnier
2017-01-30 16:23   ` Clément Pit-Claudel
2017-01-30 14:24 ` Ted Zlatanov
2017-01-30 16:27   ` Clément Pit-Claudel
2017-01-30 17:48     ` Ted Zlatanov
2017-01-30 15:18 ` Eli Zaretskii
2017-01-30 16:39   ` Clément Pit-Claudel
2017-01-30 16:52     ` Eli Zaretskii
2017-01-31 14:31       ` Stefan Monnier

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=fe43fcaf-6fca-4ee7-4fbc-d4dd983e9e33@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).