help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New dedicated frame for emacsclient session


From: Teemu Likonen
Subject: New dedicated frame for emacsclient session
Date: Sun, 10 May 2009 07:16:49 GMT
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

I'm using Emacs 22 and I want all emacsclient editing sessions to open a
new frame for the file. Then, after "C-x #", the frame should be
automatically closed. I pretty quickly came up with this:

    (setq server-window 'tl/server-new-frame)

    (defun tl/server-new-frame (buffer)
      (let ((pop-up-frames t))
        (set-window-dedicated-p
         (get-buffer-window (pop-to-buffer buffer)) t)))

And it actually works. I'm still a newbie with Emacs Lisp so I'd like to
ask from the more experienced programmers around here if my code has
some corner cases which makes it fail in some situations. I noticed that
Emacswiki has totally different solution:

    http://www.emacswiki.org/emacs/EmacsClient#toc14


reply via email to

[Prev in Thread] Current Thread [Next in Thread]