From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Writing source code with Unicode characters Date: Thu, 6 Feb 2014 10:48:56 -0800 (PST) Message-ID: References: <87zjm4qeqi.fsf@wanadoo.es> 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 1391712558 1989 80.91.229.3 (6 Feb 2014 18:49:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 18:49:18 +0000 (UTC) To: =?utf-8?B?w5NzY2FyIEZ1ZW50ZXM=?= , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 06 19:49:26 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1WBU0r-0007dr-Sp for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 19:49:26 +0100 Original-Received: from localhost ([::1]:37977 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBU0r-0003SP-Br for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 13:49:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBU0a-0003SE-8Y for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 13:49:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBU0S-0001IX-Kg for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 13:49:08 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:50630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBU0S-0001IR-Dl for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 13:49:00 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s16ImwvX024971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Feb 2014 18:48:59 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s16ImvAW007115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Feb 2014 18:48:58 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s16Imvjl025903; Thu, 6 Feb 2014 18:48:57 GMT In-Reply-To: <87zjm4qeqi.fsf@wanadoo.es> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95945 Archived-At: > I'll like to experiment with using Unicode on source code (=CE=BB instead > of lambda, etc) but it seems quite inconvenient to insert those chars > with C-x 8 RET. Org-mode has the capability of displaying =CE=BB when you= type > \lambda, but that's just a display replacement, the raw text still > is \lambda. >=20 > What can I use to make more convenient the insertion of Unicode > chars? (I'm mostly interested on Greek letters and other math-related > symbols) `C-x 8 RET' is extremely general, since it tries to handle all Unicode chars. Try library `ucs-cmds.el', here: http://www.emacswiki.org/emacs-en/download/ucs-cmds.el (code) http://www.emacswiki.org/emacs-en/UnicodeEncoding#ucs-cmds.el (description) Use it to define commands that insert particular Unicode chars that you use most of the time. Then bind those commands to keys if you want. These examples from the Commentary in `ucs-cmds.el' should be relevant for your particular use cases: (ucsc-make-commands "^greek [a-z]+ letter") ; Greek characters (ucsc-make-commands "^math") ; Math symbols Those define individual commands that insert the Greek chars and the Unicode math symbols. For example, one of those commands that gets defined is `greek-small-letter-lambda', which inserts a lowercase lambda character. Another command so defined is `mathematical-bold-fraktur-capital-r'. Here is its doc string: ,---- | mathematical-bold-fraktur-capital-r is an interactive Lisp function. |=20 | (mathematical-bold-fraktur-capital-r ARG) | =20 | Insert Unicode character `MATHEMATICAL BOLD FRAKTUR CAPITAL R'. | This character has code point 120189. `----