all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Child Frame naming standard.
@ 2006-02-24  2:58 Galen Boyer
  2006-02-27 16:08 ` Kevin Rodgers
       [not found] ` <mailman.35.1141056862.18076.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Galen Boyer @ 2006-02-24  2:58 UTC (permalink / raw)


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

Thanks.
-- 
Galen Boyer

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

* Re: Child Frame naming standard.
  2006-02-24  2:58 Child Frame naming standard Galen Boyer
@ 2006-02-27 16:08 ` Kevin Rodgers
       [not found] ` <mailman.35.1141056862.18076.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2006-02-27 16:08 UTC (permalink / raw)


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)
                                           " ")))))

-- 
Kevin Rodgers

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

* Re: Child Frame naming standard.
       [not found] ` <mailman.35.1141056862.18076.help-gnu-emacs@gnu.org>
@ 2006-02-28  0:45   ` Galen Boyer
  0 siblings, 0 replies; 3+ messages in thread
From: Galen Boyer @ 2006-02-28  0:45 UTC (permalink / raw)


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

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

end of thread, other threads:[~2006-02-28  0:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24  2:58 Child Frame naming standard Galen Boyer
2006-02-27 16:08 ` Kevin Rodgers
     [not found] ` <mailman.35.1141056862.18076.help-gnu-emacs@gnu.org>
2006-02-28  0:45   ` Galen Boyer

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.