[ESS] Pasted commands are not inserted in the history

Vitalie Spinu spinuvit at gmail.com
Fri Aug 22 19:39:33 CEST 2014


 >>> Sebastien Vauban on Fri, 22 Aug 2014 12:53:40 +0200 wrote:

[...]

 > Is this a bug?

No this is a feature. From time to time we see new ESS users proposing
this "feature".

When you evaluate paragraphs or functions, you really don't want all
those lines in the *R* history. It's would add a lot of noise. Once I
tried it only on ess-eval-line-and-step and I quickly realized that it
was doing more harm than it helped. So I didn't bother implementing it.

The reason why new ESS users don't see how annoying that behavior might
be is that they use R script and R repl for the same things. Once you
got used to ESS you script evaluation and repl evaluation become
complementary. That is, you will use script for massive, reproducible
things, and repl from time to time for quick check or short algebraic
computation. You will almost never run the same commands in script and
repl.


------

BTW, as an advice, use comint-previous-matching-input-from-input instead
of comint-previous-input. It works as comint-previous-input on blank
lines and matches starting line if there is any text.

This is what I do:
   
   (define-key comint-mode-map [(meta ?p)] 'comint-previous-matching-input-from-input)
   (define-key comint-mode-map [(meta ?n)] 'comint-next-matching-input-from-input)


   Vitalie



More information about the ESS-help mailing list