# emacs/terminal problem



## fluca1978 (Nov 16, 2011)

Hi,
I installed emacs-nox11, and I cannot active the _replace all_ feature. I have to hit META-% to activate such feature, having META = ALT on my pc keyboard and % done with SHIFT+5 (italian keyboard layout). The problem is that I can activate all simple META-<function> and I can digit % with SHIFT+5 but when combined all together I got nothing. It is like no key is pressed. I suspect this is a problem of the console setup, I've tried con25 and xterm. Any suggestion is welcome!


----------



## jrm@ (Nov 16, 2011)

Do you use sysutils/tmux or sysutils/screen?  Does it work when you are in either of those?

What is $LANG set to?  Try unsetting $LANG and putting something like the following in ~/.login_conf:


```
me:\
        :charset=utf-8:\
        :lang=it_IT.UTF-8:
```

and running

`% cap_mkdb .login_conf`

See login.conf() for details.

What does your ~/.emacs look like?


----------



## darcsis (Nov 16, 2011)

I just tried that combination in pure console environment. You have to press `ESC' (which is META) first, release `ESC', and then press shift+5. Everything goes fine. I don't know if you had done it the same way.


----------



## jrm@ (Nov 16, 2011)

If having to press/release <Esc> is too tedious (<alt> is in a nicer location and you don't have to release it), I've read that switching your keyboard mapping to us.emacs makes <alt> work as <meta>, although it didn't work for me.  What did work for me on the console was unsetting $LANG and $LC_* and running sysutils/tmux, which sets $TERM=screen.  Then <alt> == <meta> as in X.


----------



## fluca1978 (Nov 17, 2011)

jrm said:
			
		

> Do you use sysutils/tmux or sysutils/screen?  Does it work when you are in either of those?



No, I don't know what they are but I'm trying to find out.
I can confirm that emacs is using ESC as META key.



			
				jrm said:
			
		

> What is $LANG set to?  Try unsetting $LANG and putting something like the following in ~/.login_conf:
> 
> 
> ```
> ...



My LANG was set to en_US-UTF-8. I've tried to add the lines above to the .login_conf and run `% cap_mkdb` but nothing has changed. 




			
				jrm said:
			
		

> What does your ~/.emacs look like?



I don't have actually one, so I don't guess that's the problem.

I've tried also to set the italian keyboard via sysinstall, but again Emacs is using ESC as meta key.


----------

