From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Skilbeck Newsgroups: gmane.emacs.help Subject: Re: Problem setting frame title on startup Date: Fri, 15 Mar 2013 19:51:46 +0000 Message-ID: <20130315195145.GA18986@earth> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1363377131 11512 80.91.229.3 (15 Mar 2013 19:52:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Mar 2013 19:52:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ian van der Neut Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 15 20:52:36 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 1UGag1-0006p1-LB for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Mar 2013 20:52:29 +0100 Original-Received: from localhost ([::1]:47806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGaff-0005Mr-1N for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Mar 2013 15:52:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGafR-0005Md-CG for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:51:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGafQ-0002eT-06 for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:51:53 -0400 Original-Received: from li357-97.members.linode.com ([178.79.188.97]:60683 helo=mail.iammark.us) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGafP-0002eM-QE for help-gnu-emacs@gnu.org; Fri, 15 Mar 2013 15:51:51 -0400 Original-Received: from mail.iammark.us (host86-177-244-9.range86-177.btcentralplus.com [86.177.244.9]) by mail.iammark.us (Postfix) with ESMTPSA id 35A63AEE7; Fri, 15 Mar 2013 19:51:49 +0000 (GMT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 178.79.188.97 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:89546 Archived-At: Use modify-frame-parameters: (modify-frame-parameters nil '((title . "test"))) On Fri, Mar 15, 2013 at 08:24:20PM +0100, Ian van der Neut wrote: > 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"