[ESS] Listbox for matching previous commands

Sebastien Vauban sva-news at mygooglest.com
Thu Aug 28 16:46:48 CEST 2014


Vitalie Spinu 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*"))

Quite interesting. Thanks a lot!

Best regards,
  Seb

PS- I've found that that function does exist in the current version of
Helm, under the name helm-comint-input-ring.

-- 
Sebastien Vauban



More information about the ESS-help mailing list