From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Galen Boyer Newsgroups: gmane.emacs.help Subject: Re: Child Frame naming standard. Date: 27 Feb 2006 18:45:02 -0600 Organization: Newscene Usenet News Service, http://www.newscene.com/ Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141190408 20718 80.91.229.2 (1 Mar 2006 05:20:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Mar 2006 05:20:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 01 06:20:07 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FEJkp-0003OB-7N for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2006 06:20:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FEJkn-0003td-7H for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2006 00:20:01 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!novia!sequencer.newscene.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-Sender: galen_boyer@yahoo.com User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:137828 Original-To: help-gnu-emacs@gnu.org 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:33452 Archived-At: On Mon, 27 Feb 2006, ihs_4664@yahoo.com wrote: > Galen Boyer wrote: >> Is there a way that if a child frame were created, C-x 5 0, and >> subsequently M-x set-frame-name, that the name I give it could be >> concatenated with the parental frame, at all times? >> Parent frame name = "ProjectX" >> Child frame rename = "Branch" >> Actual Child frame name after rename = "ProjectX [Branch]" > > As far as I know, Emacs does not keep track of which frame was > selected (the parent) when a new frame is created (the child). But > you should be able to do that explicitly: > > (add-hook 'after-make-frame-functions > (lambda (frame) > (modify-frame-parameters frame > `((parent-frame > . ,(selected-frame)))))) > > (defadvice set-frame-name (before interactive activate) > "When called interactively, provide the parent frame's name as > the initial input." > (interactive (list (read-string "Frame name: " > (concat (frame-parameter > (frame-parameter > (selected-frame) > 'parent-frame) > 'name) > " "))))) Thanks Kevin, I'll give this a shot. -- Galen Boyer