From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Converting compositions to strings Date: Mon, 30 Jan 2017 00:13:34 -0500 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1485753252 5597 195.159.176.226 (30 Jan 2017 05:14:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2017 05:14:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 06:14:09 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cY4I3-0001Bk-DU for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2017 06:14:07 +0100 Original-Received: from localhost ([::1]:57957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cY4I8-00024U-DY for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2017 00:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cY4Hb-00024E-It for emacs-devel@gnu.org; Mon, 30 Jan 2017 00:13:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cY4HY-0002u2-F7 for emacs-devel@gnu.org; Mon, 30 Jan 2017 00:13:39 -0500 Original-Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:33700) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cY4HY-0002t1-AH for emacs-devel@gnu.org; Mon, 30 Jan 2017 00:13:36 -0500 Original-Received: by mail-qt0-x243.google.com with SMTP id n13so54351367qtc.0 for ; Sun, 29 Jan 2017 21:13:36 -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-transfer-encoding; bh=j1qicg4ktQ7glQC0UQzvB8gl3hkSuVsvKdKtuIHWSKc=; b=YVDYPnkQFp2kg7uGYCrXYYCuUYLPLwWCnGSbVk3RyNQ+xZuu837fwlQVy57P5GzOg/ 1ea5BHLQvy9alwb7EGQwa5eXqLZC4rh/e0XCa/MacQProISJ9eHtu64mvDOCb3/p7eBc iWZRDStwTJDBoIoBfNd+4nNSKVMvlbwKusFlyr8BFqfnJTTdZiwH2ec+VJafexUh7Kb/ DkZewtZ8Ly8uPEqxdIbCDDADC5V/2KCGsIeNRDhaMVXlyyfnoH8G6PrgoBAMd6V+hi6R P4zVQ62NuTaXUTxumz5YoQKDRFIV3+p0oWyCZ25lEu+HXOZGo1HoKG+iBkLudQE2wkPR FqTw== 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-transfer-encoding; bh=j1qicg4ktQ7glQC0UQzvB8gl3hkSuVsvKdKtuIHWSKc=; b=NQ4qLIIfsYEfR5GaD7ukuaRb0KWpNziRUoTt0YLyuKntMVsh8wgn3iVc9XmDMBfqxB EHywawuBBiIeON39S9Tr/mbx8yBZgh+foa15ishEZlyRVqEK6uYdG62AqeH2ou44/PZx K0FFL1MIuzqHoYKkWijfEzJpF3HmbeQYsMm5c3vpygngFQ/kNods81EmQzo7/CRkmuXD aZey4B7bl+iRINnLku9DeNk9la1PIasTpl0r3ZHp0JMI9/m84NMnFp1y6fsk4FQb8KNo MIe35bxNHdERir0CwKPDn3dXhpYxALjIQjI30CcZHkhnvtgnh1i8R+BgBUk+vX0zdZ9A BHlw== X-Gm-Message-State: AIkVDXLo0Je037qoLcnuR+SN1uI99O3QAO7yIn6FcepZjc0mAfHpu7QIDlJDxeY40+P+gA== X-Received: by 10.237.59.28 with SMTP id p28mr18047212qte.152.1485753215669; Sun, 29 Jan 2017 21:13:35 -0800 (PST) Original-Received: from [18.189.98.234] (dhcp-18-189-98-234.dyn.MIT.EDU. [18.189.98.234]) by smtp.gmail.com with ESMTPSA id x62sm11221934qkg.31.2017.01.29.21.13.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Jan 2017 21:13:35 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::243 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211754 Archived-At: 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.