From: Ian van der Neut <ivdneut@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Problem setting frame title on startup
Date: Fri, 15 Mar 2013 20:24:20 +0100 [thread overview]
Message-ID: <CANyFcg1b-q0qt=3NuwqC_Q542JkKtja5oM=yGA=WG0DLeRwApw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hello all,
rather a lisp newbie and been searching all over, but can't figure it out.
I have the code below:
(provide 'ian-project)
;; Based on the presence of the 'project' environment variable,
;; display the project name in the frame title and the mode line.
(defun set-project-in-frame-title ()
(interactive)
(setq projectname (getenv "project"))
(message "Project: %s" projectname)
(if projectname
(setq-default frame-title-format (concat "%b (%*) [" projectname "]
"))
(setq frame-title-format (concat "%b (%*)"))
) ;; if projectname
)
And in my ~/.emacs I have:
(require 'ian-project)
(set-project-in-frame-title)
The message "Project: <projectname>" is displayed in the *Messages* buffer
on startup, however, the project name does not end up in the frame title,
unless I execute the function by hand:
M-x set-project-in-frame-title()
My emacs version is:
GNU Emacs 24.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4)
of 2013-02-02 on buildvm-04.phx2.fedoraproject.org
Thank you very much in advance for any pointers as to what I may be missing.
Ian.
--
One man's "magic" is another man's engineering. "Supernatural" is a null
word.
-- Excerpt from the notebooks of Lazarus Long, from Robert Heinlein's "Time
Enough for Love"
[-- Attachment #2: Type: text/html, Size: 1716 bytes --]
next reply other threads:[~2013-03-15 19:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 19:24 Ian van der Neut [this message]
2013-03-15 19:51 ` Problem setting frame title on startup Mark Skilbeck
2013-03-16 9:47 ` Ian van der Neut
2013-03-16 10:24 ` Mark Skilbeck
2013-03-16 11:04 ` Ian van der Neut
2013-03-16 11:26 ` Ian van der Neut
2013-03-18 5:40 ` XeCycle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANyFcg1b-q0qt=3NuwqC_Q542JkKtja5oM=yGA=WG0DLeRwApw@mail.gmail.com' \
--to=ivdneut@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.