Re: [ESS] How can one tell rlang not to mess up R session in ESS ?

2023-11-14 Thread Lionel Henry via ESS-help
Worth noting I'm using `xterm-color` instead of `ansi-color` in my
comint buffers. IIRC the latter (which is builtin) didn't support some
features. Not sure if that could explain the bad behaviour you've
observed.

Best,
Lionel

On 11/14/23, Martin Maechler via ESS-help  wrote:
>> Dirk Eddelbuettel via ESS-help
>> on Mon, 13 Nov 2023 10:00:26 -0600 writes:
>
> > Casual searching at the rlang repo doesn't reveal anything so pardon
> me for
> > asking here but what is a simple way to tell rlang to NOT do fancy
> pants
> > color error backtraces?  At least under the theme I use ("nord", for
> Emacs)
> > it basically nixes readability by leaving a 'dark on dark' default.
>
> I've noticed the same ... and was very frustrated.
> IIRC, I needed to restart R to get back to a usable *R* buffer.
>
> Martin
>
> > Thanks in advance for any pointers.
>
> > Dirk
>
> > --
> > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] How can one tell rlang not to mess up R session in ESS ?

2023-11-13 Thread Lionel Henry via ESS-help
> Do you use this instead of the nord theme, or on top of the nord
> theme?  Can you (briefly) describe what it does / what you like about
> this addition?

I use it on top. This snippet comes in between loading and activation:

```
(require 'nord-theme)
(load-theme 'nord)

*snippet*

(enable-theme 'nord)
```

I have a bunch of other stuff defined in there, like:

```
(custom-theme-set-faces
 'nord
 `(tab-bar ((t (:background ,nord1 :height 1.0
 `(tab-bar-tab ((t (:foreground ,nord6 :background ,nord9 :box
(:line-width (4 . 2) :style flat-button)
 `(tab-bar-tab-inactive ((t (:foreground ,nord9 :background ,nord3
:box (:line-width (4 . 2) :style flat-button))
```

This might not be the best way of doing this, but it's been some years
since I added this and it still works.

Let me know if you're still having trouble with cli theming in ESS
(and you want it to work instead of disabling it). It might be worth
discussing in an issue on Github in that case.

Best,
Lionel


On 11/13/23, Dirk Eddelbuettel  wrote:
>
> Thanks Lionel. I was pretty sure I could count on a non-empty intersection
> between ESS and rlang...
>
> On 13 November 2023 at 17:20, Lionel Henry wrote:
> | See the cli website for disabling colours:
> |
> https://cli.r-lib.org/reference/faq.html#how-do-i-turn-off-ansi-colors-and-styles-
>
> Drats. I though of crayon but not cli. I still get lost in your endlessly
> twisted maze of package. One day.
>
> | I use nord-theme too and I see I have this in my config, in case that
> helps
> | (I trimmed down this snippet manually, there might be a typo):
> |
> | ```lisp
> | (let ((class '((class color) (min-colors 89)))
> |   (nord0 (if (nord-display-truecolor-or-graphic-p) "#2E3440" nil))
> |   (nord1 (if (nord-display-truecolor-or-graphic-p) "#3B4252"
> "black"))
> |   (nord2 (if (nord-display-truecolor-or-graphic-p) "#434C5E"
> "#434C5E"))
> |   (nord3 (if (nord-display-truecolor-or-graphic-p) "#4C566A"
> "brightblack"))
> |   (nord4 (if (nord-display-truecolor-or-graphic-p) "#D8DEE9"
> "#D8DEE9"))
> |   (nord5 (if (nord-display-truecolor-or-graphic-p) "#E5E9F0"
> "white"))
> |   (nord6 (if (nord-display-truecolor-or-graphic-p) "#ECEFF4"
> "brightwhite"))
> |   (nord7 (if (nord-display-truecolor-or-graphic-p) "#8FBCBB" "cyan"))
> |   (nord8 (if (nord-display-truecolor-or-graphic-p) "#88C0D0"
> "brightcyan"))
> |   (nord9 (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue"))
> |   (nord10 (if (nord-display-truecolor-or-graphic-p) "#5E81AC"
> "brightblue"))
> |   (nord11 (if (nord-display-truecolor-or-graphic-p) "#BF616A" "red"))
> |   (nord12 (if (nord-display-truecolor-or-graphic-p) "#D08770"
> | "brightyellow"))
> |   (nord13 (if (nord-display-truecolor-or-graphic-p) "#EBCB8B"
> "yellow"))
> |   (nord14 (if (nord-display-truecolor-or-graphic-p) "#A3BE8C"
> "green"))
> |   (nord15 (if (nord-display-truecolor-or-graphic-p) "#B48EAD"
> "magenta")))
> |   (let ((ansi-colours (vector nord1 ; black
> |   nord11; red
> |   nord14; green
> |   nord13; yellow
> |   nord8 ; blue
> |   nord15; magenta
> |   nord7 ; cyan
> |   nord5 ; white
> |   )))
> | (setq xterm-color-names ansi-colours)
> | (custom-theme-set-variables
> |  'nord
> |  `(ansi-color-names-vector ,ansi-colours
> | ```
>
> Great, will play later.  Do you use this instead of the nord theme, or on
> top
> of the nord theme?  Can you (briefly) describe what it does / what you like
> about this addition?
>
> Thanks,  Dirk
>
> | Best,
> | Lionel
> |
> |
> | On 11/13/23, Dirk Eddelbuettel via ESS-help 
> wrote:
> | >
> | > Casual searching at the rlang repo doesn't reveal anything so pardon me
> for
> | > asking here but what is a simple way to tell rlang to NOT do fancy
> pants
> | > color error backtraces?  At least under the theme I use ("nord", for
> Emacs)
> | > it basically nixes readability by leaving a 'dark on dark' default.
> | >
> | > Thanks in advance for any pointers.
> | >
> | > Dirk
> | >
> | > --
> | > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> | >
> | > __
> | > ESS-help@r-project.org mailing list
> | > https://stat.ethz.ch/mailman/listinfo/ess-help
> | >
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] How can one tell rlang not to mess up R session in ESS ?

2023-11-13 Thread Lionel Henry via ESS-help
See the cli website for disabling colours:
https://cli.r-lib.org/reference/faq.html#how-do-i-turn-off-ansi-colors-and-styles-

I use nord-theme too and I see I have this in my config, in case that helps
(I trimmed down this snippet manually, there might be a typo):

```lisp
(let ((class '((class color) (min-colors 89)))
  (nord0 (if (nord-display-truecolor-or-graphic-p) "#2E3440" nil))
  (nord1 (if (nord-display-truecolor-or-graphic-p) "#3B4252" "black"))
  (nord2 (if (nord-display-truecolor-or-graphic-p) "#434C5E" "#434C5E"))
  (nord3 (if (nord-display-truecolor-or-graphic-p) "#4C566A" "brightblack"))
  (nord4 (if (nord-display-truecolor-or-graphic-p) "#D8DEE9" "#D8DEE9"))
  (nord5 (if (nord-display-truecolor-or-graphic-p) "#E5E9F0" "white"))
  (nord6 (if (nord-display-truecolor-or-graphic-p) "#ECEFF4" "brightwhite"))
  (nord7 (if (nord-display-truecolor-or-graphic-p) "#8FBCBB" "cyan"))
  (nord8 (if (nord-display-truecolor-or-graphic-p) "#88C0D0" "brightcyan"))
  (nord9 (if (nord-display-truecolor-or-graphic-p) "#81A1C1" "blue"))
  (nord10 (if (nord-display-truecolor-or-graphic-p) "#5E81AC" "brightblue"))
  (nord11 (if (nord-display-truecolor-or-graphic-p) "#BF616A" "red"))
  (nord12 (if (nord-display-truecolor-or-graphic-p) "#D08770"
"brightyellow"))
  (nord13 (if (nord-display-truecolor-or-graphic-p) "#EBCB8B" "yellow"))
  (nord14 (if (nord-display-truecolor-or-graphic-p) "#A3BE8C" "green"))
  (nord15 (if (nord-display-truecolor-or-graphic-p) "#B48EAD" "magenta")))
  (let ((ansi-colours (vector nord1 ; black
  nord11; red
  nord14; green
  nord13; yellow
  nord8 ; blue
  nord15; magenta
  nord7 ; cyan
  nord5 ; white
  )))
(setq xterm-color-names ansi-colours)
(custom-theme-set-variables
 'nord
 `(ansi-color-names-vector ,ansi-colours
```

Best,
Lionel


On 11/13/23, Dirk Eddelbuettel via ESS-help  wrote:
>
> Casual searching at the rlang repo doesn't reveal anything so pardon me for
> asking here but what is a simple way to tell rlang to NOT do fancy pants
> color error backtraces?  At least under the theme I use ("nord", for Emacs)
> it basically nixes readability by leaving a 'dark on dark' default.
>
> Thanks in advance for any pointers.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] Can't find documentation for function

2022-09-19 Thread Lionel Henry via ESS-help
Hi Haris,

That is because ESS intercepts `?` calls instead of evaluating them.
As a workaround you can call the devtools implementation of `?` manually:

```
pkgload:::shim_help(foo)
```

I'd like to do better as it would improve my day-to-day but this
hasn't been a priority.

Best,
Lionel

On 9/19/22, Haris Fawad via ESS-help  wrote:
> Hi Marc,
>
> Yes, I load the package via devtools::load_all() before typing ?foo. When I
> do the same in the R GUI-app I get the expected behaviour: the
> documentation gets rendered and shown as an html file in the browser.
>
> Best,
> Haris
>
> On Sun, Sep 18, 2022 at 7:29 PM Marc Schwartz  wrote:
>
>> Hi,
>>
>> Did you type:
>>
>>   library(mypac)
>>
>> first, before trying ?foo?
>>
>> The behavior suggests that the package is not currently loaded in the
>> search path, hence the error.
>>
>> When you use ?mypac::foo, that explicitly tells R that you want the help
>> for the function which is located in mypac and looks for the file there.
>> Without the package prefix, it only looks in the current search path, and
>> thus does not find the package there.
>>
>> Regards,
>>
>> Marc Schwartz
>>
>>
>> On September 18, 2022 at 4:54:05 AM, Haris Fawad via ESS-help (
>> ess-help@r-project.org (mailto:ess-help@r-project.org)) wrote:
>>
>> > Hi,
>> >
>> > I get the following error when I try to open the help file on a
>> > function
>> > 'mypac::foo'.
>> >
>> > "ess-r-help--build-help-command--unqualified: Can’t find documentation
>> for
>> > ‘foo’".
>> >
>> > I get the error when I type '?foo', but not when I type '?mypac::foo'.
>> > Indeed, the file 'man/foo.Rd' exists, after I run
>> > 'devtools::document()'.
>> >
>> > I don't get the error when I request documentation for a standard
>> > R-function, such as '?sum'.
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > __
>> > ESS-help@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
>
>   [[alternative HTML version deleted]]
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] Debian installation bug report with current package and Emacs 28.1

2022-09-13 Thread Lionel Henry via ESS-help
Martin, did you have other concerns besides the freeze that we have
determined is an interaction between polymode and large `.libPaths()`,
rather than a bug in ESS?

If not, I think we should think about a release.

Best,
Lionel

On 9/13/22, Dirk Eddelbuettel via ESS-help  wrote:
>
> A follow-up to this bug report: Due to the breakage caused by the (old) ess
> package, I (as maintainer of the Debian package) now received the note that
> the ess / elpa-ess packages will be archived away from Debian unstable as
> they make Emacs 28.1 uninstallable.
>
> So future Debian releases will not have ess / elpa-ess package.  Of course
> installation from other sources remains possible.
>
> We debated here for some time what to do about a new ESS release, but with
> nothing concrete to show, and this is now a consequence of (in)action.  We
> are all between a rock and a hard place: the upstream is 'not quite right'
> for a release so none happens, yet Debian users want Emacs 28.1.  So there.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] Advice on setting up ESS to edit and knit Rmarkdown files

2021-09-22 Thread Lionel Henry via ESS-help
We'd love to do a release but ESS is not in a good place right now.
Recent versions of Emacs interrupt background commands (essential to
completion and contextual help like eldoc) when the user starts
typing, which causes hard to solve problems.

The dev branch is mostly working but not 100% correctly. Unfortunately
none of us seem to have the time to work on ESS at the moment.

That said, while Martin, Vitalie and I notice issues here and there,
we haven't had serious bug reports in a while, despite the dev branch
being used by many Melpa users. So maybe releasing in the current
state is better than nothing.

Best,
Lionel


On 9/22/21, Dirk Eddelbuettel via ESS-help  wrote:
>
> On 20 September 2021 at 13:59, Sparapani, Rodney via ESS-help wrote:
> | Generally, this stuff should just work out-of-the-box.
>
> Understood.
>
> | And we are not a company like RStudio so this FOSS setup works for us as
> | developers and hopefully it still serves the users well.
>
> But legal structure has nothing to with 'calling a release'. Which is done
> by
> authors (who should know the code better than users) saying "yep what we
> have
> at HEAD right now is good" and then cut a tarball.  That is a _marker_.
> Which some less-informed people like me can take (and then ship downstream
> to
> Debian, and with that Ubuntu etc).
>
> Without a marker, no shipment. Less ideal to me and others.
>
> So pretty-please if someone would: could a release one of these moons. It
> does not have to be frequent or regularly schedule or anything.  But maybe
> more often than once every few years?  Maybe when you sync with upstream
> Emacs (assuming you do now)?
>
> Dirk
>
> --
> https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] spurious (list ....)

2021-02-17 Thread Lionel Henry via ESS-help
Hello,

This is a known issue with ESS 18.10 and Emacs 27. Either dowgrade
Emacs or install dev ESS to fix this. A new release is much needed but
there's still a bunch of problems to solve. We're aiming for an April
release.

As a workaround you can add this to your config:

```
(setq ess-can-eval-in-background nil)
```

You won't get the parasite output as you type. Unfortunately this
disables all contextual help (eldoc, completions, ...).

Best,
Lionel


On 2/18/21, Richard M. Heiberger via ESS-help  wrote:
> ess sends spurious commands to the *R* buffer, for example
>
>> (list "base" '(("..." . "") ("deparse.level" . "1")) '("..."
>> "deparse.level" "recursive" "make.row.names" "stringsAsFactors"
>> "factor.exclude" "use.names" "fill" "idcol" "size" "z" "combineLimits"
>> "useOuterStrips"))
>>
>
>> (list "" '(("..." . "")) '("recursive" "use.names" "..." "panel.widths"
>> "par.strip.text" "x" "x.same" "y.same" "layout" "merge.legends"))
>>
>
> These are unrelated to anything I am typing in the myfile.r buffer.
>
> I am using Vincent Goulet's Emacs 27.1 with ESS 18.10.2 on Mac Big Sur
> 11.2.1 on a MacBook Air
> with the M1 chip.
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] ess-watch over tramp

2021-01-19 Thread Lionel Henry via ESS-help
This is https://github.com/emacs-ess/ESS/issues/1047

Best,
Lionel

On 1/19/21, Jeremie Juste via ESS-help  wrote:
> Hello,
>
> I would like to use ess-watch from a remote session but I receive the
> follow error. When I execute M-x ess-watch
>
> Error in as.environment("ESSR") :
> no item called "ESSR" on the search list
>
> The problem seems to lie with, as.environment("ESSR") that cannot be
> found on the remote
>
> on my local R session as.environment("ESSR") works
> as.environment("ESSR")
> 
>
>
> Do you have any clue?
>
> Best regards,
> --
> Jeremie Juste
>
> - ess-version: 18.10.3snapshot [elpa: 20200825.829]
> - emacs: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> - 3.24.5, cairo version 1.16.0) of 2020-09-01
> - R version 4.0.3 (2020-10-10)
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] -> and spaces

2020-11-26 Thread Lionel Henry via ESS-help
Hello,

I think this is https://github.com/emacs-ess/ESS/issues/948

Best,
Lionel

On 11/26/20, Kasper Daniel Hansen via ESS-help  wrote:
> Thanks for the work on ESS over the ages. I am happy to see that there is
> development happening still.
>
> I have the following code in my .emacs which I use to have the behaviour of
> changing a _ keypress into printing <-:
>
>   (define-key ess-r-mode-map "_" #'ess-insert-assign)
>   (define-key inferior-ess-r-mode-map "_" #'ess-insert-assign)
>
> Now, is this the right way to do it? The thing I see is when I already have
> a space, it adds an extra space, whereas it used to clean it up. Let me
> illustrate (S indicates space)
>   S_
> gets converted into
>   SS<-S
> It used to work like this (a long time ago, before I needed to edit my
> .emacs). Reading the manual, does this have to do with smart-underscore
> being removed?
>
> Best,
> Kasper
>
>   [[alternative HTML version deleted]]
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] R 4.0

2020-04-18 Thread Lionel Henry via ESS-help
macOS filesystems are indeed case insensitive by default (you can
format with sensitivity enabled if you like), but this is not
necessarily a concern here.

On macOS, R is typically installed as a "framework". In that case we
use RSwitch.app to change the version that the `R` symlink points
to. Maybe other users have a different experience, but I've never used
the special `R-` runners that ESS creates.

Best,
Lionel

On 4/18/20, Dirk Eddelbuettel via ESS-help  wrote:
>
> On 18 April 2020 at 13:57, Martin Maechler via ESS-help wrote:
> | But on that most-used (non-)operating system,  lowercase and
> | uppercase are mostly equivalent in file names *and* executables
> | are file names, no?
>
> No:
>
>   edd@rob:~$ r --version | head -1
>   r ('littler') version 0.3.9
>   edd@rob:~$ R --version | head -1
>   R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
>   edd@rob:~$
>
> Also, remember that R CMD calls for 25 years into i.e. INSTALL to avoid
> /usr/bin/install from GNU?  Same reason.
>
> The only "famous" and very braindead exception is macOS where I recommend
> littler users build it as 'lr' because there (and only there) r == R.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] Printing tibbles in iESS

2018-12-04 Thread Lionel Henry via ESS-help
This is a known bug: https://github.com/emacs-ess/ESS/issues/759 


Best,
Lionel

> On 4 Dec 2018, at 17:14, Kevin Wright via ESS-help  
> wrote:
> 
> I have a tibble that is printing like this in the iESS buffer:
> 
> # A tibble: 74 x 15
>  expt trt `Loc Name` `Explained` `Common`
>  
>
>   
>
>   
> 1 nate0 rs_ltht AP2 2018 193.7 7.72
> 2 nate0 rs_ltht AA2 2018 196.5 8.96
> 3 nate0 rs_ltht AY2 2018 194.510.4
> 
> It appears that after each data type (e.g. ) is a space and then a
> newline character (^J).
> 
> I've dug into the tibble package, then pillar, then fansi, but I'm still
> stuck. Can anybody explain what is happening?
> 
> -- 
> Kevin Wright
> 
>   [[alternative HTML version deleted]]
> 
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help


[[alternative HTML version deleted]]

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] looking for definitions of R functions

2018-06-22 Thread Lionel Henry via ESS-help
The development version is integrated with xref based on function srcrefs.
It should work with sourced scripts and local packages installed with srcrefs.
We'll try to make it work with non-local packages as well.

Lionel

> On 22 juin 2018, at 11:15, Stephen Eglen via ESS-help 
>  wrote:
> 
> Hello,
> 
> what are people using (if anything) to find declarations of R functions
> within Emacs buffers?  e.g. when point is on the name of a function, you
> hit a keybinding to look up the definiton of that function.
> 
> I just had some success with using dumb-jump.el
> https://github.com/jacktasia/dumb-jump  -- it has a notion of a project
> folder within which it will search for R function definitions
> dynamically using a grep variant.  (It doesn't always work -- e.g. I
> can't yet get it to fund hidden functions that begin with a period,
> since I think it does not recognise the . as beginning of a word.)
> 
> But I'm just wondering if others had success with other packages?  We
> mention TAGS files in our ESS documentation, and rtags.
> 
> Stephen
> 
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help