[OS X Emacs] Cocoa emacs (24.1) + mutt strangeness

John Velman velman at cox.net
Sat Oct 6 19:29:16 EDT 2012

When I open a text file using either a double click in finder, or, in terminal do:

     open -a emacs filename

the file opens in a new emacs frame (i.e., os x window) in the same OS X desktop 
(aka space) that the command was issued in.  No new instance of emacs is started. 
In other words, it behaves as I would expect a cocoa document based app to behave.

I can get this behavior as far as the new frame and current space go when I set,
for example,

  seteditor = "open -a emacs %s"

or a variety of other ways, but the %s is ignored:  i.e., I don't get any email
template, or the existing message if I'm replying.

The way I'm using it now is with 

  set editor = "/Applications/Emacs.app/Contents/MacOS/Emacs %s"

This is somewhat usable, but starts a new instance of emacs.

When I use emacsclient, and emacs is already running, it always opens the new frame
in the same space that the initial emacs was running in. ( On os x, for a document
based application, emacsclient shouldn't be necessary, as far as I can tell.)

Behavior I'd really like:

   1. open the mutt editor in a new OSX window (emacs frame) of the running 
    emacs (if any)

   2. the new mutt editor frame should open in the same space (desktop) that mutt is 
    running in.

   3. the mutt editor should show the email header template, and if needed, 
    the message being replied to.

There really should be a way to do this, but I've searched, and I've tried 
everything I could find.


More information about the MacOSX-Emacs mailing list