From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Character literals for Unicode (control) characters Date: Wed, 2 Mar 2016 22:34:54 -0800 (PST) Message-ID: <6ff905c4-9304-41a0-90a6-9967dee0fefe@default> References: <87r3fsjenn.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1456986963 29066 80.91.229.3 (3 Mar 2016 06:36:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2016 06:36:03 +0000 (UTC) To: Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 03 07:35:51 2016 Return-path: Envelope-to: ged-emacs-devel@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 1abMrX-0001VY-6S for ged-emacs-devel@m.gmane.org; Thu, 03 Mar 2016 07:35:51 +0100 Original-Received: from localhost ([::1]:60939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abMrW-00006e-7B for ged-emacs-devel@m.gmane.org; Thu, 03 Mar 2016 01:35:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abMql-0007vf-4q for emacs-devel@gnu.org; Thu, 03 Mar 2016 01:35:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abMqh-00010H-1E for emacs-devel@gnu.org; Thu, 03 Mar 2016 01:35:03 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:21703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abMqg-000102-QK for emacs-devel@gnu.org; Thu, 03 Mar 2016 01:34:58 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u236YuSU032251 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Mar 2016 06:34:56 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u236YtJX000392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 3 Mar 2016 06:34:56 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u236Ytnj024867; Thu, 3 Mar 2016 06:34:55 GMT In-Reply-To: <87r3fsjenn.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200884 Archived-At: > And it just struck me that it would be kinda nice if Emacs had a > literal character syntax for these things... So. Three options: >=20 > 1) Add a new syntax, perhaps something like ?\ucRIGHT-TO-LEFT- > OVERRIDE for the Unicode control characters we care about. >=20 > 2) Add a syntax for all Unicode characters, like ?\ucPILE-OF-POO. > We can just write ?=F0=9F=92=A9, so this isn't totally necessary, but > perhaps it's nice? >=20 > c) Do nothing, and continue writing code like the code above. Or > start using the Unicode control characters directly in the code, > but =E2=80=AEthere lies madness=E2=80=AC. (Note Unicode control charac= ters around > the last part of the previous sentence.) 4) (or is it d? ;-)) Continue to write code like that above. When it helps, add a comment showing or describing the char. Or be able to hit a key to describe the char whose code is at point: (defun describe-char-code-at-point () "Describe character whose code is at point." (interactive) (let* ((sexp (thing-at-point 'sexp)) (chr (and sexp (read sexp)))) (unless (characterp chr) (error "No character code at point")) (with-temp-buffer (insert chr) (describe-char (1- (point)))))) Use it with point anywhere on a char code, e.g., #x202e, to see its description, including, e.g.: name: LEFT-TO-RIGHT OVERRIDE general-category: Cf (Other, Format) decomposition: (8237) ('=E2=80=AD')