0

In osx I make all new emacs buffers open in the same window/frame by putting this in .emacs.

(setq ns-pop-up-frames nil)

Alias to make emacs open a file in a new buffer (NOT frame) and be activated/come to front?

I want to be able to do the same in debian (gnome). Is it possible? A solution that will also work for xmonad (and similar wms) would be very much appreciated.

Community
  • 1
  • 1

1 Answers1

0

pop-up-frames is a standard emacs variable:

pop-up-frames is a variable defined in `window.el'.
Its value is nil

Documentation:
Whether `display-buffer' should make a separate frame.
If nil, never make a separate frame.
If the value is `graphic-only', make a separate frame
on graphic displays only.
Any other non-nil value means always make a separate frame.

You can customize this variable.

Use customize or put this

(custom-set-variables '(pop-up-frames nil))

into your .emacs.

This, of course, only affects Emacs displaying buffers. If you start a new Emacs, the new process will create a new window. To achieve what you, apparently, want, you will need to run Emacs as a daemon and open files using emacsclient.

sds
  • 58,617
  • 29
  • 161
  • 278
  • for some reason, this does not work for me, have you tested it? –  Mar 07 '13 at 18:37
  • I put the line of text in my .emacs (did save it) and the change seems to have been registered as far as I could see in the customize menu (I'm unfamiliar with it). I restarted emacs and the computer. Still, when I open txtFile1 and txtFile2 they appear in separate windows. –  Mar 07 '13 at 18:44
  • 2
    you need to run `emacs` as a daemon and open files using `emacsclient`, see an edit – sds Mar 07 '13 at 18:50