[ESS] Interact with ESS from R
Sparapani, Rodney
rsparapa at mcw.edu
Mon Jun 1 15:57:09 CEST 2015
> Dear All,
>
> I am trying to make crayon (http://www.r-pkg.org/pkg/crayon) work with
> Emacs more smoothly. crayon can add ANSI color to strings printed to
> the terminal.
>
> As I understand from http://www.emacswiki.org/emacs/AnsiColor recent
> versions of Emacs support this out of the box, as long as
> (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
> (add-to-list 'comint-output-filter-functions 'ansi-color-process-output)
> was done.
>
> I can check the version of Emacs from the INSIDE_EMACS environment
> variable, so I can easily tell if it is recent enough to have
> ansi-color.el. So far so good.
>
> Is there a way to check if 'ansi-color-for-comint-mode-on was run and
> if 'comint-output-filter-functions contains
> 'ansi-color-process-output?
It is trivial is it not? If 'ansi-color-for-comint-mode-on was run,
then ansi-color-for-comint-mode should be t, right? (Just make sure
it is set to nil prior) To detect 'ansi-color-process-output, just
try something like
(memq 'ansi-color-process-output comint-output-filter-functions)
> In general, can I call Emacs lisp functions from the embedded R process?
Now, you got me there ;o)
> I am sorry if this is documented somewhere, I tried to find it in the
> docs, without luck.
>
> Thanks, Best,
> Gabor
>
More information about the ESS-help
mailing list