From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Character literals for Unicode (control) characters Date: Sat, 05 Mar 2016 15:28:22 +0000 Message-ID: References: <87r3fsjenn.fsf@gnus.org> <56D8623F.6060806@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0102ee205fba2f052d4ee26f X-Trace: ger.gmane.org 1457191727 4550 80.91.229.3 (5 Mar 2016 15:28:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2016 15:28:47 +0000 (UTC) To: Paul Eggert , Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 05 16:28:43 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 1acE8I-0003ky-Pf for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 16:28:43 +0100 Original-Received: from localhost ([::1]:46919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acE8F-0007e3-7G for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 10:28:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acE8A-0007dw-QQ for emacs-devel@gnu.org; Sat, 05 Mar 2016 10:28:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acE89-0000X5-HO for emacs-devel@gnu.org; Sat, 05 Mar 2016 10:28:34 -0500 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:33878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acE89-0000Wz-63 for emacs-devel@gnu.org; Sat, 05 Mar 2016 10:28:33 -0500 Original-Received: by mail-wm0-x22a.google.com with SMTP id p65so55624953wmp.1 for ; Sat, 05 Mar 2016 07:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=VrWQHOPbjYO1EdUkGDxP2HP43tNW5hLo9Wp9TlNw6NM=; b=IhhFdZal6lcv7xcEjou2e0S5HHSIdxcHwa6bhIiWWfuBxdDPZgHLXJW20E7UybjMRh R8MX+s4JSVeIrmfs2kjzJpBbvNCnvi8/Xqmg62FkaZsfYDOIkGBuYCruivtHjpwhRRLT Pcmwoqz97x4th3cN9H84cfRweKBwvPsN1RAhu6dSxy1xulsb0cFt5UQ2lBeKKLWSt/Ab cSFFyGOQ+Q7PpMDF2ML1bQTrqJbsiiYN/yc5d5U9GdYF8sPkytiQXL0WoVKZZ7/YNZtr kQ2lYDl0FLTgkVHcdKr/XNECsHROt8ExZnHORiHYOW6MpC4M3xJldB0bFZqGSAPzBHm9 G+Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=VrWQHOPbjYO1EdUkGDxP2HP43tNW5hLo9Wp9TlNw6NM=; b=fIdF4YL2Dor19h5WRz9oYlulHhAXZu/58D2WULRIc8tnHYylR2l/t3zFadaq6l0z0e ycC1978tkQr7ljSe0RiXrTNyooPGxshFBbAnU23RIM6sVylYG9tM2lmaPwq6RFM8p9IZ /6RYQAb+FdpPWthDRamgOfk3nM7eAWplA1HkmzWjkXQ4nSc/LdYH4vhS5eitLMX/yYLs Aor7Jo/sVgz8PPqaX8KnwTtP9S+IuwlUXCJdCrYG4cNdcYh1L9DBii+r2v2Hnf5IDvIA 5fT7z5Q1lKWBPiVHkat57mfKYnpFrSCboq9uhknHFw0ULWNFaMfeqijaXPOeLx3CpHsM m1GQ== X-Gm-Message-State: AD7BkJJrTjhiml9tZ7nPDmC4pruXlk4CPihYGwulhNcekFy75vEuRj2SgQSqHkqSKOi8ytXblG0o0SKe42TEIA== X-Received: by 10.194.87.161 with SMTP id az1mr14322932wjb.163.1457191712174; Sat, 05 Mar 2016 07:28:32 -0800 (PST) In-Reply-To: <56D8623F.6060806@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22a 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:200952 Archived-At: --089e0102ee205fba2f052d4ee26f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Paul Eggert schrieb am Do., 3. M=C3=A4rz 2016 um 17:11= Uhr: > On 03/02/2016 09:47 PM, Lars Ingebrigtsen wrote: > > And then I thought -- well, if we should have a literal syntax for > > Unicode control characters, why not for all of them? > Something like that would make sense. The escape sequence should bracket > the name, so that the escape sequences could be used in strings without > ambiguity. Something like \u[NAME], say. > > I'd still prefer to use characters as-is in strings if they're > displayable, e.g., the Lisp string: > > "Use Greek capital letters (=CE=91=E2=80=93=CE=A9) to denote figures." > > is more readable than: > > "Use Greek capital letters (\u[GREEK CAPITAL LETTER ALPHA]\u[EN > DASH]\u[GREEK CAPITAL LETTER OMEGA]) to denote figures." > > But for undisplayable or hard-to-read characters the escape sequence > would be a win. > > More issues: should we insist on the full official name? should we allow > obsolescent aliases? lower-case instead of upper case? initial prefixes > of names? > > We should probably do whatever Perl does ( http://perldoc.perl.org/charnames.html). I haven't checked in detail what is allowed by Perl (except that it allows \N{name} and \N{U+code}), but it would be simpler to just adopt Perl's behavior (to a reasonable extend) than trying to come up with our own syntax. --089e0102ee205fba2f052d4ee26f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Paul E= ggert <eggert@cs.ucla.edu> = schrieb am Do., 3. M=C3=A4rz 2016 um 17:11=C2=A0Uhr:
On 03/02/2016 09:47 PM, Lars Ingebrigtsen wrote:
> And then I thought -- well, if we should have a literal syntax for
> Unicode control characters, why not for all of them?
Something like that would make sense. The escape sequence should bracket the name, so that the escape sequences could be used in strings without
ambiguity. Something like \u[NAME], say.

I'd still prefer to use characters as-is in strings if they're
displayable, e.g., the Lisp string:

"Use Greek capital letters (=CE=91=E2=80=93=CE=A9) to denote figures.&= quot;

is more readable than:

"Use Greek capital letters (\u[GREEK CAPITAL LETTER ALPHA]\u[EN
DASH]\u[GREEK CAPITAL LETTER OMEGA]) to denote figures."

But for undisplayable or hard-to-read characters the escape sequence
would be a win.

More issues: should we insist on the full official name? should we allow obsolescent aliases? lower-case instead of upper case? initial prefixes
of names?


We should probably do whatever Perl do= es (http://perldoc.perl.= org/charnames.html). I haven't checked in detail what is allowed by= Perl (except that it allows \N{name} and \N{U+code}), but it would be simp= ler to just adopt Perl's behavior (to a reasonable extend) than trying = to come up with our own syntax.
--089e0102ee205fba2f052d4ee26f--