unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* New dedicated frame for emacsclient session
@ 2009-05-10  7:16 Teemu Likonen
  0 siblings, 0 replies; only message in thread
From: Teemu Likonen @ 2009-05-10  7:16 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-10  7:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-10  7:16 New dedicated frame for emacsclient session Teemu Likonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).