[ESS] Listbox for matching previous commands

Vitalie Spinu spinuvit at gmail.com
Mon Aug 25 19:09:00 CEST 2014



 >>> Sebastien Vauban on Mon, 25 Aug 2014 12:33:14 +0200 wrote:

[...]

 > Though, there, it displays a listbox with the matched commands from the
 > history: see http://screencast.com/t/jOV9PjlGpc0H.

 > Is something similar doable in ESS?

Not exactly in that form. It's pretty inefficient as compared to emacs
alternatives but it could be easily implemented with the auto-complete
framework.

In default emacs there is C-c C-l which shows all the previous commands
in an electric buffer. A much more convenient is `helm-comint-input-ring`.

Unfortunately it doesn't work right away in iESS buffers. I have just
made a change to ESS to make it work. Till the new ESS release (very
soon now) you can use a substitute:

   (defun ess-comint-input-ring ()
     "Predefined `helm' that provide completion of `comint' history."
     (interactive)
     (helm :sources 'helm-source-comint-input-ring
           :input (buffer-substring-no-properties (comint-line-beginning-position)
                                                  (point-at-eol))
           :buffer "*helm comint history*"))



  Vitalie



More information about the ESS-help mailing list