Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
GNU Emacs 23.1 has been released (gnu.org)
85 points by boskom on July 30, 2009 | hide | past | favorite | 25 comments


Hmm... from the News on the new release:

Mac OS X is no longer supported via Carbon. Use the NeXTSTEP port, described above.

A NeXTSTEP port, a.k.a. "Cocoa support".

And, meanwhile, the Carbon Emacs guy reports that he doesn't plan to release an Emacs 23 version of Carbon Emacs in 2009:

http://groups.google.com/group/carbon-emacs/browse_thread/th...

Perhaps the time has finally come to try rolling my own emacs from source. That will require a Great Package Hunt in the short term, but once you've got emacs set up you've really got emacs set up. It's not like it changes every weekend.


To compile your own Emacs 23 (Cocoa) for OS X:

./configure --with-ns && make install

"Emacs.app" will be in the "nextstep" folder

As for switching from the Carbon version to this version, I'm not sure what kind of changes your configuration will be need. I know that Option is Meta in this version whereas in Carbon Cmd is Meta.


If you've got MacPorts installed (if you don't, you should), grab a copy of my ports repo from github and use the emacs-app Portfile there.

http://github.com/jmhodges/ports/tree/master


Builds available at http://www.porkrind.org/emacs/

ETA: Information courtesy of the mighty EmacsWiki: http://www.emacswiki.org/emacs/EmacsForMacOS#toc2


Isn't Carbon kind of OS9 legacy support? Does it makes sense to still have a Carbon port? Why?


So. How well does Emacs work on a Mac these days? I'm strongly considering switching from Linux to Mac, because I'm sick of running Windows in VMWare just so I can use Microsoft's Office suite. I couldn't live without Emacs though.


I use it every day and it works fine for me. Since Mac OS X has unix underpinnings all the good stuff works just fine (unlike trying to use M-x grep on windows). If you compile ispell and put it in your path then all the spelling stuff works, etc.

I had to do very few Mac specific things in my .emacs to make it comfortable.

And on top of that it supports basic mac interaction, so if you drag a file into the window it'll open it in a new buffer, you can associate files with it so that double clicking them works, etc.


Here's a MacPorts Portfile for 23, if you're into that sort of thing: http://paste.lisp.org/+1T5E


Aquamacs mate.


If you've actually ever used Emacs before don't use Aquamacs, or else you're going to end up reconfiguring everything all over again because the Aquamacs developers don't seem to like to stick the standards and conventions.

Random things are wonky and way out of place. Like their variation of how buffers and frames work is ridiculous.

Build the Nextstep version, Emacs.app and things will actually work the way they're supposed to without having to reconfigure everything again.


On the other hand, if you are used to Mac OS X applications and want to try Emacs, Aquamacs is a good place to start. Mapping the Command key to traditional Mac shortcuts (Cmd-C copy, Cmd-V paste, etc.) while leaving the Control key for Emacs commands and Option as Meta, works really well for me. I have used Emacs off and on over a couple decades now, but have also been using Macs for about as long, so changing Command to do something other than the Mac shortcuts when I am on a Mac would mess with my muscle memory something terrible. I find myself sometimes using Cmd-V to paste and sometimes C-y as the mood strikes, and somehow it all works.

So, executive summary: if you just want Emacs like its always been stay away from Aquamacs. If you want Emacs that makes a little more sense according to Mac OS interface guidelines, give Aquamacs a shot.


Actually, the Cocoa (aka "nextstep") build of GNU Emacs 23.1 works exactly this way by default. Option is Meta, and various typical Mac Cmd shortcuts work by default (many of the ones that Aquamacs supports). For example:

  Cmd-C/X/V - copy/cut/paste
  Cmd-Z - undo
  Cmd-N - new frame (or "window" in Mac terminology)
  Cmd-W - close frame (if not last frame)
  Cmd-` - switch between frames
  Cmd-H - hide application
  Cmd-M - minimize frame
  Cmd-, - customize
  Cmd-K - kill buffer
  Cmd-T - bring up Mac font chooser
  Cmd-S - save
  Cmd-A - select all
  Cmd-O - bring up Mac file chooser
And of course you can define your own actions that use Cmd if you'd like.

I think, for new users, the way Emacs does frames/windows/buffers is worth discovering instead of what Aquamacs does by default.


Emacs.app already does mappings correctly. In fact the last time I checked it also uses the native clipboard better than Aquamacs does, kill and copy work the same, as with yank/paste work.


I noticed this back when I used OS X. Part of the reason I switched from OS X back to Linux was that Emacs never worked right on OS X.


Don't miss the badass cover to the original Emacs Manual for ITS:

http://www.gnu.org/software/emacs/its-cover.png

Or rms's only cartoon (It's ... funny?):

http://www.gnu.org/software/emacs/self-doc-extensible-editor...


Not funny me thinks, but much better, in a modern art sense interesting, very clean concept. He should do 20 of them and see what evolves out of that.

And thanks for the cover!


How to get the command key back as the meta key on Mac OS X: (setq ns-command-modifier 'meta)


But how, how, how to get it back in the terminal emacs? :)


I use (setf mac-option-modifier 'meta) and then swap Option and Command keys in keyboard preferences, and that makes meta work correctly with windowed Carbon Emacs and terminal mode emacs (both Carbon and the default OSX emacs).

I also use DoubleKey to map the Enter key (right next to Command key on the right) to Ctrl. It bugs me to have to do all this, but it makes meta work just like it does on Linux, so it's worth it.


I'd love to finally use emacs 24/7 (rather than randomly jumping between (ubuntu) gedit, gvim, vim, emacs and (osx) textmate) but arg I still can't figure out how to force emacs to: Never insert a tab character, ever. When I press tab, just always insert the freaking spaces instead of apparently not believing me that I want to indent there.

Honestly, am I missing something? I don't leave trailing whitespace in files because, well, it's our convention and I think it's pointless anyway. So I go into a function to add some code in the middle and it's impossible to get indented the right amount without hitting space 12 times since pressing tab just does nothing. I know I could go onto a previous line and hit C-e C-j to line break + indent but do you know how often I just try to insert code in the middle and realize it doesn't work? Google has not been my friend on this issue.

/rant



Unfortunately, no. Go to a blank line inside a code block that's indented a bit and hit tab. Nothing happens :/

I wasn't clear above, I have been able to have it never insert a tab, but it's that and the "don't try to 'intelligently' prevent me from indenting" thing that I need.


Scrolling (redisplay?) slow for anyone else? When using a small font (ProggyTiny) it gets really slow.


It is for me. I think it has something to do with the baud rate of the virtual terminal...?


Very cool.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: