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: if vs. when vs. and: style question Date: Wed, 25 Mar 2015 11:23:54 -0700 (PDT) Message-ID: <2e26e6c1-af36-40a5-88b3-ab7d0984bf2c@default> References: <87sicvwckx.fsf@wmi.amu.edu.pl> <87wq27yvqg.fsf@debian.uxu> <8d531e99-7260-4263-ac99-09c6871e2708@googlegroups.com> <87vbhq53lf.fsf@debian.uxu> <87a8z23p23.fsf@kuiper.lan.informatimago.com> <87lhilx0cf.fsf@debian.uxu> <87twx9360u.fsf@kuiper.lan.informatimago.com> <0d1d19ab-06e9-462d-8867-9a49b1e232d3@googlegroups.com> <87lhil2io1.fsf@kuiper.lan.informatimago.com> 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 1427307912 31918 80.91.229.3 (25 Mar 2015 18:25:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2015 18:25:12 +0000 (UTC) To: Dan Espen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 25 19:24:59 2015 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 1Yapz5-0000aQ-Hc for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 19:24:55 +0100 Original-Received: from localhost ([::1]:40759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yapz4-0003yW-Uw for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 14:24:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YapyC-0002lT-F1 for help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 14:24:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yapy8-0004Jd-Ky for help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 14:24:00 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:31240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yapy8-0004JN-Bg for help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 14:23:56 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2PINtic030479 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 25 Mar 2015 18:23:55 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t2PINsD3026159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 25 Mar 2015 18:23:55 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t2PINsk4008488; Wed, 25 Mar 2015 18:23:54 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] 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:103336 Archived-At: > > If you use a particular Unicode character often, just give its > > insertion a command and bind that to a key. If you have 30 such > > chars, put them all on a prefix key. Or use completion on their > > command names (names you created, so easy for you to type, remember, > > complete to,...). > > > > IOW, it's not a big deal to insert Unicode characters, especially > > if you insert the same ones over and over. You do not need to use > > `C-x 8 RET' each time. >=20 > Sorry, that scales up for more than 1 or 2 characters how? Well, I doubt that I can convince you. I can only repeat what I suggested. There is a big difference, I think, between (1) using `C-x 8 RET' to complete against zillions of character names (or code points) that you might not be familiar with and (2) completing against a relative few (5? 10? 50? 150?) char-command names that you yourself came up with. My point is that if someone uses relatively few - which, depending on the person, could be 5 or 500 (or 5000?) chars, then it can make sense to put their insertion on keys (commands). > I already have a little piece of oak tag paper that I've cut out > to surround the 6-key pad above the arrow keys. > The paper has the legend: >=20 > UNDO > FRONT OPEN AGAIN > -keys- > COPY >=20 > Yep, even for 5 specially assigned keys, my mind sometimes goes > blank and I look at the paper. Hey, my mind goes blank too. But instead of paper I use completion. IOW, I ask Emacs for help. > A normal keyboard just isn't designed for a bunch of strange > characters. Maybe so. But if you use the euro character a *lot*, for example, then you might just consider assigning it a key. Rather than using `C-x 8 RET euro sign RET' each time to insert it. It's also possible to have a command that, in effect, switches to a keymap that treats your American keyboard as a French one or whatever, just by changing the relevant key bindings. Is that useful for someone? Maybe; dunno. > Another poster described the issue well. > If we used some other kind of input device, those characters > might be a good idea. Until then, not so much. Given a particular physical keyboard, it's a tradeoff (i.e. choice) wrt which keys do what. Certainly it is true that the keys of a typical American keyboard are used a lot in programming languages, so someone who programs is likely to want to keep those keys bound to the self-inserting chars they default to. Such a programmer probably needs `$' on a key, and isn't about to replace it with a euro symbol. But beyond that, it can make sense for someone to assign relatively easy key sequences to insertion of frequently used Unicode chars. It all depends on what you need, what you use Emacs for. If you use lots of Greek chars, but mixed in with mostly ASCII or Latin 1 chars, then it might make sense for you to assign simple key sequences to Greek chars. If you write *mostly* Greek then you might want to use a Greek keyboard or remap the keys of a non-Greek keyboard to Greek chars. FWIW, I think that my library `ucs-cmds.el' can help in the former case. You can quickly define commands that insert specific chars, by specifying a Unicode range etc. (http://www.emacswiki.org/emacs/download/ucs-cmds.el) This macro call creates an insertion command for each Greek letter: (ucsc-make-commands "^greek [a-z]+ letter") That's 330 commands (330 chars). Here are the commands for the letter epsilon, for example: =20 greek-capital-letter-epsilon =20 greek-capital-letter-epsilon-tonos =20 greek-capital-letter-epsilon-with-dasia =20 greek-capital-letter-epsilon-with-dasia-and-oxia =20 greek-capital-letter-epsilon-with-dasia-and-varia =20 greek-capital-letter-epsilon-with-oxia =20 greek-capital-letter-epsilon-with-psili =20 greek-capital-letter-epsilon-with-psili-and-oxia =20 greek-capital-letter-epsilon-with-psili-and-varia =20 greek-capital-letter-epsilon-with-varia =20 =20 The command names are the Unicode char names, with hyphens instead of spaces, and lowercase instead of uppercase. You can of course create shorter aliases, if you like, and use completion with `M-x'. And you can assign the 20 or 50 Greek chars that you use most often to short key sequences. Or you can put a bunch of the commands (or all 330) on a prefix key, say `C-M-g'. (And nothing requires you to create a command for each of the 330 Unicode Greek chars. It's easy to define just the commands you need.) It's all about what you need. If you don't need to insert Unicode chars, then "Circulez ; il n'y a rien a voir." As for opening the floodgates to the use of Unicode in programming code, I don't see that as a problem, one way or the other, wrt user-defined names. On the other hand, if you use a language that *requires* you to use Unicode chars that are hard for you to input, then I'd suggest that you either try something like the above (e.g., type `=3D>' to get the arrow char you want) or you change languages. ;-)