help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MY window tree!


From: Michaël Cadilhac
Subject: Re: MY window tree!
Date: Sat, 13 Jan 2007 01:46:15 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux)

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Michaël Cadilhac wrote:
>> Hi!
>>
>> I've been playing around with window-tree to do the following :
>> - On M-x foo, a window is created on the extreme left of the frame,
>> containing a buffer called *Bar*,
>> - On M-x foo again, with the buffer *Bar* on the left, this window is
>> removed.
>>
>> Problem is, this can't be done with a simple split. So my first idea
>> was to reduce the frame to one window, split it: left would be *Bar*
>> and restore the window-tree in the right part.
>>
>> Of course, this can't work, because if I use delete-other-windows, the
>> windows are ... deleted. So, can't be restored.
>>
>> I can't find a way to do this simply, and I wonder if there is :-)
>>
>> How would you do?
>
> Using something like
>
>    (window-buffer (nth 2 (car (window-tree))))
>
> perhaps?

Yeah, that's what I'm thinking about when I talk about « not
simple ways » :-)

This implies to parse the window-tree, and for each leaves of the
tree, which is a window, get its buffer and its size; then store it in
another tree to restore it.

Damn, I just want to create another root, this can't be that complex,
is it ?

Thanks for you advice, however :-)

-- 
 |      Michaël `Micha' Cadilhac     |   Did you Mooh today ?                 |
 |         Epita/LRDE Promo 2007     |                                        |
 |  http://michael.cadilhac.name     |       http://boitam.eu/                |
 `--JID: michael.cadilhac@gmail.com--'                                   -  --'

Attachment: pgpUAFSL58Jb9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]