[ESS] Multi-line commands and comint-previous-prompt (from the menu Backward Output Group)
Manuel Morales
mmorales at williams.edu
Sat Dec 13 14:05:27 CET 2014
Hi Vitalie,
Thank you but the issue for me is that M-p only retrieves commands that
have been entered from the R process. My workflow involves entering
commands from a script and the R process buffer and I'd like to retrieve
commands from either form of entry.
Is there a command that would put me to the end of the input expression
excluding the "readout" in the case of using comint-previous-input
before using C-ret?
Finally M-p doesn't seem to retrieve the whole entry, only the last part
of the expression in the example I posted.
Thanks!
On Fri, 2014-12-12 at 23:50 -0800, Vitalie Spinu wrote:
> You have to position your cursor at the end of the expression. Only the
> code preceding the prompt is executed.
>
> It's better to use M-p or comint-previous-matching-input-from-input to
> recall previous command at the prompt directly.
>
>
> Vitalie
>
> >>> Manuel Morales on Thu, 11 Dec 2014 21:22:51 -0500 wrote:
>
> > I'm using ESS 14.9 installed from Melpa.
> > If I enter the following multi-line expression:
>
> > a <-
> > c(1:10)
>
> > I can get back to it using C-c C-p and then re-run it using ENTER. That
> > gives the following output:
>
> >> a <-
> > c(1:10)
> > a <-
> > + c(1:10)
>
> > If I now type C-c C-p and try to re-run using ENTER I get only the first
> > line:
>
> >> a <-
>
> > Is there a way to change this behavior?
>
> > For more background I'm trying to write a function that will allow me to
> > recall commands from the history that have been entered from either the
> > R-buffer or a script file and the issue above is causing problems. If
> > interested see link below for the function:
> > https://stackoverflow.com/questions/27307757/ess-retrieving-command-history-from-commands-entered-in-essr-inferior-mode-or/27412677#27412677
>
> > ______________________________________________
> > ESS-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list