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: Feature suggestion Date: Sat, 2 Jun 2012 07:13:29 -0700 Message-ID: <4474CA1C129E49B097021E28AC0E3222@us.oracle.com> References: <838vg71s69.fsf@gnu.org> <28C5EC9D641F4FB69EF781F8ECA1A207@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338646438 20690 80.91.229.3 (2 Jun 2012 14:13:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2012 14:13:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: , "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 02 16:13:57 2012 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 1Sap5W-0005n1-Pb for ged-emacs-devel@m.gmane.org; Sat, 02 Jun 2012 16:13:54 +0200 Original-Received: from localhost ([::1]:53513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sap5W-0005t7-6H for ged-emacs-devel@m.gmane.org; Sat, 02 Jun 2012 10:13:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sap5S-0005sR-M6 for emacs-devel@gnu.org; Sat, 02 Jun 2012 10:13:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sap5P-0005Fp-Mb for emacs-devel@gnu.org; Sat, 02 Jun 2012 10:13:50 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:38269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sap5M-0005Dr-59; Sat, 02 Jun 2012 10:13:44 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q52EDcPp001408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 2 Jun 2012 14:13:39 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q52EDcwF017174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Jun 2012 14:13:38 GMT Original-Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q52EDcJI030910; Sat, 2 Jun 2012 09:13:38 -0500 Original-Received: from dradamslap1 (/10.159.223.197) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 02 Jun 2012 07:13:37 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <28C5EC9D641F4FB69EF781F8ECA1A207@us.oracle.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac1ANeTRQxNPK79ETVyrGN0ZwpV/hwAAHAygACOZ/vA= X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:150734 Archived-At: > > I think there is a way to enter characters by their long names, too, > > but I don't recall what it is. It would be good to mention that > > method too. > > `C-x 8 RET' (command `ucs-insert') also lets you complete > against the char name. FWIW - 1. I use a variant (`ucsc-insert') of `ucs-insert' that has the same behavior except for a negative prefix arg (`ucs-insert' is anyway a no-op for such an arg): * A negative arg is treated as its absolute value, so -3 inserts 3 copies of the char, just like 3 does. * A negative arg also automatically creates a command that inserts the same character (accepting a prefix arg for multiple copies). The command name is the same as the char name, except lowercase and with SPC chars replaced by hyphens (`-'). I bind it to `C-x 8 RET', obviously. For example, if you use `C-- C-x 8 RET greek capital letter delta' (e.g., using completion), then it defines a command `greek-capital-letter-delta' that inserts that char. Convenient for binding keys to effectively add Unicode chars to your keyboard. 2. I define a macro, `ucsc-make-commands', that takes a regexp arg and defines all such insertion commands for chars whose names match the regexp. Examples: (ucsc-make-commands "^math") ; Math symbols (ucsc-make-commands "latin") ; Latin alphabet characters (ucsc-make-commands "arabic") (ucsc-make-commands "^cjk") ; Chinese, Japanese, Korean characters (ucsc-make-commands "^box drawings ") (ucsc-make-commands "^greek [a-z]+ letter") ; Greek characters (ucsc-make-commands "\\(^hangul\\|^circled hangul\\|^parenthesized hangul\\)") Note that a drawback to using `ucs[c]-insert' with completion is that it is slow - there are *many* Unicode chars. This lets you use it when you really need it, but have tailor-made insertion commands for the chars you use often. And of course even if you do not bind most such commands, completion against their names is much quicker, since the domain is smaller (even if you create a lot of such commands). The code is here: http://www.emacswiki.org/emacs/download/ucs-cmds.el I have no objection to it being added to Emacs (the patch is trivial).