From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Allan Gottlieb Newsgroups: gmane.emacs.help Subject: Re: "title" frame param: Want "string %f %b" with string different for some frames Date: Thu, 28 Aug 2008 15:43:43 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219952530 2682 80.91.229.12 (28 Aug 2008 19:42:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2008 19:42:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 21:43:04 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KYnNy-000227-GJ for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2008 21:42:27 +0200 Original-Received: from localhost ([127.0.0.1]:53338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYnMz-0004Kq-7U for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2008 15:41:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYnMC-00040W-Ry for help-gnu-emacs@gnu.org; Thu, 28 Aug 2008 15:40:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYnMB-000405-Pi for help-gnu-emacs@gnu.org; Thu, 28 Aug 2008 15:40:36 -0400 Original-Received: from [199.232.76.173] (port=47711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYnMB-0003zy-Gh for help-gnu-emacs@gnu.org; Thu, 28 Aug 2008 15:40:35 -0400 Original-Received: from smtp.cs.nyu.edu ([128.122.80.33]:39219) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYnMA-00070g-Kx for help-gnu-emacs@gnu.org; Thu, 28 Aug 2008 15:40:35 -0400 Original-Received: from ajglap.localdomain (ool-4578d291.dyn.optonline.net [69.120.210.145]) (authenticated bits=0) by smtp.cs.nyu.edu (8.14.3/8.13.8) with ESMTP id m7SJeVXa007933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 28 Aug 2008 15:40:31 -0400 (EDT) Original-Received: by ajglap.localdomain (Postfix, from userid 1502) id C243119D931; Thu, 28 Aug 2008 15:43:43 -0400 (EDT) In-Reply-To: (Nikolaj Schumacher's message of "Thu\, 28 Aug 2008 19\:23\:03 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57059 Archived-At: At Thu, 28 Aug 2008 19:23:03 +0200 Nikolaj Schumacher wrote: > Allan Gottlieb wrote: > >> Say I want the current frame to have "sam" in the title together with >> the current file and buffer names, I would like to say something like >> >> (setq current-frame-title-format '("sam: %b <%f>"))) >> >> and have all other frames still use '("Emacs: %b <%f>"))) > > Well, you can do: > > (set (make-variable-buffer-local 'frame-title-format) '("sam: %b <%f>")) > > That's not exactly what you want, but maybe it'll get you a little > closer. > > There's also `make-variable-frame-local', but I couldn't quite get it to > work. buffer-local isn't really good enough. I do want to use the frame for several files/buffers. make-variable-frame-local is listed as obsolete in emacs 22.2 and beyond, which are the ones I use (22.2 and 23.0.60). The interesting output of (describe-function 'make-variable-frame-local) is make-variable-frame-local is an interactive built-in function in `C source code'. (make-variable-frame-local VARIABLE) This function is obsolete since 22.2; use a frame-parameter instead. Enable VARIABLE to have frame-local bindings. This does not create any frame-local bindings for VARIABLE, it just makes them possible. A frame-local binding is actually a frame parameter value. If a frame F has a value for the frame parameter named VARIABLE, that also acts as a frame-local binding for VARIABLE in F-- provided this function has been called to enable VARIABLE to have frame-local bindings at all. The only way to create a frame-local binding for VARIABLE in a frame is to set the VARIABLE frame parameter of that frame. See `modify-frame-parameters' for how to set frame parameters. Buffer-local bindings take precedence over frame-local bindings. I have been able to set the frame parameter "title", but that doesn't give the ability to use %b %f. My attempts at using make-variable-frame-local and/or modify-frame-parameters have not yet yielded the equivalent of my desired current-frame-title-format as described above. Thanks for your comments. allan