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: Using punctuation in abbrev Date: Sat, 1 Jun 2013 11:42:56 -0700 (PDT) Message-ID: References: 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 1370112192 22465 80.91.229.3 (1 Jun 2013 18:43:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Jun 2013 18:43:12 +0000 (UTC) To: =?utf-8?B?QXVyw6lsaWVuIEFwdGVs?= , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 01 20:43:12 2013 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 1Uiqlk-0001zd-4y for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Jun 2013 20:43:12 +0200 Original-Received: from localhost ([::1]:57231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uiqlj-0002Uu-2c for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Jun 2013 14:43:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uiqla-0002Up-2j for help-gnu-emacs@gnu.org; Sat, 01 Jun 2013 14:43:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiqlY-0000xu-AC for help-gnu-emacs@gnu.org; Sat, 01 Jun 2013 14:43:01 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiqlY-0000wl-3I for help-gnu-emacs@gnu.org; Sat, 01 Jun 2013 14:43:00 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r51IgvqY019014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 1 Jun 2013 18:42:58 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r51IgurD024581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Jun 2013 18:42:57 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r51Iguwd024577; Sat, 1 Jun 2013 18:42:56 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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:91217 Archived-At: > I want to substitute $-> with a unicode rightwards arrow (U+2192 =E2=86= =92). 1. Does that mean that you want to type `$->' and use `expand-abbrev' each time to insert a Unicode right arrow? If so, and if you don't really care whether you use abbrev, consider binding insertion of a right arrow char to a key sequence instead. 2. On the other hand, if you already have lots of `$->' occurrences in your text and you want to change them to right arrows, consider using `query-replace' or `replace-string' instead. For #1, library ucs-cmds.el can help. http://www.emacswiki.org/emacs-en/download/ucs-cmds.el http://www.emacswiki.org/emacs/UnicodeEncoding Command `ucsc-insert' is a replacement for `insert-char'. You can remap the keys bound to `insert-char' to `uscs-insert', if you like: (define-key global-map [remap insert-char] 'ucsc-insert) Unless you give `ucsc-insert' a negative prefix arg it does the same thing as `insert-char'. With a negative prefix arg it creates a command that inserts the Unicode character you choose. You can provide the character by hex or by name (with completion). In this case, that means 2192 or "RIGHT ARROW". Create command `right-arrow', which inserts a right arrow char (U+2192): M-- M-x ucsc-insert 2192 RET Bind the command to a key (e.g., ): (global-set-key [f9] 'right-arrow) You can use a numeric prefix arg to insert multiple right arrows: `M-8 ' inserts eight right arrows.