[ESS] ANSI escape sequences in ESS
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Mon May 11 23:02:05 CEST 2015
Interestingly, this *works* extremely nicely for me, using emacs
23.4.1 (still the default on ubuntu 14.03 LTS).
I attach an emacs window screen shot, which at least Vitalie and Tamas will get.
(R 3.2.0 patched, "current"; emacs 15.09-devel "current")
On Mon, May 11, 2015 at 1:23 AM, Vitalie Spinu <spinuvit using gmail.com> wrote:
> We are not even getting those delimiters because TERM var is "dumb" by
> default. You can either:
> Sys.setenv(TERM = "xterm-256color")
> directly in R, or prepend that to process-environment in emacs.
> >>> Tamas Papp on Sun, 10 May 2015 17:28:49 +0200 wrote:
> > On Fri, May 08 2015, Vitalie Spinu <spinuvit using gmail.com> wrote:
> >> >>> Tamas Papp on Fri, 08 May 2015 13:23:54 +0200 wrote:
> >> > Hi,
> >> > I saw some R packages that implement ANSI escapes in R and Julia, eg
> >> > https://github.com/gaborcsardi/crayon . But when I tried this in ESS/R,
> >> > the output was unchanged, in Julia I saw the escapes.
> >> There is ansi-color-process-output in comint-output-filter-functions so
> >> it should work in principle. But, as R is not producing any of shush, it
> >> was never tested.
> >> If you give a small reproducible example that works in terminal but not
> >> in ESS, I might have a look at it.
> > Hi Vitalie,
> > This works in the terminal, but not in Emacs/ESS (versions below):
> > install.packages("crayon")
> > library(crayon)
> > cat(green("test\n"))
> > Should print "test" in green.
> > Thanks for looking into this.
> > Best,
> > Tamas
> > PS.: Versions:
> > GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of
> > 2015-03-07 on trouble, modified by Debian
> > ess-version: 15.09-devel [elpa: 20150423.923] (loaded from /home/tamas/.emacs.d/elpa/ess-20150423.923/)
> > R version:
> > _
> > platform x86_64-pc-linux-gnu
> > arch x86_64
> > os linux-gnu
> > system x86_64, linux-gnu
> > status
> > major 3
> > minor 2.0
> > year 2015
> > month 04
> > day 16
> > svn rev 68180
> > language R
> > version.string R version 3.2.0 (2015-04-16)
> > nickname Full of Ingredients
> > Crayon: 2015-04-09 00:30:34
> ESS-help using r-project.org mailing list
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 93113 bytes
Desc: not available
More information about the ESS-help