Re: [ESS] key bindings for ess-rutils-map

2020-10-04 Thread Alex Branham via ESS-help
On Sat 03 Oct 2020 at 19:52, Amit Ramon via ESS-help  
wrote:

> Hi all,
>
> Section 11.11 of the ESS manual (online manual for version 18.10.3,
> also in latest Info file) describes several key bindings for ESS
> functions that are not defined in actuality for an R session.
>
> The keybindings that should be defined, according to the manual, but
> are actually missing are:
>
> C-c C. m : ess-rutils-rm-all
> C-c C. w : ess-rutils-load-wkspc
> C-c C. s : ess-rutils-save-wkspc
>
> The file ess-r-mode.el it shows that the other keybindings described
> in section 11.11 are indeed added to the ess-rutils-map, but not the 3
> keybinding mentioned above.
>
> Am I missing something, or is the manual wrong about these?
>
> Thanks,
>
> Amit

Hi -

Thanks for the report! It seems like these were inadvertently overlooked
when I was changing that part of the file for a different reason. I've
added them back in 5bfbccd617e74d716096e44cd5fa10d111f50678.

Thanks again!

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


Re: [ESS] R transcript file name suffix

2020-06-01 Thread Alex Branham via ESS-help
On Mon 01 Jun 2020 at 14:23, William McCoy via ESS-help 
 wrote:

> (setq auto-mode-alist (append '(("\\.[Rr]t\\'" . R-transcript-mode))
>   auto-mode-alist))
>
> That line no longer has any effect on ESS and my .Rt suffix no longer
> works; ESS expects .Rout as the suffix.
>
> How can I customize my ESS version 18.10.3snapshot to use .Rt as my
> transcript file name suffix?

R-transcript-mode was renamed to ess-r-transcript-mode. You'd want to
use:

(add-to-list 'auto-mode-alist '("\\.[Rr]t" . ess-r-transcript-mode))

Perhaps we should provide the old name as an obsolete alias...

Thanks,
Alex

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


Re: [ESS] ess-eval-region Does Not Echo Highlighted Code Into the R Buffer?

2020-05-19 Thread Alex Branham via ESS-help
The default value of ess-eval-visibly recently changed. You probably want
to customize it to t or nowait.

Alex

On Tue, May 19, 2020, 5:08 PM Marc Schwartz via ESS-help <
ess-help@r-project.org> wrote:

> Hi,
>
> A clarification, that when I do run the command, on a *single* line in the
> R buffer, I am getting '>' characters for each line of R code in the region
> passed, and I get '+' characters if there is a multiline region of code
> passed.
>
> Thus, I might see the following single lines of output in the R buffer, as
> examples:
>
> 
>
> or
>
> +>>
>
> after the command is run on a region of R code.
>
> Regards,
>
> Marc
>
>
> > On May 19, 2020, at 4:51 PM, Marc Schwartz  wrote:
> >
> > Hi All,
> >
> > I just updated my ESS/Polymode installation today via melpa, and unless
> I am missing something, I noticed that the use of ess-eval-region via "C-c
> C-r" does not seem to echo the highlighted R code region into the R buffer,
> which it had been doing until now.
> >
> > The code does execute, confirmed when I check for the resultant object.
> >
> > Am I missing new behavior, or perhaps a setting that changed someplace,
> or that I introduced a conflict with the updates today?
> >
> > Thanks,
> >
> > Marc Schwartz
> >
>
> __
> 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] R 4.0

2020-04-16 Thread Alex Branham via ESS-help
On Thu 16 Apr 2020 at 16:20, Kasper Daniel Hansen via ESS-help 
 wrote:

> I have just updated ESS using list-packages. R-4.0 is not found due to the
> value of ess-r-runners-prefixes. This can of course be customized, but I
> think it should be changed to include "R-4"

Thanks. I wonder if we should just look for any R-* values. Can anyone
think of instances of an executable named R-* on exec-path that *isn't*
a version of R?

Alex

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


Re: [ESS] ESS process on Docker containers and enabing Flymake

2020-02-21 Thread Alex Branham via ESS-help
We do just use the package if it's installed. No demanding anywhere.

Alex


On Thu, Feb 20, 2020, 9:36 PM Dirk Eddelbuettel  wrote:

>
> On 20 February 2020 at 17:51, Alex Branham via ESS-help wrote:
> | On Wed 19 Feb 2020 at 18:20, Shreyas Ragavan 
> wrote:
> |
> | >> You need to install the lintr package.
> | >
> | > So ESS actually needs the R package lintr installed to enable linting.
> | > It seems strange to me that I have to open R and install a package to
> | > get an 'IDE' functionality. Perhaps I am mistaken in my thinking.
> |
> | This is pretty standard behavior, I think. You'll find the same thing
> | with Rstudio, IIRC.
>
> There are many shades of grey possible between pitch black and white.
>
> One could just use the package if found installed. Demanding it to be
> present
> is quite a bit more strict, and I don't think I'd that.  But hey, your
> project, not mine.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

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


Re: [ESS] Prevent new buffer for help from point

2020-02-10 Thread Alex Branham via ESS-help
I think the auto-complete package is no longer developed. I think most
people who use that functionality switched to company, FWIW.

Alex

On Mon, Feb 10, 2020, 4:57 PM Dirk Eddelbuettel via ESS-help <
ess-help@r-project.org> wrote:

>
> On 10 February 2020 at 15:47, Dirk Eddelbuettel wrote:
> |
> | Hi Julian and Pavel,
> |
> | On 10 February 2020 at 10:55, Julian M. Burgos wrote:
> | | I am having the same issue.  Could you figure out what was causing
> this behaviour?  It is driving me crazy.
> |
> | Ah, good news in the sense that it is not just me, and yes, it is
> annoying as hell.
> |
> | I have not had time to decompose my ~/.emacs (and the other files it
> sources)
> | so no news from here -- sorry.
> |
> | On 10 February 2020 at 19:37, Panko, Pavel wrote:
> | | I had the same problem some months back; I switched from auto-complete
> to company-mode, and the problem stopped. Would be interested in a more
> full-fledged solution to this though.
> |
> | Hm. Very interesting.  I seem to have Auto-Complete (per C-h m) as well
> as
> | Company.  I will give that shot and report back.
>
> Commenting out these lines
>
>   ;; auto-complete -- uses Ubuntu package 'auto-complete-el'
>   ;; edd 2020-02-10 possible interaction with ESS
>   ;(require 'auto-complete-config)
>   ;(ac-config-default)
>
> and launching a fresh Emacs, I do *not* see the bad behavior. This is a
> very
> promising lead--thanks again Pavel!
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> 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] Prevent new buffer for help from point

2020-02-07 Thread Alex Branham via ESS-help
Can you reproduce this without your .emacs file?

Does that buffer's name match any entry in display-buffer-alist or all the
similar variables?

On Fri, Feb 7, 2020, 3:39 AM Dirk Eddelbuettel via ESS-help <
ess-help@r-project.org> wrote:

>
> On 6 February 2020 at 10:19, James W. MacDonald wrote:
> | It's not clear from your question exactly what the behaviour is, but it
> | sounds like auto complete?
>
> No, I like autocomplete.
>
> As I wrote in what is still below, I have irony-mode and other helpers.
> But what is annoying as hell is that ESS decided to
>   - move focus away from where I am (writing R code)
>   - move to a completely new buffer (showing help I did not ask for)
>   - require me to kill the new buffer to get back to where I was
> which happens *each and every time* I type a token it knows and could
> complete to a help page it then takes me to.
>
> Anyone have an idea what I need to turn on to suppress this?
>
> Dirk
>
> | On Thu, Feb 6, 2020 at 2:15 AM Dirk Eddelbuettel via ESS-help <
> | ess-help@r-project.org> wrote:
> |
> | >
> | > When I have e.g. a local variable arr (for array) and start typing
> | >
> | >   print(arr
> | >
> | > in an ESS buffer, I first (briefly) get a helpful and uninstrusive
> dropdown
> | > starting with arrows, array and more.
> | >
> | > But annoyingly, a split second later it flips to a new help buffer
> | > (entitled
> | > *ess-command-output*) which the help text for arrows. I absolutely do
> not
> | > want that.  I have been unable to turn it off though.
> | >
> | > I am running the last release, and I have a somewhat muddled .emacs
> also
> | > enabled irony and a few more modes helpful for programming in different
> | > languages, but this behaviour seems to be ESS specific. How do I stop
> it?
> | >
> | > Sorry to be asking such a noob question after what must now be a
> quarter
> | > century of Emacs, R and ESS...
> | >
> | > Dirk
> | >
> | > --
> | > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> | >
> | > __
> | > ESS-help@r-project.org mailing list
> | > https://stat.ethz.ch/mailman/listinfo/ess-help
> | >
> |
> |
> | --
> | James W. MacDonald, M.S.
> | Biostatistician
> | University of Washington
> | Environmental and Occupational Health Sciences
> | 4225 Roosevelt Way NE, # 100
> | Seattle WA 98105-6099
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> 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] ESS and EXWM

2019-11-22 Thread Alex Branham via ESS-help


On Thu 21 Nov 2019 at 22:38, Stephen Eglen  wrote:

> there's a lot to go through here:
> https://gitlab.com/jabranham/emacs/blob/master/init.el#L2537 and so it
> looks like I have some fun coding to look forward to!

Let me know if something's not clear and I'll try to help out. The
documentation of the display-buffer is a little hard to understand. It
did get a rewrite recently-ish that makes it a little clearer. I'm not
sure if that made it into 26.3 or if you need to get Emacs from git.

Alex

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


Re: [ESS] running R remotely via tramp

2019-05-06 Thread Alex Branham via ESS-help
Hi Chris -

I just pushed a fix for this, so your original script should work as
soon as MELPA updates ESS (usually within 4-8 hours).

Let me know if you continue to experience issues after that update.
Thanks for reporting this bug.

Alex

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


Re: [ESS] running R remotely via tramp

2019-05-05 Thread Alex Branham via ESS-help


On Sat 04 May 2019 at 12:48, Chris Wallace  wrote:

>> Instead of uncommenting those lines, passing t to executable-find’s
>> second argument should work. Can you check if this solves your issue?
>>
>> (unless  (executable-find inferior-ess-r-program t)
>>(display-warning 'ess (format"%s could not be found on the
>> system. Try running `R-newest' instead, which searches your system
>> for R."  inferior-ess-r-program):error)
>>(user-error  "%s program not found"  inferior-ess-r-program))
>
> Then I get "Wrong number of arguments: (1 . 1), 2"
>
> My emacs-version is 26.1 - should I try installing a newer version?

Ah, apparently that's a new feature of executable-find. We'll have to
rely on an older trick and just check if ess-directory is remote:

(unless  (or (file-remote-p ess-directory)
 (executable-find inferior-ess-r-program))
  (display-warning 'ess (format "%s could not be found on the system. Try 
running `R-newest' instead, which searches your system for R."  
inferior-ess-r-program) :error)
  (user-error  "%s program not found"  inferior-ess-r-program))

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


Re: [ESS] running R remotely via tramp

2019-05-04 Thread Alex Branham via ESS-help


On Sat 04 May 2019 at 05:16, Chris Wallace  wrote:

> I misread an offline suggestion by Stephen Eglen, and created a copy
> of run-ess-r in my .emacs with these lines commented:
>
>  ;; (unless (executable-find inferior-ess-r-program)
>   ;;   (display-warning 'ess (format "%s could not be found on the
> system. Try running `R-newest' instead, which searches your system for
> R." inferior-ess-r-program) :error)
>   ;;   (user-error "%s program not found" inferior-ess-r-program))
>
> For me, this fixes it :)

Instead of uncommenting those lines, passing t to executable-find's
second argument should work. Can you check if this solves your issue?

#+begin_src elisp
  (unless (executable-find inferior-ess-r-program t)
(display-warning 'ess (format "%s could not be found on the system. Try 
running `R-newest' instead, which searches your system for R." 
inferior-ess-r-program) :error)
(user-error "%s program not found" inferior-ess-r-program))
#+end_src

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


Re: [ESS] running R remotely via tramp

2019-05-03 Thread Alex Branham via ESS-help
Hi Chris - 

I'm on my phone now so I haven't tried this, but I think changing ess-directory 
to default-directory should solve this issue. 

Alex

On May 3, 2019 9:46:58 AM CDT, Chris Wallace via ESS-help 
 wrote:
>Dear ESS-help,
>
>I have just upgraded my ess via melpa, and my ability to run R remotely
>
>has stopped.
>
>I had been doing so via the function (after earlier help from this list
>
>https://stat.ethz.ch/pipermail/ess-help/2016-January/010863.html)
>
>   (defun Rcpu ()
>     "Run R on CSD3"
>     (interactive)
>     (let ((inferior-ess-r-program "/home/me/bin/R.csd3")
>       (ess-directory "/ssh:me@cpu:~/"))
>   (R)))
>
>R.csd3 is actually a bash script, that loads some modules required to 
>run R on the remote host before starting a recent version of R.  It 
>worked this morning, then I did an update of packages, restarted emacs,
>
>and it broke.
>
>
>Now when I M-x Rcpu I get the error
>
>Error (ess): /home/me/bin/R.csd3 could not be found on the system. Try 
>running `R-newest' instead, which searches your system for R.
>
>M-x R-newest starts /usr/bin/R on the remote system which is woefully 
>out of date and won't let me install many current packages.
>
>I have looked into R-newest and I wonder whether the change is this one
>
>https://github.com/emacs-ess/ESS/commit/7d49e421ca015c4e43688f4479860d1af8379c8d#diff-30e55f182c26885d03642d3872bfe26d
>
>- does
>
>(executable-find inferior-ess-r-program)
>
>know to look on the remote server?
>
>Thanks for any advice,
>
>Chris

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


Re: [ESS] How to type an underscore "_" in emacs with ESS in a SAS program

2019-04-11 Thread Alex Branham via ESS-help


On Thu 11 Apr 2019 at 12:58, Karen Taves via ESS-help  
wrote:

> I am new to using ESS and am using ESS 18.10.2 and trying to type an
> underscore "_" in emacs in a SAS program and am getting the following
> error message: Symbol's function definition is void:
> ess-smart-S-assign

Hi Karen - 

This appears to be a small bug in ESS. If you execute (require 'ess-site), it 
should fix the problem.

Thanks,
Alex

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


Re: [ESS] Assignment operator "<-" not bound to "_" anymore (or any other default it seems).

2019-03-26 Thread Alex Branham via ESS-help


On Tue 26 Mar 2019 at 11:39, Marius Hofert via ESS-help 
 wrote:

> In 18.10.3snapshot (GNU Emacs 26.1, macOS 10.14.4) "_" is not the
> assignment operator "<-" anymore (it still was in 18.10.2). This step,
> especially the fact that there is no new default to obtain "<-" (or is
> there?) might scare away users...

That's correct. It was removed because so many new users found it
surprising and confusing.

> Is there a new recommended way to get "<-"? I now use...
>
> (define-key ess-r-mode-map (kbd "M--") #'ess-insert-assign)
> (define-key inferior-ess-r-mode-map (kbd "M--") #'ess-insert-assign)

That should work well.

> Not having a default for "<-" seems weird to me and not everyone likes
> to make adjustments to .emacs just to get basic functionality (... and
> thus probably switches to RStudio...).

The default is C-c C-=. Pressing it multiple times will cycle through
the various assignment operators (e.g. <- = -> etc).

Hope that helps,
Alex

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


Re: [ESS] ESS+Polymode Questions

2019-03-07 Thread Alex Branham via ESS-help


On Thu 07 Mar 2019 at 11:17, Marc Schwartz  wrote:

>> (add-to-list 'display-buffer '("*R" (display-buffer-reuse-window 
>> display-buffer-at-bottom)
^ should be 'display-buffer-alist
>>  (window-width . 0.5) (reusable-frames . nil)))
>
> Symbol's value as variable is void: display-buffer

Sorry, see edit above.

> Is there any indication as to a time frame for a new release of lintr to CRAN?

There's an open issue about this on the lintr github. There's some
performance regression that Jim wants to fix before releasing the new
version. Volunteers are welcome, I'm sure.

Alex

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


Re: [ESS] ESS+Polymode Questions

2019-03-07 Thread Alex Branham via ESS-help


On Wed 06 Mar 2019 at 18:53, Marc Schwartz via ESS-help 
 wrote:

> Three questions:
>
> 1. While the syntax highlighting seems to be generally preserved in terms of 
> fonts and colors from ESS and auctex, the following text:
>
>  <>=
>
>  @
>
> that defines the boundary of an R chunk is bolded in black instead of red. I 
> Googled for polymode colors but did not see anything obvious, so was 
> wondering if someone can point me to the fontlock settings for the above to 
> change it from black to red. Red stands out better for my aging eyes...

Usually M-x describe-face defaults to the face under point, perhaps
that's what you need?

> 2. When starting an R session (M-x R), the new R buffer opens in a new frame 
> to the right of the current frame, rather than in the current frame, as was 
> the case with ESS. Is there a way to change this behavior so that it opens in 
> the current frame? I generally work with my R/Rnw files in the top frame and 
> the R session in the lower frame, so this is a quirk that I would like to 
> change, if possible.

This is probably a result of ESS respecting `display-buffer'. If you
want R to start in a window below your current buffer, use something
like this:

(add-to-list 'display-buffer '("*R" (display-buffer-reuse-window 
display-buffer-at-bottom)
  (window-width . 0.5) (reusable-frames . nil)))

Let me know if that doesn't do what you want.

> 3. After opening a Rnw file and starting an R session, I get the following 
> message in the flymake log buffer:
>
> Warning [flymake FileName.Rnw[R]]: Disabling backend 
> flymake-proc-legacy-flymake because (error Can’t find a suitable init 
> function)
> Error [ess-r-flymake  *ess-r-flymake*]: Need ‘lintr‘ version > v1.0.3
>
> I do have lintr version 1.0.3 installed from CRAN and, based upon a Google 
> search, I have the following in my .emacs:
>
> (remove-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
>
> prior to both ESS and polymode being loaded.
>
> Is this a temporary situation pending a yet to be released version of lintr, 
> or is there something else going on here?

Yes, we rely on lintr features not yet released on CRAN. You can get the
development version with devtools::install_github("jimhester/lintr").

Thanks,
Alex

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


Re: [ESS] font color in Sweave file and slowness in inferior mode issues

2019-03-04 Thread Alex Branham via ESS-help


On Mon 04 Mar 2019 at 09:35, Samuele Carcagno via ESS-help 
 wrote:

> hello
>
> I'm currently experiencing a couple of issues with ESS:
>
> - when editing code chunks in Sweave (".Rnw") documents sometimes the
> font color of some lines of code suddenly changes. I have the feeling
> that this may be due to using the pipe operator "%>%" because the font
> becomes of the same color as the font color of the pipe operator. Also I
> can't pinpoint exactly when the issue started but probably it was around
> the same time that I started using dplyr
>
> - the second issue is that things like variable name completion via TAB,
> and also navigating lines with the cursor sometimes get very slow in the
> inferior mode after a while. Maybe this is due to the fact that I'm
> processing long Sweave files (e.g. one file with which I've had issues
> recently has ~3000 lines of code, and I have ~500 variables in the
> workspace in total), but if I process the file through R opened up in a
> linux terminal things are not so slow
>
> - I've seen a third issue, but this is really minor: in the latex chunks
> syntax highlighting sometimes becomes active only after I've moved the
> cursor close to the latex chunk
>
> I apologize for the vague report on the issues, but I've found it hard
> to pinpoint exactly when and how they occur. I understand that it's
> difficult to diagnose the issues with only the information I provided,
> but I was hoping to get some pointers to possible causes and ideas to
> try to narrow down the possible causes (e.g. temporarily switching off
> some ESS functionalities to see if the speed issues improve). I've tried
> to search for related issues through google search and in the ESS list
> of open issues on github but I haven't been able to find anything that
> could solve my issues (although this may be partly due to my lack of
> knowledge of ESS and emacs internals).
>
> I'm using ESS version 18.10.2 on Ubuntu Bionic.
>
> My ESS customizations in my .emacs file are the following:
>
> ;;
> ;; Get rid of ESS smart underscore :)
> (ess-toggle-underscore nil)
>   (defun my-ess-settings ()
>  (setq ess-indent-with-fancy-comments nil))
>(add-hook 'ess-mode-hook #'my-ess-settings)
> (require 'ess-jags-d)
> ;;

Hi Sam -

There are a lot of very hard-to-fix design bugs in ESS's implementation
of noweb/sweave. We're encouraging users to switch to polymode.[1] Can
you try that out and see if it fixes your issues?

Thanks,
Alex

Footnotes:
[1]  https://polymode.github.io/installation/

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


Re: [ESS] disable console help when "pausing"

2019-02-28 Thread Alex Branham via ESS-help


On Wed 27 Feb 2019 at 18:08, Shreyas Ragavan via ESS-help 
 wrote:

> I'm facing the same problem of late, and I do not know what instigated the 
> behavior. Using the company mode setting below has not solved my help dump, 
> which is in fact highly annoying.  This is my setup (on Antergos / Mac OS)  :

Try updating ESS. There was a short-lived bug recently[1] where we could
reproduce this behavior. If you still experience this with ESS, please
let me know.

Alex

Footnotes:
[1]  https://github.com/emacs-ess/ESS/issues/842

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


Re: [ESS] Roxygen Update is "off by one" in function

2019-02-09 Thread Alex Branham via ESS-help


On Tue 05 Feb 2019 at 10:42, Alex Branham  wrote:

> On Tue 05 Feb 2019 at 10:13, Paul Johnson via ESS-help 
>  wrote:
>
>> Can you reproduce?
>
> Opened PR 833[1] which includes the patch I sent + tests.

Hi Paul -

I just merged that, so it should be fixed. MELPA usually updates in 4-8
hours.

Let me know if you run into any other issues.

Thanks,
Alex

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


Re: [ESS] Emacs hangs when starting R via -x R

2019-02-08 Thread Alex Branham via ESS-help


On Thu 07 Feb 2019 at 18:04, Kjetil brinchmann Halvorsen via ESS-help 
 wrote:

> And, yes, I did change my prompts. Here is the content of my .Rprofile file:
>
> options(continue="  ")
> options(prompt="  ")

Customizing the prompts isn't supported at the moment in ESS. There's
some talk about supporting this, but it's still a ways off.

Thanks,
Alex

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


Re: [ESS] Roxygen Update is "off by one" in function

2019-02-05 Thread Alex Branham via ESS-help


On Tue 05 Feb 2019 at 10:13, Paul Johnson via ESS-help  
wrote:

> Can you reproduce?

Opened PR 833[1] which includes the patch I sent + tests.

Alex

Footnotes:
[1]  https://github.com/emacs-ess/ESS/pull/833

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


Re: [ESS] Roxygen Update is "off by one" in function

2019-02-05 Thread Alex Branham via ESS-help


On Tue 05 Feb 2019 at 10:13, Paul Johnson via ESS-help  
wrote:

> Those newly inserted arguments come from the one before.
>
> Between functions in the R file, I have NULL because that was recommended
> for Roxygen authors in the old days.  Nothing else special.
>
> Can you reproduce?

Yes, I can. Thanks for the report.

Looks like we call 'beginning-of-defun' once too many times. Since we're
already at the beginning of the function, we skip back to the previous
one. This diff solves the issue, 'ess-roxy-get-function-args' doesn't
seem to get called from anywhere other than that one function so I think
this is safe to install. WDYT, Vitalie?

Alex

diff --git a/lisp/ess-roxy.el b/lisp/ess-roxy.el
index 007395b3..c8326ae6 100644
--- a/lisp/ess-roxy.el
+++ b/lisp/ess-roxy.el
@@ -783,11 +783,11 @@ See `hs-show-block' and `ess-roxy-hide-block'."
   (goto-char (ess-roxy-beg-of-entry)))

 (defun ess-roxy-get-function-args ()
-  "Return the arguments specified for the current function as a list of 
strings."
+  "Return the arguments specified for the current function as a list of 
strings.
+Assumes point is at the beginning of the function.."
   (save-excursion
 (let ((args-txt
(progn
- (beginning-of-defun)
  (buffer-substring-no-properties
   (progn
 (search-forward-regexp "\\([=,-]+ *function 
*\\|^\s*function\\)" nil nil 1)

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


Re: [ESS] Run roxygen examples: how now?

2019-02-04 Thread Alex Branham via ESS-help


> In my init file I have S-RET as the replacement for C-RET, but I've tested
> this both ways and get same behavior.  After removing the init file, when I
> do C-RET, then the one line I'm on will run, but the focus jumps over the
> rest of the example code lines and stops at the first line of code that is
> not commented.  This happens whether an R file is edited in a package in
> developer mode or if the file is in a separate directory.

Can you try with the latest ESS version (i.e. get it from MELPA rather
than use 18.10)?[1]

If that still doesn't work, you might have to do a bit of
troubleshooting to find the issue since it's working for me. Here's a
list of things to look at:

- make sure ess-roxy-mode is on
- make sure ess-roxy-remove-roxy-re is in ess-presend-filter-functions
- make sure ess-roxy-re looks like it matches roxy comments

> If nobody else sees this, then I guess it has to be something peculiar
> about Ubuntu's Emacs 25.2.2 ??

I guess that's possible, but it seems pretty unlikely.

Footnotes:
[1]  https://melpa.org/#/getting-started

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


Re: [ESS] Hang when opening remote session

2018-08-28 Thread Alex Branham via ESS-help


On Mon 27 Aug 2018 at 19:55, Marcora, Edoardo via ESS-help 
 wrote:

> Looking at the TRAMP debug buffer, this is where things hang...
>
> 11:53:28.096969 tramp-send-string (10) # cd 
> /hpc/users/XXX/projects/ad.myeloid/2018-08-22.hgnc_reannot/ &&  exec  env 
> PS1\=/ssh\:XXX\@bode.hpc.mssm.edu\:/hpc/users/XXX/projects/ad.myeloid/2018-08-22.hgnc_reannot/\
>  \#\$\  TERMCAP\= COLUMNS\=117 INSIDE_EMACS\=26.1\,comint STATATERM\=emacs 
> PAGER\=cat /usr/local/bin/R --no-readline
>
> It calls "/usr/local/bin/R" whereas my R resides in 
> /hpc/packages/minerva-common/R/3.5.1/lib64/R/bin/R
>
> Ideally it should just call "R" so that it goes through PATH or aliases 
> properly.

Thanks. We just reverted that change, so ESS will just call "R".

If you're getting ESS from MELPA, it can take a few hours to update there.

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


Re: [ESS] Problem starting specific R version

2018-07-15 Thread Alex Branham via ESS-help
Hi Henric,

We've made an adjustment to how this works on Windows. Is it working now
for you?

Thanks,
Alex


On Mon, Jul 2, 2018, 9:53 AM Henric Winell  wrote:

> Hi Alex,
>
> On 2018-07-01 17:27, Alex Branham wrote:
>
> > Hi Henric -
> >
> > Thanks. I forgot how Windows handles different R versions.
> >
> > I've pushed a commit to my personal branch that I think fixes this. I
> > did it on a separate branch that contains some other work though so the
> > line numbers won't match up with what you have.
> >
> >
> https://github.com/jabranham/ESS/commit/30e544aa0f4deaf46d210945a15f9c6209dfbb15
> >
> > If you can test it, that would be much appreciated. Let me know if you
> > can't though and I'll figure out some other way.
>
> Unfortunately, using the versions of ess-mode.el and ess-r-mode.el
> referenced above doesn't work for me.  I get the following warning when
> starting Emacs:
>
> Warning (initialization): An error occurred while loading
> ‘c:/Users/henwin/.emacs’:
>
> Wrong type argument: stringp, (lambda ( --cl-rest--) Start this
> process version in an inferior ESS buffer.
> Function defined using `ess-define-runner'. (interactive P) (apply
> (quote (lambda (G0 G1 G2  start-args) (cond ((string=
> (symbol-value G1) R) (let ((inferior-ess-r-program (or (symbol-value G0)
> (symbol-value G2 (R start-args))) ((string= (symbol-value G1) S)
> (let ((inferior-S+-program (or (symbol-value G0) (symbol-value G2
> (require (quote ess-sp6-d)) (S+))) ((string= (symbol-value G1) SAS) (let
> ((inferior-SAS-program (or (symbol-value G0) (symbol-value G2
> (require (quote ess-sas-d)) (SAS)) (quote --path--) (quote
> --dialect--) (quote --name--) --cl-rest--))
>
>
> When byte-compiling ess-r-mode.el I get the following:
>
> Compiling file c:/Users/henwin/Desktop/ess-r-mode.el at Mon Jul  2
> 16:46:48 2018
>
> In ess-r-define-runners:
> ess-r-mode.el:668:41:Warning: ess-define-runner called with 3 arguments,
> but
>  accepts only 2
> ess-r-mode.el:668:78:Warning: function ‘mapcar*’ from cl package called at
>  runtime
>
>
>
> Best,
> Henric
>
>
>
> >
> > Thanks!
> > Alex
> >
> > On Sun 01 Jul 2018 at 09:40, Henric Winell 
> wrote:
> >
> >> Hi Alex,
> >>
> >> On 2018-07-01 15:51, Alex Branham wrote:
> >>
> >>> Thanks. I think the solution is to change "car" to "cdr" in
> >>> ess-r-define-runners in ess-r-mode.el. It's hard for me to test this,
> >>> though, since I don't have a windows machine.
> >>
> >> IIUC, you'd like to change 'car' to 'cdr' on L733:
> >>
> >> https://github.com/emacs-ess/ESS/blob/master/lisp/ess-r-mode.el#L733
> >>
> >> ?
> >>
> >> I just tried this change, but then 'M-x R-[TAB]' results in
> >>
> >> Click on a completion to select it.
> >> In this buffer, type RET to select the completion near point.
> >>
> >> Possible completions are:
> >> R-fix-T-FR-initialize-on-start
> >> R-mode   R-newest
> >> R-transcript-mode
> >>
> >>
> >> Best,
> >> Henric
> >>
> >>
> >>
> >>>
> >>> Are you familiar at all with elisp? If so, can you try changing it to
> >>> see if that solves your problem? (you'll have to restart Emacs after
> changing it)
> >>>
> >>> If not, I'll find another way to test, just let me know.
> >>>
> >>> Thanks,
> >>> Alex
> >>>
> >
>
>

[[alternative HTML version deleted]]

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


Re: [ESS] ESS error on update

2018-07-05 Thread Alex Branham via ESS-help


>  Package updates from elpa: I run underwindows (8-10) and frequently
>  when I get a package update to ESS the package cannot start R. The
>  message that some part of the ESS/R complex cannot be found.

Can you please include the full error message?

> The insalled ESS package has no lisp sundirectory. when I revert to
> 11.17 with lisp folder this runs well.

Yes, the lisp subdirectory was "promoted" recently, so all the lisp
files should be under elpa/ess-*/ directly when you install from MELPA.

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


Re: [ESS] Problem starting specific R version

2018-07-01 Thread Alex Branham via ESS-help
Hi Henric -

Thanks. I forgot how Windows handles different R versions.

I've pushed a commit to my personal branch that I think fixes this. I
did it on a separate branch that contains some other work though so the
line numbers won't match up with what you have.

https://github.com/jabranham/ESS/commit/30e544aa0f4deaf46d210945a15f9c6209dfbb15

If you can test it, that would be much appreciated. Let me know if you
can't though and I'll figure out some other way.

Thanks!
Alex

On Sun 01 Jul 2018 at 09:40, Henric Winell  wrote:

> Hi Alex,
>
> On 2018-07-01 15:51, Alex Branham wrote:
>
>> Thanks. I think the solution is to change "car" to "cdr" in
>> ess-r-define-runners in ess-r-mode.el. It's hard for me to test this,
>> though, since I don't have a windows machine.
>
> IIUC, you'd like to change 'car' to 'cdr' on L733:
>
> https://github.com/emacs-ess/ESS/blob/master/lisp/ess-r-mode.el#L733
>
> ?
>
> I just tried this change, but then 'M-x R-[TAB]' results in
>
> Click on a completion to select it.
> In this buffer, type RET to select the completion near point.
>
> Possible completions are:
> R-fix-T-F R-initialize-on-start
> R-modeR-newest
> R-transcript-mode
>
>
> Best,
> Henric
>
>
>
>>
>> Are you familiar at all with elisp? If so, can you try changing it to
>> see if that solves your problem? (you'll have to restart Emacs after 
>> changing it)
>>
>> If not, I'll find another way to test, just let me know.
>>
>> Thanks,
>> Alex
>>

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


Re: [ESS] Indent for R's 'switch'

2018-06-22 Thread Alex Branham via ESS-help


On Fri 22 Jun 2018 at 09:50, Marius Hofert via ESS-help 
 wrote:

> Hi,
>
> ESS (version 16.10-1 but also earlier) gives the following indentation
> for switch statements in r:
>
> f <- function(method = c("foo", "bar"))
> {
> switch(match.arg(method),
>"foo" = { # (*)
> cat("Will use 'method' = \"foo\".\n")
> },
> "bar" = {
> cat("Will use 'method' = \"bar\".\n")
> },
> stop("Wrong 'method'"))
> }
>
> Line (*) is not ideal. Looking over the various cases (in longer
> switch statements) along column 4 (containing the "s" of "switch()"),
> one can easily overlook the case "foo". The following would be great
> to have:
>
> f <- function(method = c("foo", "bar"))
> {
> switch(match.arg(method),
> "foo" = {
> cat("Will use 'method' = \"foo\".\n")
> },
> "bar" = {
> cat("Will use 'method' = \"bar\".\n")
> },
> stop("Wrong 'method'"))
> }
>
> Is that possible?

This is what I get when using the default style, FWIW.

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