[ESS] push-region-other-window

Vitalie Spinu spinuvit at gmail.com
Wed Apr 3 19:50:14 CEST 2013


Hi Tiago, 

See this stackoverflow question [1]. The answer does precisely what you want
in one blow. If invoked with no active region it sends the current
line. If region is active it sends the region. That is similar to the
behavior of C-RET in ESS (ess-eval-region-or-line-and-step).

HTH, 
    Vitalie

[1] http://stackoverflow.com/questions/6286579/emacs-shell-mode-how-to-send-region-to-shell


  >> Tiago R M <tiago17 at gmail.com>
  >> on Wed, 3 Apr 2013 18:35:58 +0100 wrote:

 > Dear mailing list,
 > Some years ago I got very valuable help in this mailing list to push a line
 > to a bottom window.
 > https://stat.ethz.ch/pipermail/ess-help/2008-November/004949.html

 > The solution came from Tim Hesterberg:
 > (fset 'push-line-other-window
 >       "\C-@\C-e\M-w\C-n\C-a\C-xo\M->\C-y\C-m\C-xo")
 > (global-set-key "\C-i" 'push-line-other-window )
 > (define-key esc-map "o" 'push-line-other-window)

 > I wanted to do exactly the same but pushing a highlighted region, composed
 > of several lines, not only a single line.

 > (Basically what I want to do is to emulate the C-c C-r command in ESS, but
 > when the bottom window is a shell command, not an R process)

 > Thank you for any possible help,
 > Tiago R Magalhaes

 > 	[[alternative HTML version deleted]]

 > ______________________________________________
 > ESS-help at r-project.org mailing list
 > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list