When I open a new file I want it to pop-up in a new frame. I've set pop-up-frames to t, but it still opens files that I double-click in Finder in existing buffers which results in other buffers being hidden.

  • 1
    The function you're looking for is probably find-file-other-frame. You can call it with C-x 5 f or remap this function to C-x C-f.
    – Nsukami _
    Dec 9, 2015 at 22:27
  • I would like it to be called whenever Finder calls Emacs to open a file. I'm using Yamamoto Mitsuharu's port for OS X by the way.
    – Lenar Hoyt
    Dec 9, 2015 at 22:31
  • 2
    You need to re-define the function ns-find-file. See the following related thread, which includes an example for OSX -- just remove the comment semi-colons before ;; (defalias 'ns-find-file 'db-ns-find-file) in the answer -- How to intercept a file before it opens and decide which frame -- stackoverflow.com/questions/18346785/…
    – lawlist
    Dec 24, 2015 at 16:13
  • Just a comment: I have tried, more than once over the years, to set up one-frame-per-file, so that my window manager can handle ... frames, which is what it is good at! ;) There's always something lacking in every setup I've come up with... I am watching this question with great interest.
    – daveloyall
    Dec 24, 2015 at 16:19
  • You might try setting the value of ns-pop-up-frames to fresh as described here (along with some more potentially useful information): gnu.org/software/emacs/manual/html_node/emacs/… I am not sure if it will work, but it sounds like the behavior you are looking for
    – elethan
    Dec 24, 2015 at 19:08

2 Answers 2


If you're using emacsclient, opening files with

emacsclient -c

will open a new frame for each file. Not sure how this would work on OS X, but in XFCE I can set such a command for a filetype.


I have switched from the brew formula railwaycat/emacsmacport/emacs-mac to standard emacs using brew install emacs --with-cocoa --with-gnutls --with-imagemagick --with-librsvg --with-mailutils, which compiles with the --with-ns switch per default (which the other port apparently does not contain). This required fixing up a few things such as the modifier keys. I'm also missing the Emoji & Symbols menu entry and the pixel-wise smooth scrolling, but I think I will get used to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.