[Top][All Lists]

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

Re: Modifying Frame Title

From: Rupert Swarbrick
Subject: Re: Modifying Frame Title
Date: Wed, 28 May 2008 23:54:06 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Mark Elston <address@hidden> writes:

> I would like to modify the frame title when I run GNUS (or,
> possibly other times as well).
> I tried the following in the *scratch* buffer:
>  (modify-frame-parameters nil ((frame-title-format . "GNUS")))
> This resulted in an error, though.  Is there a way to get the
> frame to have a different title?
> Mark

The reason for the debugger error is that you need to quote the alist
you're parsing, like so:

  (modify-frame-parameters nil '((frame-title-format . "GNUS")))

                     HERE -----^

Otherwise emacs thinks you're asking it to run the function referred to by 

  (frame-title-format . "GNUS")

with no arguments. And that itself would try to run the
frame-title-format function I think (which doesn't exist). Eugh.

ANYHOW, that still won't work, since frame-title-format isn't for that
- it's a normal variable to decide on a name to give the frame if
no-one's set it explicitely (look up C-h v frame-title-format).

What you want appears to be

  (modify-frame-parameters nil '((name . "GNUS")))

Note that I've never done this before, and worked this out from
reading the help strings, but the frame name hasn't changed when I've
switched buffers here, so I presume I've got it right!


P.S. To work out that I needed to change "name" (I couldn't see it
     immediately in the docs), I outputted the current frame params
     with (frame-parameters). Unfortunately, there's enough stuff that
     this gets abbreviated in the message line to (blah blah ...). So
     I used the following hack in a temporary buffer:

       (insert (format "%s" (frame-parameters)))

     Maybe that trick'll come in useful someday.

reply via email to

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