all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Aurélien Aptel" <aurelien.aptel+emacs@gmail.com>,
	help-gnu-emacs@gnu.org
Subject: RE: Using punctuation in abbrev
Date: Sat, 1 Jun 2013 11:42:56 -0700 (PDT)	[thread overview]
Message-ID: <c4309ff1-04a0-4eff-87ce-2bd24fbcf6b3@default> (raw)
In-Reply-To: <CA+5B0FOyMxL4U-+LCthS0xmbeoB=0n61eETT8bvCb-vJnW2Pog@mail.gmail.com>

> I want to substitute $-> with a unicode rightwards arrow (U+2192  →).

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., <f9>):

(global-set-key [f9] 'right-arrow)

You can use a numeric prefix arg to insert multiple right arrows:
`M-8 <f9>' inserts eight right arrows.



  reply	other threads:[~2013-06-01 18:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 17:41 Using punctuation in abbrev Aurélien Aptel
2013-06-01 18:42 ` Drew Adams [this message]
2013-06-01 22:49   ` Aurélien Aptel
2013-06-02 18:48     ` Drew Adams
     [not found]   ` <mailman.841.1370126985.22516.help-gnu-emacs@gnu.org>
2013-06-02  5:02     ` Emanuel Berg
2013-06-02  5:21     ` Emanuel Berg
2013-06-02 17:17       ` Aurélien Aptel
2013-06-02 18:10         ` Jambunathan K
2013-06-03  3:44         ` Yuri Khan
     [not found]         ` <mailman.905.1370231076.22516.help-gnu-emacs@gnu.org>
2013-06-03 18:05           ` Emanuel Berg
2013-06-04  3:05             ` Yuri Khan
2013-06-04  9:14               ` Aurélien Aptel
     [not found]             ` <mailman.968.1370315124.22516.help-gnu-emacs@gnu.org>
2013-06-04 17:27               ` Emanuel Berg
2013-06-05  6:59                 ` Yuri Khan
     [not found]                 ` <mailman.1022.1370415567.22516.help-gnu-emacs@gnu.org>
2013-06-05 21:12                   ` Emanuel Berg
2013-06-04 21:39             ` Stefan Monnier
     [not found]             ` <mailman.1002.1370382007.22516.help-gnu-emacs@gnu.org>
2013-06-04 22:47               ` Emanuel Berg
     [not found]       ` <mailman.880.1370193431.22516.help-gnu-emacs@gnu.org>
2013-06-02 19:48         ` Emanuel Berg
2013-06-02 21:06           ` Stefan Monnier
2013-06-02 22:36           ` Aurélien Aptel
     [not found]           ` <mailman.901.1370212579.22516.help-gnu-emacs@gnu.org>
2013-06-03  0:10             ` Emanuel Berg
2013-06-02 14:24 ` Stefan Monnier
2013-06-02 17:00   ` Aurélien Aptel
2013-06-02 17:54     ` Andreas Röhler
2013-06-02 17:56     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4309ff1-04a0-4eff-87ce-2bd24fbcf6b3@default \
    --to=drew.adams@oracle.com \
    --cc=aurelien.aptel+emacs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.