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

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

Re: split screen horizontally into three equally spaced sections


From: Sébastien Vauban
Subject: Re: split screen horizontally into three equally spaced sections
Date: Fri, 10 Oct 2008 12:23:46 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

Hello,

First thanks to Harven and Lennart for their answers, and to
you, Bastien, as well...

FYI, I've tried the transpose window stuff from EmacsWiki, and
it perfectly works...


>> Is there some already existing code that would allow to "switch"
>> from a vertical layout of windows to an horizontal one, and vice
>> versa?
>>
>> For example:
>>
>>     ---------              ---------
>>     |   A   |              |   |   |
>>     ---------    ---->     | A | B |
>>     |   B   |              |   |   |
>>     ---------              ---------
>
> Not yet. But the switch above is just M-x windresize RET 0 3 RET.

Thanks for the example. It wasn't that clear for me, even after
looking through winresize.el.


> I can't really imagine a situation where it's often useful to switch
> from a horizontal layout to a vertical one, can you give me examples?

Of course, you have the ediffing case where I want to easily
switch from one configuration to the other, depending on what
I'm comparing and how (having my Emacs full screen or not). But
there is already a key binding for that.

Another case is, for example, when I'm reading mail. Sometimes
I'd like to pass from the first screen configuration above
(which is my default one, with Gnus) to the second, in a matter
of seconds, and without the mouse).

In that case, I first force full screen (under Ubuntu) with `C-c z':

--8<---------------cut here---------------start------------->8---
(unless running-ms-windows
    (defun my-toggle-full-screen ()
      "Toggle between full screen and partial screen display on X11;
    courtesy of http://www.emacswiki.org/cgi-bin/wiki/FullScreen";
      (interactive)
      (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
                             '(2 "_NET_WM_STATE_FULLSCREEN" 0)))

    (global-set-key [(control c) (z)] 'my-toggle-full-screen))
--8<---------------cut here---------------end--------------->8---

and then I have to switch the split of the windows, which was
the missing piece of my puzzle.

Does this make sense?

Best regards,
  Seb

-- 
Sébastien Vauban


reply via email to

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