[prev in list] [next in list] [prev in thread] [next in thread]
List: ess-help
Subject: Re: [ESS] Automating launch of R session and splitting into 2buffers
From: "Kevin Wright" <kw.statr () gmail ! com>
Date: 2008-09-08 21:48:43
Message-ID: c968588d0809081448k32c784c9p8f4b3e1b1f70f8b0 () mail ! gmail ! com
[Download RAW message or body]
Here's one function for swapping.
;; Swap buffer windows
(defun swap-windows (arg)
"Transpose the buffers shown in two windows."
(interactive "p")
(let ((selector (if (>= arg 0) 'next-window 'previous-window)))
(while (/= arg 0)
(let ((this-win (window-buffer))
(next-win (window-buffer (funcall selector))))
(set-window-buffer (selected-window) next-win)
(set-window-buffer (funcall selector) this-win)
(select-window (funcall selector)))
(setq arg (if (plusp arg) (1- arg) (1+ arg))))))
;; And map it to a key
(define-key ctl-x-4-map (kbd "t") 'swap-windows)
(global-set-key "\C-xB" 'swap-windows)
Kevin Wright
On Mon, Sep 8, 2008 at 9:59 AM, Sebastian P. Luque <spluque@gmail.com> wrote:
> On Mon, 8 Sep 2008 09:09:52 -0400,
> gerald.jean@dgag.ca wrote:
>
> [...]
>
>> Thanks Sebastien, I have been wanting this behaviour for a long, very
>> long, time! But, it seems there is always a but, it is possible to
>> have it the other way around, i.e. the S process (S+ in my case) in
>> the upper buffer? I have been working that way for years, it is hard
>> to change!!!
>
> AFAICT, there's no built-in way to do that, but I remember someone
> posted a function in emacswiki.org to swap buffers between windows. If
> you find it (sorry, I don't have it with me), you can add it to
> inferior-ess-mode-hook (with nil inferior-ess-same-window).
>
>
> --
> Seb
>
> ______________________________________________
> ESS-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
______________________________________________
ESS-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic