Emacs

yukio

Registered
Is it just me or does Emacs not recognise the "alt" key on the Mac? I'm using the 500Mhz Powerbook with Norwegian keyboard but that shouldn't make any difference ALT is always ALT. This is a major drawback in Emacs as anyone that has used it knows that it uses the ctrl and alt keys for all comands. Using the esc key alternative is much to time consuming when working in Emacs. Anybody else using Emacs? Does it recognize the alt key on your keyboard? Any workarounds? Is it possible to remap the key? It also doesn't recognise the Norwegian characters æ, ø, or å. Which makes writing in Emacs impossible. These characters are recognised in other terminal apps but not Emacs. Hmmph.
 

AdmiralAK

Simply Daemonic
I use emacs quite a lot for my code writting...
why do you use the ALT key ???
All commands for emacs I know of consist of control-[some letter]
or esc-[some letter] (Escape is the Meta key just in case you did not know, but you probably do ;) )
 

yukio

Registered
Yeah I know. But the ESCAPE version sucks big time. Especially when you have to do combinations when you have to hold down both META key and ctrl or shift etc. The ALT key IS a META key, the only problem is that Emacs still doesn't recognize it as a META key. The only reason we have to use ESCAPE is because it's a last resort of Emacs when all other attempts to find META feil. So the ESCAPE key is the inferior way of doing things. Also you have to hit ESCAPE first and then the rest of the keys. Whereas if Emacs could detect the ALT key you would be able to do things much faster (Single keystroke instead of 2).

It is possible to remap META function to this key in Emacs but I've never got that far. Point is, after all this time how come ALT is still not recognized as META in the default bindings :-(

[Edited by yukio on 10-31-2000 at 09:07 AM]
 

AdmiralAK

Simply Daemonic
I have tried the ALT key on a Sun machine just now, in CLI mode...
the ALT key did not work... I have two hypothesis...

1) The ALT key is only usable in the GUI version of emacs
or
2) I think you can make or edit your .emacs file in your user directory and make the alt key have the same
properties as the escape key

(I do agree with you that the esc key is more awkward)
 

yukio

Registered
Duh. :-(

Ever have one of those days?

I just took another look at the preferences for emacs and there is an option under emulation to switch on the ALT key as the ESCAPE sequence generator key

Happy productivity :)
 

kent37

Registered
Would you post the details of how to change the emacs preferences to enable the ALT key?

Thanks,
Kent
 

yukio

Registered
Typically it was the most obvoius choice.

Under one of the pulldown menus (not sitting on my Powerbook at the mo so don't have it in front of me) in the terminal app, you will find the preferences option for the programme. Go into the preferences and one one the optiuons is Emulation. Here you can toggle the ALT key emulation on or off.

Simple as that. Can't win though because with the Alt key emulator switched on you can't access the special characters on your keyboard ie. ALT KEY and ALT SHIFT KEY. Not a problem until you want to start writing any shell or Perl scripts which need some of thesen characters as part of their syntax. Ah well can't win them all.

Going to attempt to write a script that I can access via an alias to toggle the Alt emulator on and off.
 

lucifer

Registered
Has anybody noticed that emacs quickkeys also work in cocoa apps, like Fire, OmniWeb, TextEdit, etc. I was just using C-k out of habit and noticed that it did what I had intended. It's amazing how something so simple makes the world seem like a better place.
 
Top