Accented characters in emacs

This Entry:
Date: 2007-02-12
Time: 16:08
Comments: 1



Return To:
Recent Entries

Elsewhere:
Category Selector

Search:
Archive:
 • Apr 2008 (2)
 • Mar 2008 (2)
 • Feb 2008 (2)
 • Jan 2008 (4)
 • Dec 2007 (2)
 • Nov 2007 (4)
 • Oct 2007 (1)
 • Sep 2007 (6)
 • Aug 2007 (4)
 • Jul 2007 (3)
 • Jun 2007 (2)
 • May 2007 (2)
 • Apr 2007 (4)
 • Mar 2007 (2)
 • Feb 2007 (4)
 • Jan 2007 (4)
 • Dec 2006 (4)
 • Nov 2006 (24)
 • Oct 2006 (3)
 • Sep 2006 (1)
 • Aug 2006 (2)
 • Jul 2006 (3)
 • Jun 2006 (6)
 • May 2006 (5)
 • Apr 2006 (5)
 • Mar 2006 (1)
 • Feb 2006 (8)
 • Jan 2006 (11)
 • Dec 2005 (8)
 • Nov 2005 (12)
 • Oct 2005 (10)
 • Sep 2005 (18)
 • Aug 2005 (8)
 • Jul 2005 (10)
 • Jun 2005 (14)
 • May 2005 (8)
 • Apr 2005 (10)
 • Mar 2005 (14)
 • Feb 2005 (12)
 • Jan 2005 (12)
 • Dec 2004 (9)
 • Nov 2004 (18)
 • Oct 2004 (13)
 • Sep 2004 (12)
 • Aug 2004 (16)
 • Jul 2004 (6)
 • Jun 2004 (10)
 • May 2004 (8)
 • Apr 2004 (8)
 • Mar 2004 (27)
 • Feb 2004 (19)
 • Jan 2004 (8)
 • Dec 2003 (10)
 • Nov 2003 (18)
Random Entry

Others:
 • Jen
 • Keltie
 • On LiveJournal

Accented characters in emacs

Emacs is a pretty good editor. Recently I’ve been hosting a traditional music show and I find myself needing to type accents for Irish and Scottish. This is of course in addition to the french accents I’ve been needing for years.

I use the Mac OS X Terminal application and the system lets me enter accents using dead keys. I hold option and press e to set up an acute accent, then press e again and get é.

This worked in the shell, but did not work in emacs. Now, emacs has lots of different ways to do its own keyboard entry, but I wanted my mac keys to work.

To complicate matters, I use emacs on at least one machine running FreeBSD 4 which does not support UTF-8 encodings (the mac default).

I have had success with the following combination:

  • Emacs 21.4 (version 20 does not work)
  • locale set to en_CA.ISO8859-1
  • Escape non-ASCII characters off (Terminal window setting)
  • Character Set Encoding: Western ISO Latin 1 (Terminal window setting)
  • Use option key as meta key off (Terminal window setting)
  • (set-terminal-coding-system 'iso-latin-1) in ~/.emacs
  • (set-keyboard-coding-system 'iso-latin-1) in ~/.emacs

Now I can type and paste accented text into the terminal application and thence into emacs. The accents come through OK and seem to save and email OK too!

return to cmh blog Science & Nature › technology     2007-02-12 16:08   ...1
Helped at least one!

The link comes on the first page google search for 'emacs accents', and the '(set-terminal-coding-system 'iso-latin-1)' plus '(set-keyboard-coding-system 'iso-latin-1) ' work well on Linux - thanks, George.
at 2007-4-7 12:39 by G. Georgiev
Add your comment...

your name Help stop spammers: prove you're human! 
    Three plus three is: (learn more
subject/title
comment





All content © 2003-2005 by Colin Henein. All rights reserved.
People & Places CMH Science & Nature Opinion Arts & Literature Sports & Leisure