LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Emacs 8-bit input as meta key (https://www.linuxquestions.org/questions/linux-software-2/emacs-8-bit-input-as-meta-key-124061/)

cilantro 12-08-2003 09:36 PM

Emacs 8-bit input as meta key
 
When logged into a remote machine, I run emacs inside an xterm window using "emacs -nw".
Starting with emacs 21, I'm having trouble getting 8-bit data to be interpreted as a meta key; instead of M-d I get an a-umlaut. I have access to 4 Linux machines which behave differently:
Machine 1 (RH 9; emacs 21.2): LANG=en-US.UTF8 produces accented characters;
LANG=en-US gives meta key.
Machine 2 (RH 9; emacs 21.2): Always gives meta key.
Machine 3 (Debian 3; emacs 21.2): Always gives meta key.
Machine 4 (SuSE 9; emacs 21.3): Never gives meta key.
So far as I can tell, the environments on all 4 machines are the same, but I don't understand all this locale stuff, nor the new mule support in emacs.

Can someone tell me a reliable way to force emacs to interpret 8-bit characters the old way, that is, as though the meta key were held down? I'm willing to disable international character support if necessary. The only kluge I've been able to come up with is to reprogram all the 8-bit keys I use to not self-insert, but rather map to their meta equivalents, but there's surely a better way.

I'm considering switching from RH to SuSE, but want to get this resolved first if possible.

Thanks.

ToniT 12-08-2003 09:43 PM

Puting to your ~/.inputrc
Code:

set input-meta on
set output-meta on
set convert-meta off

might help.

I have also in my ~/.emacs
Code:

(custom-set-variables
 '(current-language-environment "Latin-9")
 '(default-input-method "latin-9-prefix")
 '(keyboard-coding-system (quote iso-latin-9))
)


cilantro 12-08-2003 10:06 PM

Thanks, but neither of these worked.
(Your inputrc commands appear to be in /etc/inputrc already.)

ToniT 12-09-2003 03:41 PM

One more thing. In xterm, there is a setting (Ctrl-firstMouseButton) called 'Meta sends escape'. It might also have an effect.

To make setting permanent, put a line 'XTerm*metaSendsEscape: true' to your Xresourses file (/etc/Xresourses/aFile or ~/.Xresources). Loading of file in users home directory might depend on the distribution. 'xrdb -merge ~/.Xresources' changes the settings recardless of the distribution.

cilantro 12-09-2003 09:27 PM

No change.

Meta commands in tcsh, which uses emacs-like syntax, work fine, even though the same commands yield 8-bit characters with "cat -v".
(This is true on all machines referred to in my original post.)

I think it must be an emacs setting; I want meta to load the esc-map, rather than self-insert commands.

cilantro 12-11-2003 11:21 PM

Finally figured it out -- just put
(set-keyboard-coding-system nil)
in .emacs!


All times are GMT -5. The time now is 04:33 PM.