unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* MY window tree!
@ 2007-01-13  0:17 Michaël Cadilhac
  2007-01-13  0:33 ` Lennart Borgman (gmail)
  2007-01-13  9:20 ` Michaël Cadilhac
  0 siblings, 2 replies; 48+ messages in thread
From: Michaël Cadilhac @ 2007-01-13  0:17 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

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?

-- 
|  À quoi bon user des douzes pieds de         Michaël `Micha' Cadilhac |
|  l'alexandrin si ces dames s'épuisent     cadilh_m - Epita 2007 - CSI |
|  au premier pied qu'elles prennent ?  JID: michael.cadilhac@gmail.com |
`--  -  -         -- Jacques_Beauheurt                            - - --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 48+ messages in thread
* MY window tree!
@ 2007-01-13 10:11 martin rudalics
  2007-01-14  9:35 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 48+ messages in thread
From: martin rudalics @ 2007-01-13 10:11 UTC (permalink / raw)
  Cc: help-gnu-emacs

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

Don't wonder: You first have to save the window-list of the frame
including all windows' edges and identities.  Next you have to create the
*Bar* window with the intended width and split the window on the right
in the way listed by the saved window-list, adjust the vertical dividers
proportionally to what you had before (there's always a chance that a
window drops below the minimum width now) and assign any window-local
overlays the identity of their new window.  In addition there might be
dedicated windows and other window-local properties as well ...

I once struggled a lot with the much simpler problem of a window
configuration like

  ----------
| |        |
|1|   2    |
| |        |
  ----------

I wanted to transform into

  ----------
|1|   2    |
|----------|
|   3      |
  ----------

If you come up with a solution to your problem I'd definitely want to
hear about it ;-)

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

end of thread, other threads:[~2007-01-17  6:36 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-13  0:17 MY window tree! Michaël Cadilhac
2007-01-13  0:33 ` Lennart Borgman (gmail)
2007-01-13  0:46   ` Michaël Cadilhac
2007-01-13  1:24     ` Lennart Borgman (gmail)
     [not found]     ` <mailman.3023.1168651462.2155.help-gnu-emacs@gnu.org>
2007-01-13  6:17       ` Stefan Monnier
2007-01-13  9:20 ` Michaël Cadilhac
  -- strict thread matches above, loose matches on Subject: below --
2007-01-13 10:11 martin rudalics
2007-01-14  9:35 ` Lennart Borgman (gmail)
2007-01-14 11:26   ` martin rudalics
2007-01-14 11:45     ` Lennart Borgman (gmail)
2007-01-14 15:03       ` Juanma Barranquero
2007-01-14 15:29         ` Lennart Borgman (gmail)
2007-01-14 17:41       ` martin rudalics
2007-01-14 17:56         ` Lennart Borgman (gmail)
2007-01-14 21:35         ` Lennart Borgman (gmail)
2007-01-14 22:57           ` Juanma Barranquero
2007-01-14 23:15             ` Lennart Borgman (gmail)
2007-01-15  7:27               ` martin rudalics
2007-01-15 13:07                 ` Lennart Borgman (gmail)
2007-01-15 13:50                   ` Juanma Barranquero
2007-01-15 14:09                     ` Lennart Borgman (gmail)
2007-01-15 14:33                       ` Juanma Barranquero
2007-01-15 14:41                         ` Lennart Borgman (gmail)
2007-01-15 14:56                           ` Juanma Barranquero
2007-01-15 16:32                             ` Lennart Borgman (gmail)
2007-01-15 17:33                               ` martin rudalics
2007-01-15 17:47                                 ` Lennart Borgman (gmail)
2007-01-15 17:58                                   ` martin rudalics
2007-01-15 18:16                                     ` Lennart Borgman (gmail)
2007-01-15 18:44                                       ` martin rudalics
2007-01-15 18:52                                         ` Lennart Borgman (gmail)
2007-01-15 17:26                           ` martin rudalics
2007-01-15 17:56                             ` Lennart Borgman (gmail)
2007-01-15 18:33                               ` martin rudalics
2007-01-15 18:14                             ` Lennart Borgman (gmail)
2007-01-15 19:22                               ` martin rudalics
2007-01-15 20:26                                 ` Lennart Borgman (gmail)
2007-01-15 22:44                                   ` martin rudalics
2007-01-16  0:14                                     ` Lennart Borgman (gmail)
2007-01-16  7:46                                       ` martin rudalics
2007-01-16 10:32                                         ` Lennart Borgman (gmail)
2007-01-16 14:23                                           ` martin rudalics
2007-01-16 17:59                                             ` Lennart Borgman (gmail)
2007-01-16 18:32                                               ` martin rudalics
2007-01-16 18:57                                                 ` Lennart Borgman (gmail)
2007-01-16 21:57                                                   ` martin rudalics
2007-01-16 22:32                                                     ` Lennart Borgman (gmail)
2007-01-17  6:36                                                       ` martin rudalics

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