all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question on splitting windows
@ 2011-08-04  9:21 Frederik
  2011-08-04 14:59 ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Frederik @ 2011-08-04  9:21 UTC (permalink / raw)
  To: help-gnu-emacs

Hey there!

Often I split windows to have two buffers next to each other, but then I
decide to concentrate on one buffer and therefore I close the window
displaying the other one. Later, I split windows again; but then I get
the same buffer I've been working on in both windows: I've to switch
buffers again to see the two buffers I was working on in the first place.

This is a bit annoying. Is it possible to have the buffer in the new
window, that has been there before?

Thanks & regards

-- 
Frederik




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

* RE: Question on splitting windows
  2011-08-04  9:21 Question on splitting windows Frederik
@ 2011-08-04 14:59 ` Drew Adams
  2011-08-04 15:06   ` Jai Dayal
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2011-08-04 14:59 UTC (permalink / raw)
  To: 'Frederik', help-gnu-emacs

> Later, I split windows again; but then I get
> the same buffer I've been working on in both windows: I've to switch
> buffers again to see the two buffers I was working on in the 
> first place.
> 
> This is a bit annoying. Is it possible to have the buffer
> in the new window, that has been there before?

`C-x 4 b' switches to another buffer (with luck, the one you want) in another
window.




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

* Re: Question on splitting windows
  2011-08-04 14:59 ` Drew Adams
@ 2011-08-04 15:06   ` Jai Dayal
  2011-08-04 15:23     ` Vijay Lakshminarayanan
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jai Dayal @ 2011-08-04 15:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: Frederik, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

Interesting.  This splits windows vertically.. how about horizonally?

On Thu, Aug 4, 2011 at 8:59 AM, Drew Adams <drew.adams@oracle.com> wrote:

> > Later, I split windows again; but then I get
> > the same buffer I've been working on in both windows: I've to switch
> > buffers again to see the two buffers I was working on in the
> > first place.
> >
> > This is a bit annoying. Is it possible to have the buffer
> > in the new window, that has been there before?
>
> `C-x 4 b' switches to another buffer (with luck, the one you want) in
> another
> window.
>
>
>

[-- Attachment #2: Type: text/html, Size: 895 bytes --]

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

* Re: Question on splitting windows
  2011-08-04 15:06   ` Jai Dayal
@ 2011-08-04 15:23     ` Vijay Lakshminarayanan
  2011-08-04 15:46     ` Frederik
       [not found]     ` <87sjphw6cl.fsf@gmail.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Vijay Lakshminarayanan @ 2011-08-04 15:23 UTC (permalink / raw)
  To: Jai Dayal; +Cc: Frederik, help-gnu-emacs

Jai Dayal <dayalsoap@gmail.com> writes:

> Interesting.  This splits windows vertically.. how about horizonally?
>
> On Thu, Aug 4, 2011 at 8:59 AM, Drew Adams <drew.adams@oracle.com>
> wrote:
>
>     > Later, I split windows again; but then I get
>     > the same buffer I've been working on in both windows: I've to
>     switch
>     > buffers again to see the two buffers I was working on in the
>     > first place.
>     >
>     > This is a bit annoying. Is it possible to have the buffer
>     > in the new window, that has been there before?
>    
>     `C-x 4 b' switches to another buffer (with luck, the one you
>     want) in another
>     window.

This time to the group also...

C-x 3 -> split-window-side-by-side
C-x 2 -> split-window-above-each-other
C-x 1 -> delete-other-windows

-- 
Cheers
~vijay

Gnus should be more complicated.



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

* Re: Question on splitting windows
  2011-08-04 15:06   ` Jai Dayal
  2011-08-04 15:23     ` Vijay Lakshminarayanan
@ 2011-08-04 15:46     ` Frederik
  2011-08-04 19:43       ` Eric Abrahamsen
       [not found]     ` <87sjphw6cl.fsf@gmail.com>
  2 siblings, 1 reply; 10+ messages in thread
From: Frederik @ 2011-08-04 15:46 UTC (permalink / raw)
  To: help-gnu-emacs

Am 04.08.2011 17:06, schrieb Jai Dayal:
> Interesting.  This splits windows vertically.. how about horizonally?
> 
> On Thu, Aug 4, 2011 at 8:59 AM, Drew Adams <drew.adams@oracle.com> wrote:
> 
>>> Later, I split windows again; but then I get
>>> the same buffer I've been working on in both windows: I've to switch
>>> buffers again to see the two buffers I was working on in the
>>> first place.
>>>
>>> This is a bit annoying. Is it possible to have the buffer
>>> in the new window, that has been there before?
>>
>> `C-x 4 b' switches to another buffer (with luck, the one you want) in
>> another
>> window.
>>
>>
>>
> 

I agree -- it's quite a good pointer, but splitting horizontally would
be even better...

Thanks & regards

-- 
Frederik




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

* Re: Question on splitting windows
       [not found]     ` <87sjphw6cl.fsf@gmail.com>
@ 2011-08-04 16:26       ` Jai Dayal
  2011-08-04 18:30         ` Vijay Lakshminarayanan
  0 siblings, 1 reply; 10+ messages in thread
From: Jai Dayal @ 2011-08-04 16:26 UTC (permalink / raw)
  To: Vijay Lakshminarayanan, help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

Yes, but that doesn't have the functionality that C-x 4 b does.  C-x 4 b
opens a new window with a DIFFERENT (random?) buffer in the new window (the
point of the thread).  C-x 3 opens with the same buffer in the new window.


On Thu, Aug 4, 2011 at 9:20 AM, Vijay Lakshminarayanan <laksvij@gmail.com>wrote:

> Jai Dayal <dayalsoap@gmail.com> writes:
>
> > Interesting.  This splits windows vertically.. how about horizonally?
> >
> > On Thu, Aug 4, 2011 at 8:59 AM, Drew Adams <drew.adams@oracle.com>
> > wrote:
> >
> >     > Later, I split windows again; but then I get
> >     > the same buffer I've been working on in both windows: I've to
> >     switch
> >     > buffers again to see the two buffers I was working on in the
> >     > first place.
> >     >
> >     > This is a bit annoying. Is it possible to have the buffer
> >     > in the new window, that has been there before?
> >
> >     `C-x 4 b' switches to another buffer (with luck, the one you
> >     want) in another
> >     window.
>
> C-x 3 -> split-window-side-by-side
> C-x 2 -> split-window-above-each-other
> C-x 1 -> delete-other-windows
>
> --
> Cheers
> ~vijay
>
> Gnus should be more complicated.
>

[-- Attachment #2: Type: text/html, Size: 1799 bytes --]

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

* Re: Question on splitting windows
  2011-08-04 16:26       ` Jai Dayal
@ 2011-08-04 18:30         ` Vijay Lakshminarayanan
  0 siblings, 0 replies; 10+ messages in thread
From: Vijay Lakshminarayanan @ 2011-08-04 18:30 UTC (permalink / raw)
  To: Jai Dayal; +Cc: help-gnu-emacs

Jai Dayal <dayalsoap@gmail.com> writes:

> Yes, but that doesn't have the functionality that C-x 4 b does.  C-x
> 4 b opens a new window with a DIFFERENT (random?) buffer in the new
> window (the point of the thread).  C-x 3 opens with the same buffer
> in the new window.

[snip]

> >     C-x 3 -> split-window-side-by-side
> >     C-x 2 -> split-window-above-each-other
> >     C-x 1 -> delete-other-windows

When my Emacs frame is small, C-x 4 b etc. split the window
horizontally.  At other times, Emacs splits it vertically.  C-x 2 and
C-x 3 give me explicit control over how I want the windows split.  Once
I've split the display as I place, I use C-x 4 b (or C-x 4 C-o etc) to
open the buffer I want.

--
Cheers
~vijay

Gnus should be more complicated.



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

* Re: Question on splitting windows
  2011-08-04 15:46     ` Frederik
@ 2011-08-04 19:43       ` Eric Abrahamsen
  2011-08-04 20:18         ` Frederik
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2011-08-04 19:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, Aug 04 2011, Frederik wrote:

> Am 04.08.2011 17:06, schrieb Jai Dayal:
>> Interesting.  This splits windows vertically.. how about horizonally?
>> 
>> On Thu, Aug 4, 2011 at 8:59 AM, Drew Adams <drew.adams@oracle.com> wrote:
>> 
>>>> Later, I split windows again; but then I get
>>>> the same buffer I've been working on in both windows: I've to switch
>>>> buffers again to see the two buffers I was working on in the
>>>> first place.
>>>>
>>>> This is a bit annoying. Is it possible to have the buffer
>>>> in the new window, that has been there before?
>>>
>>> `C-x 4 b' switches to another buffer (with luck, the one you want) in
>>> another
>>> window.
>>>
>>>
>>>
>> 
>
> 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.

E




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

* Re: Question on splitting windows
  2011-08-04 19:43       ` Eric Abrahamsen
@ 2011-08-04 20:18         ` Frederik
       [not found]           ` <CAF-1L2TLyqGZcDMH459isH5WhWeBOiLhoQvyEdcV2aZQXzoJrw@mail.gmail.com>
  0 siblings, 1 reply; 10+ messages in thread
From: Frederik @ 2011-08-04 20:18 UTC (permalink / raw)
  To: help-gnu-emacs

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




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

* Re: Question on splitting windows
       [not found]           ` <CAF-1L2TLyqGZcDMH459isH5WhWeBOiLhoQvyEdcV2aZQXzoJrw@mail.gmail.com>
@ 2011-08-10 13:58             ` Alan E. Davis
  0 siblings, 0 replies; 10+ messages in thread
From: Alan E. Davis @ 2011-08-10 13:58 UTC (permalink / raw)
  To: help-gnu-emacs


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

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 <freak.fred@gmail.com> 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
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 2441 bytes --]

[-- Attachment #2: flip-flop-and-change-windows.el --]
[-- Type: text/x-emacs-lisp, Size: 575 bytes --]

;;; Taken from .emacs.el Mon Jun 12 21:33:40 1995  AED, and rewritten with (let...
(defun flip-flop-and-change-windows ()
  "Swap window sizes; move into the other window.  This function
enables one to have two windows visible, but with one reduced to two lines."
   (interactive)
   (let ((current-window-height (window-height)) 
	 (new-window-height nil)
	 (delta-window-height nil))
     (other-window 1)
     (setq new-window-height (window-height))
     (setq delta-window-height (- current-window-height new-window-height))
     (enlarge-window delta-window-height)))


[-- Attachment #3: swap-windows.el --]
[-- Type: text/x-emacs-lisp, Size: 946 bytes --]

(defun swap-window-positions ()
  "Swap the positions of this window and the next one.
gildea Nov 88"
  (interactive)
  (let ((other-window (next-window (selected-window) 'no-minibuf)))
    (let ((other-window-buffer (window-buffer other-window))
	  (other-window-hscroll (window-hscroll other-window))
	  (other-window-point (window-point other-window))
	  (other-window-start (window-start other-window)))
      (set-window-buffer other-window (current-buffer))
      (set-window-hscroll other-window (window-hscroll (selected-window)))
      (set-window-point other-window (point))
      (set-window-start other-window (window-start (selected-window)))
      (set-window-buffer (selected-window) other-window-buffer)
      (set-window-hscroll (selected-window) other-window-hscroll)
      (set-window-point (selected-window) other-window-point)
      (set-window-start (selected-window) other-window-start))
    (select-window other-window)))

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

end of thread, other threads:[~2011-08-10 13:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04  9:21 Question on splitting windows Frederik
2011-08-04 14:59 ` Drew Adams
2011-08-04 15:06   ` Jai Dayal
2011-08-04 15:23     ` Vijay Lakshminarayanan
2011-08-04 15:46     ` Frederik
2011-08-04 19:43       ` Eric Abrahamsen
2011-08-04 20:18         ` Frederik
     [not found]           ` <CAF-1L2TLyqGZcDMH459isH5WhWeBOiLhoQvyEdcV2aZQXzoJrw@mail.gmail.com>
2011-08-10 13:58             ` Alan E. Davis
     [not found]     ` <87sjphw6cl.fsf@gmail.com>
2011-08-04 16:26       ` Jai Dayal
2011-08-04 18:30         ` Vijay Lakshminarayanan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.