From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alan E. Davis" Newsgroups: gmane.emacs.help Subject: Re: Question on splitting windows Date: Wed, 10 Aug 2011 06:58:19 -0700 Message-ID: References: <405BCC9ABC664EC3BFF6730E1FCF1A82@us.oracle.com> <874o1xm080.fsf@ericabrahamsen.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=000e0ce0f792c9b2c204aa271328 X-Trace: dough.gmane.org 1312984741 11627 80.91.229.12 (10 Aug 2011 13:59:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2011 13:59:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 10 15:58:57 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qr9J8-0005ts-7c for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Aug 2011 15:58:55 +0200 Original-Received: from localhost ([::1]:37563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr9J2-000412-La for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Aug 2011 09:58:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr9Ix-00040t-CN for help-gnu-emacs@gnu.org; Wed, 10 Aug 2011 09:58:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr9Iv-00072t-LV for help-gnu-emacs@gnu.org; Wed, 10 Aug 2011 09:58:43 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:37386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr9Iv-00072k-8T for help-gnu-emacs@gnu.org; Wed, 10 Aug 2011 09:58:41 -0400 Original-Received: by wwf10 with SMTP id 10so929355wwf.30 for ; Wed, 10 Aug 2011 06:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=GpPEqj1Ip+RGUBnKFX9F5ch5D5RFJmgldmz9Pfl1Jik=; b=gNBSXpwYfDw4ux4N2DPXiIFopch7lQmmE158TmUoZIVY9aVe6/rmcxhRTPbfY0nFja E9OMGS5ddxGvYFwrcNJb29Mv29LrK6LuTBIT2HtUnasO1Wxb40+J1JsHqujhG3m0hl5R FMZDKSkkyfUVW1Rxx7VBHSODUSG4XKbY0tA1k= Original-Received: by 10.216.60.203 with SMTP id u53mr599074wec.96.1312984719274; Wed, 10 Aug 2011 06:58:39 -0700 (PDT) Original-Received: by 10.216.17.6 with HTTP; Wed, 10 Aug 2011 06:58:19 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81922 Archived-At: --000e0ce0f792c9b2c204aa271328 Content-Type: multipart/alternative; boundary=000e0ce0f792c9b2bc04aa271326 --000e0ce0f792c9b2bc04aa271326 Content-Type: text/plain; charset=ISO-8859-1 I'm out of my element, but years ago I used a couple of little utilities for switching windows in a console (now I would call it a frame). Perhaps it could be adapted to side by side windows. For the top and bottom version one of the windows would be exaggerated, and the other one shrunk to two or three lines only. The utilities would either swap the buffers, so the shrunken one would move into the large window, where the cursor was now positioned on the previously shrunken buffer, and visa versa. This way, two buffers could be kept open in one frame. The utility I preferred would leave the buffers in the same windows, but move the cursor, and swap the sizes. These are simple and effective approaches. Certainly they could be improved, and perhaps adapted to the current problem. I would like to use such a utility with Org-mode, to switch back and forth between the agenda buffer and the window where the todo items are following. Or other purposes. I'll attach the utility called "flip-flop-and-change-windows." The utility "swap window-positions" was written by, I think, Steven Gildea, many moons ago. I apologize for the terminological morass I resorted to above. At this point, I'm so far away from doing any programming that I haven't had time to sit and think it through. Hope it's helpful. Alan Davis On Thu, Aug 4, 2011 at 1:18 PM, Frederik wrote: > >> I agree -- it's quite a good pointer, but splitting horizontally would > >> be even better... > >> > >> Thanks & regards > > > > You can muck with split-width-threshold and split-height-threshold to > > make behave the way you want. > > > > Jup, that's it. Thanks! > > The docstring of `split-window-sensibly' is most helpful: > C-h f split-window-sensibly RET > > Regards > > > -- > Frederik > > > --000e0ce0f792c9b2bc04aa271326 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable =A0
I'm out of my element, but years ago= =A0 I used a couple of little utilities for switching windows in a console = (now I would call it a frame).=A0 Perhaps it could be adapted to side by si= de windows.=A0

For the top and bottom version one of the windows would be exaggerated,= and the other one shrunk to two or three lines only.=A0=A0 The utilities w= ould either swap the buffers, so the shrunken one would move into the large= window, where the cursor was now positioned on the previously shrunken buf= fer, and visa versa.=A0 This way, two buffers could be kept open in one fra= me.
The utility I preferred would leave the buffers in the same windows, but mo= ve the cursor, and swap the sizes.=A0=A0

These are simple and effec= tive approaches.=A0 Certainly they could be improved, and perhaps adapted t= o the current problem.=A0 I would like to use such a utility with Org-mode,= to switch back and forth between the agenda buffer and the window where th= e todo items are following.=A0=A0 Or other purposes.

I'll attach the utility called "flip-flop-and-change-windows.&= quot;=A0=A0 The utility "swap window-positions" was written by, I= think, Steven Gildea, many moons ago. =A0 I apologize for the terminologic= al morass I resorted to above.=A0 At this point, I'm so far away from d= oing any programming that I haven't had time to sit and think it throug= h.=A0 Hope it's helpful.

Alan Davis



On Thu, Aug 4, 2011 at 1:18 PM, Frederik <freak.fred= @gmail.com> wrote:
>> I agree -- it's quite a good pointer, but splitting horiz= ontally would
>> be even better...
>>
>> Thanks & regards
>
> You can muck with split-width-threshold and split-height-threshold to<= br> > make behave the way you want.
>

Jup, that's it. Thanks!

The docstring of `split-window-sensibly' is most helpful:
C-h f split-window-sensibly RET

Regards


--
Frederik




--000e0ce0f792c9b2bc04aa271326-- --000e0ce0f792c9b2c204aa271328 Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="flip-flop-and-change-windows.el" Content-Disposition: attachment; filename="flip-flop-and-change-windows.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gr5kbcg30 Ozs7IFRha2VuIGZyb20gLmVtYWNzLmVsIE1vbiBKdW4gMTIgMjE6MzM6NDAgMTk5NSAgQUVELCBh bmQgcmV3cml0dGVuIHdpdGggKGxldC4uLgooZGVmdW4gZmxpcC1mbG9wLWFuZC1jaGFuZ2Utd2lu ZG93cyAoKQogICJTd2FwIHdpbmRvdyBzaXplczsgbW92ZSBpbnRvIHRoZSBvdGhlciB3aW5kb3cu ICBUaGlzIGZ1bmN0aW9uCmVuYWJsZXMgb25lIHRvIGhhdmUgdHdvIHdpbmRvd3MgdmlzaWJsZSwg YnV0IHdpdGggb25lIHJlZHVjZWQgdG8gdHdvIGxpbmVzLiIKICAgKGludGVyYWN0aXZlKQogICAo bGV0ICgoY3VycmVudC13aW5kb3ctaGVpZ2h0ICh3aW5kb3ctaGVpZ2h0KSkgCgkgKG5ldy13aW5k b3ctaGVpZ2h0IG5pbCkKCSAoZGVsdGEtd2luZG93LWhlaWdodCBuaWwpKQogICAgIChvdGhlci13 aW5kb3cgMSkKICAgICAoc2V0cSBuZXctd2luZG93LWhlaWdodCAod2luZG93LWhlaWdodCkpCiAg ICAgKHNldHEgZGVsdGEtd2luZG93LWhlaWdodCAoLSBjdXJyZW50LXdpbmRvdy1oZWlnaHQgbmV3 LXdpbmRvdy1oZWlnaHQpKQogICAgIChlbmxhcmdlLXdpbmRvdyBkZWx0YS13aW5kb3ctaGVpZ2h0 KSkpCgo= --000e0ce0f792c9b2c204aa271328 Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="swap-windows.el" Content-Disposition: attachment; filename="swap-windows.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gr5kd2th1 KGRlZnVuIHN3YXAtd2luZG93LXBvc2l0aW9ucyAoKQogICJTd2FwIHRoZSBwb3NpdGlvbnMgb2Yg dGhpcyB3aW5kb3cgYW5kIHRoZSBuZXh0IG9uZS4KZ2lsZGVhIE5vdiA4OCIKICAoaW50ZXJhY3Rp dmUpCiAgKGxldCAoKG90aGVyLXdpbmRvdyAobmV4dC13aW5kb3cgKHNlbGVjdGVkLXdpbmRvdykg J25vLW1pbmlidWYpKSkKICAgIChsZXQgKChvdGhlci13aW5kb3ctYnVmZmVyICh3aW5kb3ctYnVm ZmVyIG90aGVyLXdpbmRvdykpCgkgIChvdGhlci13aW5kb3ctaHNjcm9sbCAod2luZG93LWhzY3Jv bGwgb3RoZXItd2luZG93KSkKCSAgKG90aGVyLXdpbmRvdy1wb2ludCAod2luZG93LXBvaW50IG90 aGVyLXdpbmRvdykpCgkgIChvdGhlci13aW5kb3ctc3RhcnQgKHdpbmRvdy1zdGFydCBvdGhlci13 aW5kb3cpKSkKICAgICAgKHNldC13aW5kb3ctYnVmZmVyIG90aGVyLXdpbmRvdyAoY3VycmVudC1i dWZmZXIpKQogICAgICAoc2V0LXdpbmRvdy1oc2Nyb2xsIG90aGVyLXdpbmRvdyAod2luZG93LWhz Y3JvbGwgKHNlbGVjdGVkLXdpbmRvdykpKQogICAgICAoc2V0LXdpbmRvdy1wb2ludCBvdGhlci13 aW5kb3cgKHBvaW50KSkKICAgICAgKHNldC13aW5kb3ctc3RhcnQgb3RoZXItd2luZG93ICh3aW5k b3ctc3RhcnQgKHNlbGVjdGVkLXdpbmRvdykpKQogICAgICAoc2V0LXdpbmRvdy1idWZmZXIgKHNl bGVjdGVkLXdpbmRvdykgb3RoZXItd2luZG93LWJ1ZmZlcikKICAgICAgKHNldC13aW5kb3ctaHNj cm9sbCAoc2VsZWN0ZWQtd2luZG93KSBvdGhlci13aW5kb3ctaHNjcm9sbCkKICAgICAgKHNldC13 aW5kb3ctcG9pbnQgKHNlbGVjdGVkLXdpbmRvdykgb3RoZXItd2luZG93LXBvaW50KQogICAgICAo c2V0LXdpbmRvdy1zdGFydCAoc2VsZWN0ZWQtd2luZG93KSBvdGhlci13aW5kb3ctc3RhcnQpKQog ICAgKHNlbGVjdC13aW5kb3cgb3RoZXItd2luZG93KSkpCg== --000e0ce0f792c9b2c204aa271328--