ns-pop-up-frames not working in Cocoa Emacs #271

Open
magnars opened this Issue Nov 29, 2011 · 2 comments

Comments

Projects
None yet
1 participant

magnars commented Nov 29, 2011

I've installed the latest Cocoa Emacs 23 using homebrew.

I've added (setq ns-pop-up-frames nil) to my init.el, but Peepopen still opens files in new instances of Emacs.

Any way of fixing this? Could I get Peepopen to just do a emacsclient -n instead perhaps?

Thanks!

magnars commented Dec 21, 2011

I'm guessing that ns-pop-up-frames does nothing, because PeepOpen actually launches an entirely new instance of Emacs. I've been trying to dig through the PeepOpen source code to find how Emacs is started, but my Objective C is sorely lacking. :-P

magnars commented Dec 21, 2011

I actually fixed this on my computer by creating an AppleScript application EmacsClient.app:

on open these_items
    set this_item to item 1 of these_items
    set file_path to (the POSIX path of this_item)
    tell application "Terminal"
        do shell script "/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -n " & file_path & ""
    end tell
end open

and then changing the function that opens peepopen:

(format "open 'peepopen://%s?editor=%s'"
         (expand-file-name root)
         "EmacsClient")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment