News for hackers. Stuff that matters.
Re:What’s New In Emacs 24 by unit_testing on Friday December 09, 2011 @11:20AM (#3334252)
I'd love to take this opportunity to dive into Emacs, but the past few times I've tried, it's felt like my keyboard was fighting against me. For those of you using Emacs on a Macbook (or an Apple keyboard), which key do you use for 'alt'?
Re:What’s New In Emacs 24 by raju on Friday December 09, 2011 @11:27AM (#3334280)
I use the "Apple" key ...

Put this in your .emacs file

  (setq mac-option-modifier 'super )
  (setq mac-command-modifier 'meta )
I also use the System preferences to map the Caps-Lock key to Ctrl - A lot easier especially since a lot of keyboards tend to move the CTRL key around
Re:What’s New In Emacs 24 by adestefan on Friday December 09, 2011 @02:17PM (#3335113)
The worst are the Thinkpad keyboards that have Fn where the left Ctrl should be. This is the sole reason I started to use Caps Lock for Ctrl and now I'm in love with it.
Re:What’s New In Emacs 24 by gnuvince on Friday December 09, 2011 @03:47PM (#3335539)
That's my favorite feature of Thinkpads: that means I cannot damage my pinkie any further :)
Re:What’s New In Emacs 24 by pnathan on Friday December 09, 2011 @11:52AM (#3334413)
I remapped the Apple key for alt on my MBP. It truly is frustrating; alt is not in a very nice position at all. FN is where I would prefer ctrl to be.

When I really need to get writing at home, I plug in a MS N4K and go at it.

Re:What’s New In Emacs 24 by shabble on Friday December 09, 2011 @12:35PM (#3334600)
See the sibling comment by raju for the specifics, but you can actually bind the Fn key with the `mac-function-modifier' variable.

I'd thought for a long time that Fn was a hardware/OS-only key based on the lack of apps that use it, but it seems Emacs has found a way.

Re:What’s New In Emacs 24 by jshen on Friday December 09, 2011 @01:20PM (#3334806)
I pretty much only use emacs on a mac. This means I don't care about having a keymap that is the same on a linux box.

So, I use option for 'alt', but here's the great thing. You can use the command key for other stuff! I've got keybindings for my most common actions.

command-j -> ido-find-file

command-d -> anything

etc

Re:What’s New In Emacs 24 by Wilduck on Friday December 09, 2011 @11:50AM (#3334403)
I use CarbonEmacs [1] on my Macbook. The default 'meta' is the cmd key, which I prefer, as it's closer to what I'm used to on other keyboards. I also remap (globally) caps-lock to be a second ctrl.

[1] http://homepage.mac.com/zenitani/emacs-e.html

Re:What’s New In Emacs 24 by technomancy on Friday December 09, 2011 @05:13PM (#3335861)
For the record, Carbon Emacs is Emacs 22, which is very old (c. 2007) and deprecated.
Re:What’s New In Emacs 24 by ihodes on Friday December 09, 2011 @11:27AM (#3334287)
I use 'option', also labeled 'alt' on my keyboard. You can set it to act as 'meta' via your preferences. Use iTerm 2.
Re:What’s New In Emacs 24 by adestefan on Friday December 09, 2011 @02:16PM (#3335110)
I use the Apple key as Meta and the Caps Lock key for Ctrl. On a Linux box I use the Alt key as Meta and the Caps Lock Key for Ctrl. With this setup the keys are in the same location for every keyboard and I don't get so confused.
Re:What’s New In Emacs 24 by alsocasey on Friday December 09, 2011 @05:26PM (#3335923)
Alternately, go the Steve Yegge way and rebind meta to C-x-C-m and C-c-C-m:

  (global-set-key "\C-x\C-m" 'execute-extended-command)
  (global-set-key "\C-c\C-m" 'execute-extended-command)
Re:What’s New In Emacs 24 by sdevlin on Friday December 09, 2011 @06:32PM (#3336173)
These bindings are only for M-x. This is still useful (M-x is really common), but it's not a full replacement for all meta bindings.
Re:What’s New In Emacs 24 by gcr on Saturday December 10, 2011 @12:51PM (#3338011)
Exactly. The problem with keyboards is that the alt key is right under your thumb, right where Ctrl should be. You might take a look at http://xahlee.org/emacs/ergonomic_emacs_keybinding.html , which is a remap of common emacs keybindings to fit underneath the alt key.

Sure, this is an invasive change, but it saved me from RSI.

Re:What’s New In Emacs 24 by tjr on Friday December 09, 2011 @11:24AM (#3334265)
Esc
Re:What’s New In Emacs 24 by chrismealy on Friday December 09, 2011 @11:27AM (#3334286)
option
Re:What’s New In Emacs 24 by aiscott on Friday December 09, 2011 @11:44AM (#3334367)
I use option like the others have said. I am like you, diving into Emacs; in my case purely for the swank/slime lisping environment.

It's been pretty difficult as I am a dyed in the wool VIM user. Someone on HN recommended the Evil plugin (http://gitorious.org/evil/pages/Home) for an approximation of VIM movement and other bindings. It surprisingly works pretty well. It's letting me remain productive while I slowly adapt to the emacs key-bindings over time.

I am using emacs-prelude as well (https://github.com/bbatsov/emacs-prelude) which is a startup scripts kit.

I'm still not sold on emacs yet, but I am giving it time.

Re:What’s New In Emacs 24 by ryane on Friday December 09, 2011 @12:56PM (#3334696)
I've been using Evil for a couple of months and love it. I switched from Viper+vimpulse and haven't missed a beat. It works really well and was easier to setup. Any VIM user considering Emacs should give it a shot - the best of both worlds, really.
Re:What’s New In Emacs 24 by cgag on Friday December 09, 2011 @02:25PM (#3335152)
I've been using evil mode and don't really see why you'd even want to move away from the vim bindings. Get the best of both worlds, the nice vim movements and model editing, plus all the nice emacs packages and being able to use elisp instead of vimscript.