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

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

Re: How to assign a name to emacsclient's frame?


From: Andrea Vettorello
Subject: Re: How to assign a name to emacsclient's frame?
Date: Sun, 24 Feb 2008 14:10:26 +0100

On Sun, Feb 24, 2008 at 1:35 AM, anhnmncb <anhnmncb@gmail.com> wrote:
> hi,
>  As the title, after create lots of emacsclient frame by emacsclient -c,
>  I couldn't distinct which one is the server one, I want to assign a
>  name to emacsclient like
>      emacsclient -name emacsc -c
>  so it will show at the title bar.
>
>  Also, I could make use of this title name for my fvwm to determine which 
> desk it
>  would be there. So I could better manage emacsclient frame.
>  Any good advices?

Maybe you can use a combination of "server-visit-hook" (description
says: Hook run when visiting a file for the Emacs server.) and frame
local variables. Something like:

(setq server-visit-hook 'my-server-visit-hook)
(make-variable-frame-local 'frame-title-format)

(defun my-server-visit-hook ()
  (make-local-variable 'frame-title-format)
  (setq frame-title-format "Emacsclient: %b")
  )

The code above evaluated on the scratch buffer seems to work, but i
don't know if it breaks something else. ^__^


-- 
Andrea




reply via email to

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