unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Is there a function to return buffer of the "other" window when split horizontally?
@ 2007-02-25 22:28 Martin Nordholts
  2007-02-25 22:37 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Nordholts @ 2007-02-25 22:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hello!

I fail to find a function that returns the "other" buffer when one has
split a window horizontally.

other-window seemed as a good candidate at first, but I can't make it
work as I wish.

How can I do this?

I need it for a function that changes a horizontally split window to a
vertically split one (to quickly make more rows availible on both
buffers when entering a Ruby debugger session.

Thank you!

- Martin Nordholts

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

* Re: Is there a function to return buffer of the "other" window when split horizontally?
  2007-02-25 22:28 Is there a function to return buffer of the "other" window when split horizontally? Martin Nordholts
@ 2007-02-25 22:37 ` Lennart Borgman (gmail)
  2007-02-25 22:54   ` Martin Nordholts
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2007-02-25 22:37 UTC (permalink / raw)
  To: enselic; +Cc: help-gnu-emacs

Martin Nordholts wrote:
> Hello!
> 
> I fail to find a function that returns the "other" buffer when one has
> split a window horizontally.
> 
> other-window seemed as a good candidate at first, but I can't make it
> work as I wish.
> 
> How can I do this?
> 
> I need it for a function that changes a horizontally split window to a
> vertically split one (to quickly make more rows availible on both
> buffers when entering a Ruby debugger session.

Something like this perhaps:

(save-window-excursion
   (other-window 1)
   (window-buffer))

But have you checked on EmacsWiki is someone has already written a 
library for this?

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

* Re: Is there a function to return buffer of the "other" window when split horizontally?
  2007-02-25 22:37 ` Lennart Borgman (gmail)
@ 2007-02-25 22:54   ` Martin Nordholts
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Nordholts @ 2007-02-25 22:54 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs User List

Ah, nice, there was already a function for this :)
http://www.emacswiki.org/cgi-bin/emacs-en/ToggleWindowSplit

- Martin



sön 2007-02-25 klockan 23:37 +0100 skrev Lennart Borgman (gmail):
> Martin Nordholts wrote:
> > Hello!
> > 
> > I fail to find a function that returns the "other" buffer when one has
> > split a window horizontally.
> > 
> > other-window seemed as a good candidate at first, but I can't make it
> > work as I wish.
> > 
> > How can I do this?
> > 
> > I need it for a function that changes a horizontally split window to a
> > vertically split one (to quickly make more rows availible on both
> > buffers when entering a Ruby debugger session.
> 
> Something like this perhaps:
> 
> (save-window-excursion
>    (other-window 1)
>    (window-buffer))
> 
> But have you checked on EmacsWiki is someone has already written a 
> library for this?

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

end of thread, other threads:[~2007-02-25 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-25 22:28 Is there a function to return buffer of the "other" window when split horizontally? Martin Nordholts
2007-02-25 22:37 ` Lennart Borgman (gmail)
2007-02-25 22:54   ` Martin Nordholts

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