all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem setting frame title on startup
@ 2013-03-15 19:24 Ian van der Neut
  2013-03-15 19:51 ` Mark Skilbeck
  0 siblings, 1 reply; 7+ messages in thread
From: Ian van der Neut @ 2013-03-15 19:24 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-18  5:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 19:24 Problem setting frame title on startup Ian van der Neut
2013-03-15 19:51 ` 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

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.