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 14:59:56 -0800 (PST) Message-ID: <3109d383-d633-4be2-8859-1fa2e0c9e0fa@default> References: <87zjm4qeqi.fsf@wanadoo.es> <87vbwsq8mj.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 1391727629 21078 80.91.229.3 (6 Feb 2014 23:00:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 23:00:29 +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 Fri Feb 07 00:00:36 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 1WBXvu-0000U9-1A for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Feb 2014 00:00:34 +0100 Original-Received: from localhost ([::1]:38672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBXvt-0003zb-LB for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Feb 2014 18:00:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBXvV-0003zP-3w for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 18:00:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBXvM-0005xy-Hq for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 18:00:09 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:17761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBXvM-0005wt-CB for help-gnu-emacs@gnu.org; Thu, 06 Feb 2014 18:00:00 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s16MxwDE016164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Feb 2014 22:59:59 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s16Mxvo4012417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Feb 2014 22:59: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 s16MxuSS007621; Thu, 6 Feb 2014 22:59:56 GMT In-Reply-To: <87vbwsq8mj.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: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:95952 Archived-At: > Drew: > Thanks but that's not quite the thing I'm looking for. It is good > when you need to write a few unicode chars Why a few? It's precisely when you want to define *lots* of such chars that the macro is the most helpful. > and wish to save a few keystrokes by not invoking C-x 8 RET > , but not so convenient when you are interested on quickly > typing unicode chars on a similar way you type ordinary text, > which would require setting quite a few keybindings Suit yourself. But your "quickly typing unicode chars on a similar way you type ordinary text" sounds to me a *lot* like having keys that insert the chars you want - in effect, another (soft) keyboard or keyboard range. And that essentially means "setting quite a few keybindings". But you define those keys only once. And you can do it in a systematic way. You use the Shift key now to reach certain chars using your keyboard. You could just as easily use another key (as a prefix key) to "shift" any of your keys so they directly type Greek chars or math symbols. Why wouldn't you want a `lambda' key on your keyboard? And `alpha' ... `omega' keys if you use Greek letters a lot, as you say. =20 E.g., you now have `l' and `Shift l' (for `L'). Why not also, say, ` l' for lowercase lambda and `Shift l' for uppercase lambda? Likewise for other Greek letters you use. And for any such commands (e.g. some of the math symbols) that you do *not* want to bind to keys, it is trivial to use *completion* against the command name - which is also the Unicode char name. If by "quickly typing unicode chars on a similar way you type ordinary text" you really meant (as per Eli's suggestion) typing not a single key for the char but a bunch of keys that spell out the *name* of the char (e.g. `l a m b d a'), then that is what you already get with completion - except that you need not type the whole name. So in that sense too of "quickly typing...ordinary text", I would think that macro `ucsc-make-commands' would help you. > and it would not be an advantage over binding the key > sequences to (insert-char ). Sure, you could write your own: (defun my-THE-CHAR-command () (interactive) (insert-char )) But I suspect maybe you are missing the point. You would need to create such code (including the inserted ) for *each character* you use - either by hand or by program. Writing such code is exactly what macro `ucsc-make-commands' does for you. And it does it in one fell swoop for a whole range of chars. But again, suit yourself, of course. Just thought perhaps it was not clear what I was suggesting for your use case.