From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian van der Neut Newsgroups: gmane.emacs.help Subject: Problem setting frame title on startup Date: Fri, 15 Mar 2013 20:24:20 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae94730b5ff0eac04d7fb9520 X-Trace: ger.gmane.org 1363375718 30075 80.91.229.3 (15 Mar 2013 19:28:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Mar 2013 19:28:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 15 20:29:03 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UGaJG-0005We-AQ for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Mar 2013 20:28:58 +0100 Original-Received: from localhost ([::1]:58703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGaIt-0002m7-Il for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Mar 2013 15:28:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGaEs-0001pf-AX for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:24:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGaEo-0002Vi-8f for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:24:26 -0400 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:34938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGaEo-0002V7-1a for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:24:22 -0400 Original-Received: by mail-la0-f45.google.com with SMTP id er20so4188913lab.32 for ; Fri, 15 Mar 2013 12:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=nbv/WK5a85A7QBLs7hshNvG1vrWEiFLdICjrZlCBOfk=; b=SlfIylepbdzTX/IrK4TqgpsvU43RNFMhEro7HBFZyBc0IMaPywhp7q1MRJtQCZqlyD hSxTsuhFd52TPBE3pNhAZE6PJvEticO1FsUJ4RrZkU84UME/HPnJFV7SsdJgiv+/8Tlv wH3tSluJa5mfiy4ZdkNHNizh/QY23iq57EVYkt7ayYSMdpSY4YkfadPOLTL3x27sQtc+ 9sqK4nZgqS0xiO4aK8CQmB5kRrCglXvFbmyDEGgr2U7q1q/MKOmqVKLLWXjRV8qA1UYH MgjrlyPc4GNnyCTvNXkxIvu2nGrPSuzWn+H5mlri4dQ4ikP4Sr4M3eP5KWGLUTiDNXrr N2Ow== X-Received: by 10.112.18.168 with SMTP id x8mr3074680lbd.102.1363375460124; Fri, 15 Mar 2013 12:24:20 -0700 (PDT) Original-Received: by 10.112.42.226 with HTTP; Fri, 15 Mar 2013 12:24:20 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d X-Mailman-Approved-At: Fri, 15 Mar 2013 15:28:15 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89545 Archived-At: --14dae94730b5ff0eac04d7fb9520 Content-Type: text/plain; charset=ISO-8859-1 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: " 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" --14dae94730b5ff0eac04d7fb9520 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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 'pro= ject' environment variable,
;; display the project name in the frame title and the mode line.
(defun= set-project-in-frame-title ()
=A0 (interactive)
=A0 (setq projectnam= e (getenv "project"))
=A0 (message "Project: %s" pro= jectname)
=A0 (if projectname
=A0=A0=A0=A0=A0 (setq-default frame-title-format (co= ncat "%b (%*) [" projectname "] "))
=A0=A0=A0 (setq = frame-title-format (concat "%b (%*)"))
=A0=A0=A0 ) ;; if proje= ctname
)

And in my ~/.emacs I have:

(require 'ian-project)
(= set-project-in-frame-title)

The message "Project: &l= t;projectname>" is displayed in the *Messages* buffer on startup, h= owever, the project name does not end up in the frame title, unless I execu= te 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+ Versi= on 3.6.4)
=A0of 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= 9;s "Time Enough for Love"
--14dae94730b5ff0eac04d7fb9520--