logo       

Re: question: remapping accented character: msg#00044

emacs.macintosh.osx

Subject: Re: question: remapping accented character

Yes, this works! Thanks.

Marc

Le 8 août 07 à 12:39, xah lee a écrit :

this might help:

(global-set-key (kbd "é") ' (lambda () (interactive) (insert "=(^_^) =")))

Xah
xah@xxxxxxxxxx
http://xahlee.org/


On Aug 8, 2007, at 3:28 AM, Marc Shapiro -- at work wrote:

Thanks. I hadn't thought of your suggestions, but they don't do what I need. I will be typing ordinary French words or names (which contain diacriticals very frequently), so I want to use ordinary keyboard strokes.

For instance, I would like type "Léa" and get "L{{\'e}}a" in the buffer, or type "François" and get "Fran{{\,c}}ois" in the buffer. A word might even contain several diacriticals, e.g. typing "déjà" should insert "d{{\'e}}j{{\`a}}".

The abbrev feature doesn't work because I would have to create abbreviations for every possible word. The shortcut is not helpful either because it causes too much extraneous typing.

Marc

Le 8 août 07 à 12:12, xah lee a écrit :

you can use abrrev feature:

(define-abbrev-table 'global-abbrev-table '(
("alpha" "α" nil 0)
("beta" "β" nil 0)
("gamma" "γ" nil 0)
("theta" "θ" nil 0)
("Infinity" "∞" nil 0)
("eop" "∎" nil 0)
("luv" "♥" nil 0)
("é" "{{\\\\'e}}" nil 0)
)
)

or you can define a shortcut to insert whatever:

(global-set-key (kbd "M-i a") (lambda () (interactive) (insert "α")))
(global-set-key (kbd "M-i b") (lambda () (interactive) (insert "β")))
(global-set-key (kbd "M-i t") (lambda () (interactive) (insert "θ")))

Xah
xah@xxxxxxxxxx
http://xahlee.org/
-----------------

On Aug 8, 2007, at 2:32 AM, Marc Shapiro -- at work wrote:

Hi. This is probably the wrong place for this question, but I really can't figure out where to find this information.

How can I remap accented characters? Specifically, in bibtex mode (because bibtex does not deal correctly with Latin-1), when I type "é" (e-acute-accent) I wish the string "{{\\'e}}" to appear in the buffer. Similarly for other diacritical characters.

Everything I tried so far has failed. Thanks for any help.

Marc

---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>





---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>







---------------------------- Info -----------------------------
List Post: <mailto:macosx-emacs@xxxxxxxxxxxxxxxxx>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise