* Frame titles which reflect contents
@ 2009-11-22 16:04 Eduardo Cavazos
2009-11-25 1:26 ` jpkotta
0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Cavazos @ 2009-11-22 16:04 UTC (permalink / raw)
To: help-gnu-emacs
Hello!
Today I had three frames open. One frame had a single window with file
'a'. Another had a single window with file 'b'. The third frame had 3
windows; file 'a', file 'b', and a *scheme* buffer.
I was running this Emacs in Gnome. The three frames are reflected in
the window list in the bottom panel. The trouble is that, the third
frame with the multiple windows is named based on the buffer that's
currently selected in that frame. So if buffer 'b' is selected,
there's no way to distinguish frame 2 and frame 3 based on the window
list alone.
Any thoughts on how to solve the problem?
One approach is to have the frame title be based on more than just the
name of the currently selected buffer. So for example, if a frame has
two windows with buffers 'a.sls' and '*scheme*', the frame could be
called "[a.sls] | *scheme*". I.e. with the [...] indicating which
buffer in that frame is active.
I'm sure there are other approaches as well! Comments, suggestions,
and elisp welcome! :-)
Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Frame titles which reflect contents
2009-11-22 16:04 Frame titles which reflect contents Eduardo Cavazos
@ 2009-11-25 1:26 ` jpkotta
2009-11-25 17:04 ` rustom
2010-01-02 3:41 ` Eduardo Cavazos
0 siblings, 2 replies; 4+ messages in thread
From: jpkotta @ 2009-11-25 1:26 UTC (permalink / raw)
To: help-gnu-emacs
On Nov 22, 10:04 am, Eduardo Cavazos <wayo.cava...@gmail.com> wrote:
> Hello!
>
> Today I had three frames open. One frame had a single window with file
> 'a'. Another had a single window with file 'b'. The third frame had 3
> windows; file 'a', file 'b', and a *scheme* buffer.
>
> I was running this Emacs in Gnome. The three frames are reflected in
> the window list in the bottom panel. The trouble is that, the third
> frame with the multiple windows is named based on the buffer that's
> currently selected in that frame. So if buffer 'b' is selected,
> there's no way to distinguish frame 2 and frame 3 based on the window
> list alone.
>
> Any thoughts on how to solve the problem?
>
> One approach is to have the frame title be based on more than just the
> name of the currently selected buffer. So for example, if a frame has
> two windows with buffers 'a.sls' and '*scheme*', the frame could be
> called "[a.sls] | *scheme*". I.e. with the [...] indicating which
> buffer in that frame is active.
>
> I'm sure there are other approaches as well! Comments, suggestions,
> and elisp welcome! :-)
>
> Ed
I think this will do what you want, it works for me anyway:
(defun window-to-buffer-name (w)
(buffer-name (window-buffer w)))
(setq frame-title-format
'("" (:eval (mapconcat #'window-to-buffer-name
(window-list)
" | "))))
The selected-window is always the first element in window-list by
default.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Frame titles which reflect contents
2009-11-25 1:26 ` jpkotta
@ 2009-11-25 17:04 ` rustom
2010-01-02 3:41 ` Eduardo Cavazos
1 sibling, 0 replies; 4+ messages in thread
From: rustom @ 2009-11-25 17:04 UTC (permalink / raw)
To: help-gnu-emacs
On Nov 25, 6:26 am, jpkotta <jpko...@gmail.com> wrote:
> On Nov 22, 10:04 am, Eduardo Cavazos <wayo.cava...@gmail.com> wrote:
>
>
>
> > Hello!
>
> > Today I had three frames open. One frame had a single window with file
> > 'a'. Another had a single window with file 'b'. The third frame had 3
> > windows; file 'a', file 'b', and a *scheme* buffer.
>
> > I was running this Emacs in Gnome. The three frames are reflected in
> > the window list in the bottom panel. The trouble is that, the third
> > frame with the multiple windows is named based on the buffer that's
> > currently selected in that frame. So if buffer 'b' is selected,
> > there's no way to distinguish frame 2 and frame 3 based on the window
> > list alone.
>
> > Any thoughts on how to solve the problem?
>
> > One approach is to have the frame title be based on more than just the
> > name of the currently selected buffer. So for example, if a frame has
> > two windows with buffers 'a.sls' and '*scheme*', the frame could be
> > called "[a.sls] | *scheme*". I.e. with the [...] indicating which
> > buffer in that frame is active.
>
> > I'm sure there are other approaches as well! Comments, suggestions,
> > and elisp welcome! :-)
>
> > Ed
>
> I think this will do what you want, it works for me anyway:
>
> (defun window-to-buffer-name (w)
> (buffer-name (window-buffer w)))
>
> (setq frame-title-format
> '("" (:eval (mapconcat #'window-to-buffer-name
> (window-list)
> " | "))))
>
> The selected-window is always the first element in window-list by
> default.
Thanks for that -- Neat!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Frame titles which reflect contents
2009-11-25 1:26 ` jpkotta
2009-11-25 17:04 ` rustom
@ 2010-01-02 3:41 ` Eduardo Cavazos
1 sibling, 0 replies; 4+ messages in thread
From: Eduardo Cavazos @ 2010-01-02 3:41 UTC (permalink / raw)
To: help-gnu-emacs
> I think this will do what you want, it works for me anyway:
>
> (defun window-to-buffer-name (w)
> (buffer-name (window-buffer w)))
>
> (setq frame-title-format
> '("" (:eval (mapconcat #'window-to-buffer-name
> (window-list)
> " | "))))
>
> The selected-window is always the first element in window-list by
> default.
This is very nice... Thanks!
Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-02 3:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-22 16:04 Frame titles which reflect contents Eduardo Cavazos
2009-11-25 1:26 ` jpkotta
2009-11-25 17:04 ` rustom
2010-01-02 3:41 ` Eduardo Cavazos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).