* Accents through Mac OS Terminal @ 2007-02-08 23:40 googlegroups 2007-02-08 23:49 ` Pascal Bourguignon 0 siblings, 1 reply; 10+ messages in thread From: googlegroups @ 2007-02-08 23:40 UTC (permalink / raw) To: help-gnu-emacs I do a lot of editing on emacs over an ssh connection originating from the Mac OS Terminal. When I use vi or even at the shell prompt I can paste accented characters or use the built-in Mac OS dead keys with no problem. As soon as I bring up emacs, however, attempts to paste accented characters or use the dead keys result in a beep and no character entered. Why can other applications accept 8-bit accented characters when emacs cannot? Can I teach emacs to accept these characters? Colin p.s. I have read the numerous faqs and documentation on the topic. I'm not looking to enable emacs' internal character composition mechanism. I just want to paste or type accented characters and have them be accepted just like vi or the shell would accept them. p.p.s at this time I am using emacs 20.7.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-08 23:40 Accents through Mac OS Terminal googlegroups @ 2007-02-08 23:49 ` Pascal Bourguignon 2007-02-08 23:53 ` googlegroups 0 siblings, 1 reply; 10+ messages in thread From: Pascal Bourguignon @ 2007-02-08 23:49 UTC (permalink / raw) To: help-gnu-emacs googlegroups@juicer.orange-carb.org writes: > I do a lot of editing on emacs over an ssh connection originating from > the Mac OS Terminal. When I use vi or even at the shell prompt I can > paste accented characters or use the built-in Mac OS dead keys with no > problem. What terminal emulator do you use? I would advise you to upgrade to a more recent, (possibly second hand) Macintosh, so you can run MacOSX. -- __Pascal Bourguignon__ http://www.informatimago.com/ The mighty hunter Returns with gifts of plump birds, Your foot just squashed one. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-08 23:49 ` Pascal Bourguignon @ 2007-02-08 23:53 ` googlegroups 2007-02-09 0:13 ` Pascal Bourguignon 0 siblings, 1 reply; 10+ messages in thread From: googlegroups @ 2007-02-08 23:53 UTC (permalink / raw) To: help-gnu-emacs > What terminal emulator do you use? > > I would advise you to upgrade to a more recent, (possibly second hand) > Macintosh, so you can run MacOSX. Sorry for the confusion. I'm on Mac OS X running Terminal.app. Colin ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-08 23:53 ` googlegroups @ 2007-02-09 0:13 ` Pascal Bourguignon 2007-02-09 0:27 ` googlegroups 0 siblings, 1 reply; 10+ messages in thread From: Pascal Bourguignon @ 2007-02-09 0:13 UTC (permalink / raw) To: help-gnu-emacs googlegroups@juicer.orange-carb.org writes: >> What terminal emulator do you use? >> >> I would advise you to upgrade to a more recent, (possibly second hand) >> Macintosh, so you can run MacOSX. > > Sorry for the confusion. I'm on Mac OS X running Terminal.app. Ah, good. The problem is that emacs accepts by defaults 7-bit ASCII with the 8th bit meaning Meta- is pressed. So if you want to use the 8th bit to encode characters (be it iso-8859-1 or multibyte like UTF-8), then you need to configure Terminal.app to send an ESC for Meta- (you can do that in the Window Preferences of Terminal.app, keyboard pane). You should also configure the encoding used by Terminal.app, and set the environment variables LC_ accordingly. For example, if you use ISO-8859-1, you could set this environment variable: LC_ALL=en_US.ISO-8859-1 export LC_ALL emacs -nw -q Normally, emacs should pickup these variables to decode the keyboard. (Of course, substitute iso-8859-1 for the encoding you use and set in the Window Preferences of Terminal.app; be sure to set the changes for all the terminal windows). -- __Pascal Bourguignon__ http://www.informatimago.com/ The mighty hunter Returns with gifts of plump birds, Your foot just squashed one. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-09 0:13 ` Pascal Bourguignon @ 2007-02-09 0:27 ` googlegroups 2007-02-09 10:05 ` Peter Dyballa [not found] ` <mailman.4224.1171015605.2155.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 10+ messages in thread From: googlegroups @ 2007-02-09 0:27 UTC (permalink / raw) To: help-gnu-emacs On Feb 8, 7:13 pm, Pascal Bourguignon <p...@informatimago.com> wrote: > The problem is that emacs accepts by defaults 7-bit ASCII with the 8th > bit meaning Meta- is pressed. > > So if you want to use the 8th bit to encode characters (be it > iso-8859-1 or multibyte like UTF-8), then you need to configure > Terminal.app to send an ESC for Meta- (you can do that in the Window > Preferences of Terminal.app, keyboard pane). Hi Pascal, Thanks for the idea. I assume you mean the checkbox labelled "Use option key as meta key". Regardless of the setting of that switch it doesn't work. For example, to type e-acute I'd press option-e then e. - With it on then I get the beep on pressing option-e - With it off when I press option-e I see the "pending" accent but pressing 'e' the pending accent disappears and I get a beep. (I have made the locale setting you suggested as well.) Any other thoughts? Regards, Colin p.s. I've tried emacs in the local shell which is version 21.2.1 and that doesn't work either, so it isn't the ssh connection. Local vi does work. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-09 0:27 ` googlegroups @ 2007-02-09 10:05 ` Peter Dyballa [not found] ` <mailman.4224.1171015605.2155.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 10+ messages in thread From: Peter Dyballa @ 2007-02-09 10:05 UTC (permalink / raw) To: googlegroups; +Cc: emacs list Am 09.02.2007 um 01:27 schrieb googlegroups@juicer.orange-carb.org: > Thanks for the idea. I assume you mean the checkbox labelled "Use > option key as meta key". No, I think it's rather the first item in the Emulation group: non- ASCII characters to Esc sequences. -- Greetings Pete "America believes in education: the average professor earns more money in a year than a professional athlete earns in a whole week." – Evan Esar ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.4224.1171015605.2155.help-gnu-emacs@gnu.org>]
* Re: Accents through Mac OS Terminal [not found] ` <mailman.4224.1171015605.2155.help-gnu-emacs@gnu.org> @ 2007-02-09 16:28 ` googlegroups 2007-02-09 17:12 ` Stefan Monnier 2007-02-09 18:35 ` Pascal Bourguignon 0 siblings, 2 replies; 10+ messages in thread From: googlegroups @ 2007-02-09 16:28 UTC (permalink / raw) To: help-gnu-emacs On Feb 9, 5:05 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: > No, I think it's rather the first item in the Emulation group: non- > ASCII characters to Esc sequences. I've tried with that toggled on and off. With it on I get a beep, with it off I get a tab for "option-e e" for example, other accents produce different effects. In vi and at the shell this setting does not produce a difference. Accents work both with and without this option on. It seems as if emacs is just trying to interpret this character very differently than the shell or vi. Is it not possible to turn off emacs' interpretation of the character and just accept it as is? Regards, Colin ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-09 16:28 ` googlegroups @ 2007-02-09 17:12 ` Stefan Monnier 2007-02-12 21:16 ` googlegroups 2007-02-09 18:35 ` Pascal Bourguignon 1 sibling, 1 reply; 10+ messages in thread From: Stefan Monnier @ 2007-02-09 17:12 UTC (permalink / raw) To: help-gnu-emacs >> No, I think it's rather the first item in the Emulation group: non- >> ASCII characters to Esc sequences. > I've tried with that toggled on and off. With it on I get a beep, with > it off I get a tab for "option-e e" for example, other accents produce > different effects. > In vi and at the shell this setting does not produce a difference. > Accents work both with and without this option on. > It seems as if emacs is just trying to interpret this character very > differently than the shell or vi. Is it not possible to turn off > emacs' interpretation of the character and just accept it as is? You want to set your keyboard-coding-system: M-x set-keyboard-coding-system RET utf-8 RET the coding system you want to use is utf-8 because that's what Mac OS X's Terminal uses by default. Problem is: Emacs-20.7 does not support utf-8. Emacs-21.2 supports it to some extent, so it should work there. You may also need to set your terminal-coding-system in order to display those chars correctly. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-09 17:12 ` Stefan Monnier @ 2007-02-12 21:16 ` googlegroups 0 siblings, 0 replies; 10+ messages in thread From: googlegroups @ 2007-02-12 21:16 UTC (permalink / raw) To: help-gnu-emacs I'm up and running. Because I'm using emacs on at least one FreeBSD 4 machine (no UTF-8 locales) I set it up slightly differently (in order to preserve access to the accented characters at the shell prompt and in other apps). - Emacs 21.4 (version 20 did not seem to work) - locale (shell's LANG envvar) 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 This combination worked. Thanks for your tip about the coding systems. That, in concert with an upgrade to emacs 21.4 did the trick. Cheers, Colin On Feb 9, 12:12 pm, Stefan Monnier <monn...@iro.umontreal.ca> wrote: > You want to set your keyboard-coding-system: > > M-x set-keyboard-coding-system RET utf-8 RET > > the coding system you want to use is utf-8 because that's what Mac OS X'sTerminaluses by default. Problem is: Emacs-20.7 does not support utf-8. > Emacs-21.2 supports it to some extent, so it should work there. > You may also need to set yourterminal-coding-system in order to display > those chars correctly. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Accents through Mac OS Terminal 2007-02-09 16:28 ` googlegroups 2007-02-09 17:12 ` Stefan Monnier @ 2007-02-09 18:35 ` Pascal Bourguignon 1 sibling, 0 replies; 10+ messages in thread From: Pascal Bourguignon @ 2007-02-09 18:35 UTC (permalink / raw) To: help-gnu-emacs googlegroups@juicer.orange-carb.org writes: > On Feb 9, 5:05 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote: >> No, I think it's rather the first item in the Emulation group: non- >> ASCII characters to Esc sequences. > > I've tried with that toggled on and off. With it on I get a beep, with > it off I get a tab for "option-e e" for example, other accents produce > different effects. I'm sorry, I don't have a MacOSX at hand, but it's an option to send ESC when you type M- (Meta) vs. setting the 8th bit. I don't think it's related to this option to encode non-ASCII characters to ESC sequences, which may be something related to ISO-2022 or something. I wouldn't advise to activate this option, since ESC will be interpreted by emacs as Meta, and you will have this behavior, that when typing accented characters, they get converted into M- sequences most of them not bound to any command, therefore emacs beeps. Configure it to send ESC when you type Meta. And since you want to get accented characters by typing Option chords, find another key to map to Meta. For example Command. If you don't have enough key, forget it, and use a prefix ESC instead of Meta chords. > In vi and at the shell this setting does not produce a difference. > Accents work both with and without this option on. > > It seems as if emacs is just trying to interpret this character very > differently than the shell or vi. Is it not possible to turn off > emacs' interpretation of the character and just accept it as is? -- __Pascal Bourguignon__ http://www.informatimago.com/ "Logiciels libres : nourris au code source sans farine animale." ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-02-12 21:16 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-02-08 23:40 Accents through Mac OS Terminal googlegroups 2007-02-08 23:49 ` Pascal Bourguignon 2007-02-08 23:53 ` googlegroups 2007-02-09 0:13 ` Pascal Bourguignon 2007-02-09 0:27 ` googlegroups 2007-02-09 10:05 ` Peter Dyballa [not found] ` <mailman.4224.1171015605.2155.help-gnu-emacs@gnu.org> 2007-02-09 16:28 ` googlegroups 2007-02-09 17:12 ` Stefan Monnier 2007-02-12 21:16 ` googlegroups 2007-02-09 18:35 ` Pascal Bourguignon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).