Re: [ESS] R 4.0

2020-04-17 Thread Vitalie Spinu via ESS-help
I think we could stick to capital `R-`. A few false positives, if any,
are probably harmless.

   Vitalie

On Fri, 17 Apr 2020 at 02:18, Tyler Smith via ESS-help
 wrote:
>
> I have some TeX-related stuff:
>
> r-mpost
> r-pmpost
> r-upmost
>
> I don't know what they do, I assume they were pulled in as part of
> texlive.
>
> Best,
>
> Tyler
>
>
> Alex Branham via ESS-help writes:
>
> > 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
>
>
> --
> Tyler Smith
> plantarum.ca
>
> __
> 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-help Digest, Vol 199, Issue 3

2019-09-20 Thread Vitalie Spinu via ESS-help
> (add-to-list 'load-path "~/Library/Preferences/Aquamacs
Emacs/Packages/lisp/")
> (require 'ess-site)
> (load "ess-autoloads")  ;; need to register Rnw files
> (require ‘polymode) ;; version 2.0 now
> (require 'poly-markdown)
> (require 'poly-noweb)
> (require 'poly-R)  ;;


Just to clarify that none of those requires is really needed unless you
install polymode and poly-xyz from the source and want to load from special
locations. If installed from melpa, everything (including file
associations) should work out of the box. No configuration needed
whatsoever. Dependencies will be resolved automatically because elpa
packages are already in the path.

  Vitalie

[[alternative HTML version deleted]]

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


Re: [ESS] Possible to interact with julia-repl?

2019-09-01 Thread Vitalie Spinu via ESS-help



>> On So, Aug 25 2019 11:07, HaiYing Wang wrote:

> Similar to the above situation, I find if I am able to set the value of
> "ess-local-process-name" to "julia", then the script file can interact with
> julia-repl. However, I don't know how to do this. It seems these variables
> cannot be changed by user.

It should work. Do you mean that it doesn't work when set from the
`ess-julia-mode-hook` or `julia-mode-hook`?

  Vitalie

__
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-13 Thread Vitalie Spinu via ESS-help



>> On Mon, Mar 04 2019 23:51, Samuele Carcagno via ESS-help wrote:

> (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
> (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode))
> (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
> (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))

> I suppose that's all that was needed

None of the above is needed with the recent polymode. Just install poly-R from
MELPA and that's it; all of the above associations are auto-loaded.

 Vitalie

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


Re: [ESS] ESS+Polymode Questions

2019-03-13 Thread Vitalie Spinu via ESS-help



>> On Thu, Mar 07 2019 12:17, Marc Schwartz via ESS-help wrote:
>>> 
>>> 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?

> It just shows the default 'bold', not a specific font-lock face.

There is no global customization entry for this as yet.

For now you can alter the default value of the class:

 (with-eval-after-load "polymode"
   (oset-default 'pm-inner-chunkmode :head-adjust-face font-lock-warning-face))

Or if you with to customize specific innermodes:

 (oset pm-inner/noweb :head-adjust-face font-lock-string-face)

 Vitalie

__
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 Vitalie Spinu via ESS-help



>> On Wed, Feb 27 2019 11:29, clark richards via ESS-help wrote:

> (setq ess-use-company t)

This one is not needed as it's the default.

There are a few recommendations on the Emacs Wiki:

  https://www.emacswiki.org/emacs/ESS-company


 Vitalie

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


Re: [ESS] Problem with R help buffers

2019-01-30 Thread Vitalie Spinu via ESS-help


Hi Henric,

This is most surely related to our recent migration to emacs standard
display-buffer mechanism.

I opened a new issue https://github.com/emacs-ess/ESS/issues/826

Please follow there for a resolution.

  Vitalie

>> On Wed, Jan 23 2019 14:20, Henric Winell via ESS-help wrote:

> Hi,

> There's something strange going on with the R help buffers.  I'm using the
> latest ess-20190122.2108 from melpa, but it's not particular to that version:

> I want each help buffer to appear in its own separate frame, and have

>  '(ess-help-own-frame t)
>  '(ess-help-reuse-window nil)

> in my .emacs.  Now, pressing, say, '?lm' in an R buffer opens up the help page
> in a separate frame as it should.  However, using 'l' to execute the code in 
> the
> 'Examples:' section results in the help frame being split up with the help
> buffer on top and the R buffer below. Then, pressing 'q' or 'k' should bury or
> remove the help frame, respectively, but it's still visible and has the help
> buffer on top replaced by the R buffer.

> Henric Winell

> __
> 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] Emacs hangs when starting R via -x R

2019-01-30 Thread Vitalie Spinu via ESS-help


Do you customize your R prompt by any chance? Can you start without your ESS
customization?

If you do M-x toggle-debug-on-error and start R, what do you see on C-g?


 Vitalie

>> On Mon, Jan 28 2019 12:10, Kjetil brinchmann Halvorsen via ESS-help wrote:

> I have no way to know if this is a debian, emacs or ess problem. But I can
> use R otherwise than via emacs and ess.

> I open a buffer with a file "something.R". In the status line I have
>U:--- (...)  (ESS[R] [none] hl-p ElDoc)

> When starting an R process with  R
> a new frame opens, R starts (I see the welcome message) and then emacs
> hangs.

> This have been the state now for at least a week.  I am running Debian
> testing updated.

> Any ideas?  (And would this rather belong on r-debian list?)

> Kjetil

>   [[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 Error splits code frame

2019-01-16 Thread Vitalie Spinu via ESS-help


Could you please add an issue to github with your frame configuration? I also
see some not-so nice dynamics with R buffers recently. We need to discuss this
in a bit more detail on the issue tracker.

  Vitalie

>> On Wed, Jan 16 2019 12:01, Johannes Aengenheyster via ESS-help wrote:

> Dear all, 
> For some months now, I basically have the exact same problem as here:
> https://grokbase.com/t/r/ess-help/1319gq8w1m/ess-error-message-in-r-now-splitting-frame.
>  I
> have one frame with an R process, and one (or more) frames with R code. As 
> soon
> as R produces an error, the code frame gets split in half and the R process is
> shown in the new window. Since I already have a frame with a R process, I do 
> not
> want this to happen. Anybody have an idea what to do? (I'm using emacs 26.1.50
> on ubuntu 16.04 with ESS 18.10.3) Thanks in advance!

> __
> 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] Trouble evaluating in namespace

2018-12-08 Thread Vitalie Spinu via ESS-help


You cannot evaluate your input line by line inside a package. The entire
function should be sent at once. Use C-c C-c instead.

The current doc string of `ess-eval-region-or-line-visibly-and-step` says:

  Note that when inside a package and namespaced evaluation is in place (see
  ‘ess-r-set-evaluation-env’) evaluation of multiline input will fail.

>> On Thu, Dec 06 2018 16:07, Kevin Wright via ESS-help wrote:

>  (ess-inject-source nil)

Not the best idea. At least for functions you would like to have source
references on errors. There is really no benefits at all for changing the
default to nil.

  Vitalie

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


Re: [ESS] eldoc in Rmd files

2018-11-11 Thread Vitalie Spinu via ESS-help


You have an outdated polymode

  polymode$ git show 0340f5e7e55235832e
  commit 0340f5e7e55235832e59673f027cc79a23cbdcd6
  Author: Vitalie Spinu 
  Date:   Tue Mar 7 12:22:42 2017 +0100

Polymode has been rewritten and R functionality lives in a separate
package. Just install `poly-R` from melpa and remove *all* old polymode
configuration from your .emacs.

  Vitalie

>> On Sat, Nov 10 2018 10:54, Leha, Andreas via ESS-help wrote:

> Hi all,

> I recently upgraded both emacs and ess.  One of those broke eldoc
> functionality in Rmd files, which worked fine previously.

> I can reproduce with `emacs -Q`.

> To reproduce this, use this test.Rmd file:

> ---
> title: Test
> ---

> ```{r testblock, include = FALSE}
> rnorm
> ```



> - move the point to the source block
> - type C-c C-v to update the references
> - type the opening '(' after 'rnorm'

> Now, I would expect the eldoc message in the echo buffer, as it appears
> in ordinary R files.

> This is a major limitation for my workflow.  Can I fix that somehow?

> Thanks in advance!

> Regards,

> Andreas

> PS:

> Here is my setup:

> - linux (debian buster)

> - Emacs 26.1.50

> - ess-version: 18.10.2

> - polymode (0340f5e7e55235832e59673f027cc79a23cbdcd6)

> - markdown-mode, version 2.4-dev

> PPS:

> And here is my minimal init.el:








> ;; ess

> (add-to-list 'load-path "~/local/emacs/ess/lisp")

> ;;(load "~/local/emacs/ess/lisp/ess-site.el")

> (require 'ess-site)

> ;; markdown mode

> (setq load-path

>   (append '("~/local/emacs/markdown-mode/")

>   load-path))

> (autoload 'markdown-mode "markdown-mode"

>"Major mode for editing Markdown files" t)

> ;;(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))

> (add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))

> (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))

> ;; polymode

> (setq load-path

>   (append '("~/local/emacs/polymode/"
> "~/local/emacs/polymode/modes")

>   load-path))

> (require 'poly-R)

> (require 'poly-markdown)

> ;;; R modes

> (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode))

> (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))

> (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))



> __
> 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 R code evaluation in package

2018-11-11 Thread Vitalie Spinu via ESS-help



>> On Fri, Nov 09 2018 09:38, Cyrus Harmon via ESS-help wrote:

> I'm not sure if this is a polymode or an ESS problem 

It's on the ESS side. There are two things, package mode (devtools commands) is
activated in specified sub-directories only (see ess-r-package-dirs), but
name-space evaluation is activated only within ./R sub-directory.

I think this is the right behavior and your use case is non-standard. It's very
unlikely that from a Rmd file you would need to evaluate code in the namespace.

> but is there someway to specify the pkg in which ESS should be evaluating
> code?

Yes, with C-c C-t C-s you can either disable or activate namespaced evaluation
into any of the currently loaded packages.


  Vitalie

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


Re: [ESS] ESS R code evaluation in package

2018-11-11 Thread Vitalie Spinu via ESS-help



>> On Thu, Nov 08 2018 15:15, Cyrus Harmon via ESS-help wrote:

> I naively assumed that i could just C-c C-r the source for an installed
> function and I would get the new version, at least for the current R
> session. 

This is how it should work. I do devtools::load_all and devtools::install all
the time and I haven't noticed unusual behavior. If an object is already in the
package it should be replaced. The sealed issue applies only to *new* objects.

If you have an example of when the existing object is not re-assigned, then
please open a github issue for that.

  Vitalie

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


Re: [ESS] ESS R code evaluation in package

2018-11-08 Thread Vitalie Spinu via ESS-help



>> On Tue, Nov 06 2018 16:53, Cyrus Harmon via ESS-help wrote:

> 1. How might I compile 'moose <- function () { “bar” }’ from Emacs/ESS and
> have moose show up in my package?
> 2. If it isn’t going into my package now, where is it going?


There are essentially 3 cases:

  1. `moose` is public (exported) function in your package. This means it is
  present in both namespace and package environments when the package is loaded.

  In this case, when you eval moose <- function() ... it goes into both package
  environment and namespace environment of the package.

  2. `moose` is not exported. This means it is in your namespace but not in the
  package environment. And ls("package:foo") wont show it .

  In this case when you eval `moose` it replaces the old version of `moose` in
  the namespace. You can see it with ls(asNamespace("foo"))

  3. Final case which (seems to be of main interest to you) when `moose` is a
  new function. Then, due to the fact that R namepsaces are sealed for new
  objects ESS has to do some cheating. It basically inserts a new environment
  between package namespace env and its parent and adds all new objects to that
  environment. You should get NEW[moose] message in the minibuffer.

  With this arrangement all your code will work as if that function exists in
  the actual package environment, but you won't be able to see that object with
  ls.
  

> 3. If I can’t do this is there some easy way to build an reinstall an 
> existing R
> library without having to call me R process and restart every time I want to
> make a simple change to a library function (this is where I find myself now).

Namespaced evaluation should work for R code as described above. If not, it's a
bug.

Alternatively you can use devtools integration. See C-c C-w map for what is
available. Particularly load-package with [C-c C-w l] or run complete re-install
and reload with (C-c C-w i). Depending on your version of ESS you might need the
dev version of devtools and friends to take the full advantage of the system.

  Vitalie

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


Re: [ESS] how to start debugging R with ess-tracebug

2018-10-29 Thread Vitalie Spinu via ESS-help


You can also just put a breakpoint (C-c C-t b) and re-evaluate the
code. Those breakpoints are just browser() under the hood.

  Vitalie

>> On Sun, Oct 28 2018 20:51, Jeremie Juste via ESS-help wrote:

> Hello,

> C-c C-t d runs the command ess-debug-flag-for-debugging, which is an
> interactive compiled Lisp function in ‘ess-tracebug.el’.

> It is bound to C-c C-t d, C-c C-t C-d,   
> .

> (ess-debug-flag-for-debugging)

> Set the debugging flag on a function.
> Ask the user for a function and if it turns to be generic, ask
> for signature and trace it with browser tracer.

> HTH,

> Jeremie

> __
> 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 18.10-1 patch released

2018-10-27 Thread Vitalie Spinu via ESS-help



>> On Fri, Oct 26 2018 08:33, Alex Branham wrote:

> I'd say stick with e.g. 18.10.1, 18.10.2. 

Ok. Let's do that.

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


Re: [ESS] flymake + lintr

2018-10-26 Thread Vitalie Spinu via ESS-help


Most of the linters are disabled by default because they are controversial,
buggy or interfere with how emacs users normally do things. See
ess-r-flymake-linters for how to change that.

I think project local lintr configuration should be taking effect with new
version of lintr, but I am not sure. Alex knows more about that.

 Vitalie

>> On Thu, Oct 25 2018 12:24, Kevin Wright via ESS-help wrote:

> I'm not seeing any effects from flymake.  I see "Flymake" in the modeline
> and I can click on Flymake, then Check now. Nothing seems to happen.

> I set ess-r-flymake-linters to be the string "lintr::default_linters".

> My setup is fairly current:

> Emacs 27.0.50
> lintr* 1.0.2.9000 2018-10-25 Github (jimhester/lintr@4ade1fc)
> ESS 18.10-1
> I CAN use lint() in an R session:

> R> lint("a=1+1\n")
> :1:2: style: Use <-, not =, for assignment.
> a=1+1
>  ^
> :1:2: style: Put spaces around all infix operators.
> a=1+1
> ~^~
> :1:4: style: Put spaces around all infix operators.
> a=1+1
>   ~^~
> Anybody have ideas for diagnosing what the problem is?

> Kevin Wright

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


Re: [ESS] ESS 18.10-1 patch released

2018-10-26 Thread Vitalie Spinu via ESS-help



Our git tags are not signed right? At least I don't see that on GitHub
interface.

I have manually changed the tag to v18.10.1. Should propagate soon.

>> On Thu, Oct 25 2018 17:53, Alex Branham wrote:

> This is yet another consequence of ess not being package.el-friendly:

There is a good reason of having dashes in our mini version number because it
refers to non-calendar updates. I would say it's more of Emacs/package.el issue
that they don't recognize such a possibility.

What shall we do about it? Shall we stick with mini . from now on or have two
version tags?

 Vitalie

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


Re: [ESS] re-mapping C-RET in 18.10, avoiding conflict with CUA mode

2018-10-25 Thread Vitalie Spinu via ESS-help


Hi Paul,

Ess-mode.el changed to ess.el but we are still discussing the change. For now
just replace "ess-mode" with "ess" and it should be fine. The change to
*-visibility-* is needed.

In the future release both ess-mode and ess will work.


  Vitalie

>> On Wed, Oct 24 2018 14:58, Paul Johnson via ESS-help wrote:

> I'm running Ubuntu-18.10 and the new packaging for elpa-ess provides
> ESS 18.10.  I still like CUA mode rectangles and so I want to remap
> C-RET to S-RET.

> 5 years ago Vitalie S told me how to do that. The stanza in init.el was:

> ;; Change shortcut "run this line" to use Shift-Return
> ;; Suggested by Vitalie Spinu 2013-09-30 to co-exist with Windows Emacs
> (eval-after-load "ess-mode"
>  '(progn
>(define-key ess-mode-map [(control return)] nil)
>(define-key ess-mode-map [(shift return)] 
> 'ess-eval-region-or-line-and-step))
> )

> In Ess 18.10-1 this no longer works, I thought I'd fix by revising:

> (eval-after-load "ess-mode"
>  '(progn
>(define-key ess-mode-map [(control return)] nil)
>(define-key ess-mode-map [(shift return)]
> 'ess-eval-region-or-line-visibly-and-step))
> )

> But it does not help.

> Can you advise me?

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


Re: [ESS] ESS 18.10-1 patch released

2018-10-25 Thread Vitalie Spinu via ESS-help
ion and highlighting of source code
>>>  * Partial evaluation of code
>>>  * Loading and error-checking of code
>>>  * Source code revision maintenance
>>>  * Batch execution (SAS, BUGS/JAGS)
>>>  * Use of imenu to provide links to appropriate functions
>>> * Interacting with the process (S family, SAS, Stata, Julia)
>>>  * Command-line editing
>>>  * Searchable Command history
>>>  * Command-line completion of S family object names and file
>>>names
>>>  * Quick access to object lists and search lists
>>>  * Transcript recording
>>>  * Interface to the help system
>>> * Transcript manipulation (S family, Stata)
>>>  * Recording and saving transcript files
>>>  * Manipulating and editing saved transcripts
>>>  * Re-evaluating commands from transcript files
>>> * Interaction with Help Pages and other Documentation (R)
>>>  * Fast Navigation
>>>  * Sending Examples to running ESS process.
>>>  * Fast Transfer to Further Help Pages
>>> * Help File Editing (R)
>>>  * Syntactic indentation and highlighting of source code.
>>>  * Sending Examples to running ESS process.
>>>  * Previewing
>>>
>>> 1.7 Requirements
>>> 
>>>
>>> ESS supports GNU Emacs versions 24.3 and newer.
>>>
>>> ESS is most likely to work with current/recent versions of the
>>> following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
>>>
>>> To build the PDF documentation, you will need a version of TeX Live
>>> or texinfo that includes texi2dvi.
>>>
>>> 1.8 Mailing List
>>> 
>>>
>>> There is a mailing list for discussions and announcements relating to
>>> ESS. Join the list by sending an e-mail with "subscribe ess-help" (or
>>> "help") in the body to ; contributions
>>> to the list may be mailed to .  Rest assured,
>>> this is a fairly low-volume mailing list.
>>>
>>> The purposes of the mailing list include
>>>
>>> * helping users of ESS to get along with it.
>>> * discussing aspects of using ESS on Emacs and XEmacs.
>>> * suggestions for improvements.
>>> * announcements of new releases of ESS.
>>> * posting small patches to ESS.
>>>
>>> 1.9 Reporting Bugs
>>> ==
>>>
>>> Please send bug reports, suggestions etc.  to ,
>>> or post them on our github issue tracker
>>> (https://github.com/emacs-ess/ESS/issues)>>
>>> The easiest way to do this is within Emacs by typing
>>>
>>> 'M-x ess-submit-bug-report'
>>>
>>> This also gives the maintainers valuable information about your
>>> installation which may help us to identify or even fix the bug.
>>>
>>> If Emacs reports an error, backtraces can help us debug the problem.
>>> Type "M-x set-variable RET debug-on-error RET t RET". Then run the
>>> command that causes the error and you should see a *Backtrace* buffer
>>> containing debug information; send us that buffer.
>>>
>>> Note that comments, suggestions, words of praise and large cash
>>> donations are also more than welcome.
>>>
>>> 1.10 Authors
>>> 
>>>
>>> * A.J. Rossini (mailto:blindgl...@gmail.com)
>>> * Richard M. Heiberger (mailto:r...@temple.edu)
>>> * Kurt Hornik (mailto:kurt.hor...@r-project.org)
>>> * Martin Maechler (mailto:maech...@stat.math.ethz.ch)
>>> * Rodney A. Sparapani (mailto:rspar...@mcw.edu)
>>> * Stephen Eglen (mailto:step...@gnu.org)
>>> * Sebastian P. Luque (mailto:splu...@gmail.com)
>>> * Henning Redestig (mailto:henning@googlemail.com)
>>> * Vitalie Spinu (mailto:spinu...@gmail.com)
>>> * Lionel Henry (mailto:lionel@gmail.com)
>>> * J. Alexander Branham (mailto:alex.bran...@gmail.com)
>>>
>>> 1.11 License
>>> 
>>>
>>> The source and documentation of ESS is free software.  You can
>>> redistribute it and/or modify it under the terms of the GNU General
>>> Public License as published by the Free Software Foundation; either
>>> version 2, or (at your option) 

Re: [ESS] Hang when opening remote session

2018-07-23 Thread Vitalie Spinu via ESS-help


Do you have a proper ssh remote to test this on? Could this be docker specific?

>> On ma, jul 23 2018 05:58, Gammel Holte via ESS-help wrote:

>>
>> Just a shot in the dark, but does /ssh:root@localhost#6000:/root/.Rhistory
>> exist and you have read/write permission?
>>

> Apologies for the late reply. Yes, it does exist and I have rw permissions.

> Anything else I can do to debug this issue?

> Thanks.

>   [[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] Indent for R's 'switch'

2018-06-23 Thread Vitalie Spinu via ESS-help



>> On Fri, Jun 22 2018 11:06, Marius Hofert via ESS-help wrote:

> my_variable_value <- switch(...)

You can always do:

  my_variable_value <-
 switch(...)

Vitalie

__
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 Vitalie Spinu via ESS-help


In addition to xref and etags I use M-o for imenu-anywhere. It works within all
buffers of the same mode and buffers within same project (if you have projectile
installed). The benefit is that you don't need any fancy lockup functionality or
TAGS. It will work straight away. The drawback is that you need to open the
buffers first.

  Vitalie

>> On Fri, Jun 22 2018 10: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


Re: [ESS] ess problem

2018-06-12 Thread Vitalie Spinu via ESS-help



Hi Rob,

Have you changed prompt on the R side (in opts)? Try running R without any
personal configuration. If it "just started happening" it's unlikely ESS
problem. Evaluation hasn't been touched in a while here.

  Vitalie

>> On Tue, Jun 12 2018 12:00, Rob Dunne wrote:

> Hi Ess- help,

> when I highlight something like

> F <- 4 +5 +
> 6

> and send it to a running R process -- the process just hangs. But
>  F <- 4 +5 +6
> caused no problems.

> This has just started happening. I don't think I have  changed anything.
> I realize it is not much to go on. How can I get better information about
> the problem.

> The output from ess-submit-bug-report  and sessionInfo() is attached.

> Bye
> R

> ]*function) (ess-font-lock-keywords quote ess-R-font-lock-keywords)
> (ess-font-lock-defaults ess--extract-default-fl-keywords
> ess-R-font-lock-keywords) (font-lock-defaults quote (ess-font-lock-defaults
> nil nil ((46 . w) (95 . w)
> (ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, comint..echoes=t,
> comint..sender=comint-simple-send

> Finished setting up ESS-mode.
> (n-i-m-l: 1)(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil,
> comint..echoes=t, comint..sender=comint-simple-send
> (ess-mode-1): ess-language=S, ess-dialect=R buf=script1.Rnw
> (ess-mode-1.5): alist=((inferior-ess-reload-function quote
> inferior-ess-reload:R) (ess-quit-function quote ess-quit:R)
> (ess-send-region-function quote ess-send-region:R) (ess-load-file-function
> quote ess-load-file:R) (ess-build-load-command-function quote
> ess-build-load-command:R) (ess-build-eval-command-function quote
> ess-build-eval-command:R) (ess-local-customize-alist quote
> ess-r-customize-alist) (ess-dialect . R) (ess-suffix . R) (ess-ac-sources .
> ess-r-ac-sources) (ess-company-backends . ess-r-company-backends)
> (ess-build-tags-command . ess-r-build-tags-command) (ess-traceback-command
> . ess-r-traceback-command) (ess-call-stack-command .
> ess-r-call-stack-command) (ess-mode-completion-syntax-table .
> ess-r-completion-syntax-table) (ess-build-eval-message-function function
> ess-r-build-eval-message) (ess-format-eval-command-function function
> ess-r-format-eval-command) (ess-format-load-command-function function
> ess-r-format-load-command) (ess-send-region-function function
> ess-r-send-region) (ess-load-file-function function ess-r-load-file)
> (ess-make-source-refd-command-function function
> ess-r-make-source-refd-command) (ess-format-eval-message-function function
> ess-r-format-eval-message) (ess-install-library-function function
> ess-r-install-library) (ess-eldoc-function function ess-r-eldoc-function)
> (ess-help-web-search-command function ess-r-sos)
> (ess-build-help-command-function function ess-r-build-help-command)
> (ess-dump-filename-template . ess-r-dump-filename-template)
> (ess-mode-editing-alist . ess-r-editing-alist) (ess-change-sp-regexp .
> ess-r-change-sp-regexp) (ess-help-sec-regex . ess-help-r-sec-regex)
> (ess-help-sec-keys-alist . ess-help-r-sec-keys-alist) (ess-loop-timeout .
> ess-r-loop-timeout) (ess-function-pattern . ess-r-function-pattern)
> (ess-object-name-db-file . ess-r-namedb.el) (ess-smart-operators .
> ess-r-smart-operators) (inferior-ess-program . inferior-ess-r-program-name)
> (inferior-ess-objects-command . inferior-ess-r-objects-command)
> (inferior-ess-font-lock-keywords quote inferior-ess-r-font-lock-keywords)
> (inferior-ess-search-list-command . search()
> ) (inferior-ess-help-command . inferior-ess-r-help-command)
> (inferior-ess-help-filetype) (inferior-ess-exit-command . q())
> (inferior-ess-exit-prompt . Save workspace image? [y/n/c]: )
> (inferior-ess-start-file) (inferior-ess-start-args . )
> (ess-error-regexp-alist . ess-r-error-regexp-alist)
> (ess-describe-object-at-point-commands quote
> ess-r-describe-object-at-point-commands) (ess-STERM . iESS) (ess-editor .
> ess-r-editor) (ess-pager . ess-r-pager) (ess-mode-syntax-table .
> ess-r-syntax-table) (font-lock-syntactic-face-function function
> ess-r-font-lock-syntactic-face-function) (prettify-symbols-alist quote ((<-
> . 8592) (<<- . 8606) (-> . 8594) (->> . 8608))) (ess-language . S)
> (inferior-ess-exit-command . q()
> ) (inferior-ess-language-start eval inferior-S-language-start)
> (comint-use-prompt-regexp . t) (comint-process-echoes . t)
> (inferior-ess-primary-prompt . > ) (inferior-ess-secondary-prompt . + )
> (comment-start . #) (ess-imenu-generic-expression .
> ess-imenu-S-generic-expression) (comment-add . 1) (comment-start-skip . #+
> *) (comment-use-syntax . t) (comment-column . 40) (ess-no-skip-regexp
> concat ^ *@\| (default-value 'ess-no-skip-regexp)) (inferior-ess-prompt .
> inferior-S-prompt) (ess-get-help-topics-function function
> ess-s-get-help-topics-function) (ess-getwd-command . getwd()
> ) (ess-setwd-command . setwd('%s')
> ) (ess-funargs-command . .ess_funargs("%s")
> ) (fill-nobreak-predicate quote ess-inside-string-p)
> (normal-auto-fill-function quote ess-do-auto-fill)
> 

Re: [ESS] help configuring auto-complete for ESS on Windows

2018-03-18 Thread Vitalie Spinu

Should work out of the box if you have a running R process. It also depends on
what you have in your `company-backends`. ESS adds its backends in front of the
list (company-R-args company-R-objects) but something might have gotten in front
and might be hijacking the completion. Also check that ess-use-company is
non-nil.

 Vitalie



>> On Sun, Mar 18 2018 09:05, Vince West wrote:

> I've been racking my brain and googling for last 48 hours but have been
> unable to figure this out.

> RStudio has very nice auto-complete features baked in, but I can't seem to
> get it working with ESS.

> I am using emacs latest on Windows 10 x64, R3.4.3, installing ESS from
> MELPA and installing company-mode from MELPA

> For controlled experimentation my init.el file is pretty bare bones (see
> below).

> I open up a new R buffer and ess mode seems to initialize properly.  I type
> M-x company-mode to enable company mode, but I get no autocomplete of any
> kind.  Company-mode is working properly on elisp files.  Wondering if
> anybody has a working example of ESS autocomplete working on Windows and
> can tell me how to get it functioning properly.

> I suppose I should also note that during the MELPA installation of ess I
> get a messages output that is 737 lines long and is littered with warnings
> about obsolete functions, obsolete variables, assignements to free
> variables references to free variables, and functions that are not known to
> be defined.

> Here is my init file

> -
> init.el
> -
> (require 'package)
> (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
> (not (gnutls-available-p
>(proto (if no-ssl "http" "https")))
>   (add-to-list 'package-archives (cons "melpa" (concat proto "://
> melpa.org/packages/")) t)
>   )
> (package-initialize)

> ;; emacs controlled settings
> (custom-set-variables
>  '(package-selected-packages (quote (company ess)))
>  '(show-paren-mode t)
>  '(tool-bar-mode nil))
> (custom-set-faces
>  '(default ((t (:family "Consolas" :foundry "outline" :slant normal :weight
> normal :height 113 :width normal)

> (require 'company)

>   [[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] Developing R packages under ESS

2018-03-08 Thread Vitalie Spinu

>> Just start R inside package directory and start eval-ing stuff as you
>> normally do.

> Do you mean that R must be launched from inside the package directory?

I was imprecise. No, R process could be run from anywhere. It's that
ess-r-package-mode is active only within the package directory.

> I haven't been using devtools,

It's an implementation detail. We are relying on devtools because it's
convenient. For most commands (install, check etc) we could have done
without.

 Vitalie

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


Re: [ESS] Developing R packages under ESS

2018-03-08 Thread Vitalie Spinu


>> On Wed, Mar 07 2018 18:29, Ross Boylan wrote:

> The file I opened initially, the one that sources all the others, is above the
> package directory.  It sources files under the package directory.  When I
> modified one of them I used C-c C-t C-s to disable the namespace before I did
> C-c C-l.  This was on the theory that the source() commands earlier stuck
> everything in the global namespace.

This sounds too complicated. You don't need to source anything or use C-c C-t
C-s as all ess eval commmands are executed automatically in the package
directory. Even if the package is installed from CRAN you shouldn't see
"namespaced locked" error. Just start R inside package directory and start
eval-ing stuff as you normally do.

As to the devtools integration, it's a breeze - C-c C-w i or C-c C-w l are
pretty fast, surely not slow enough to interfere with the workflow.

  Vitalie

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


Re: [ESS] Print spark histograms from skimr package in Emacs ESS on Windows

2018-01-24 Thread Vitalie Spinu

Ok, I see. This is linux but I recall (from many years ago when I worked on
Windows) being able to fix such issues by explicitly specifying the codding
system of the process.

I still have this line commented out in my init file:

 (set-buffer-process-coding-system 'windows-1252 'windows-1252)

Try 'utf-8 or variants displayed by M-x list-coding-systems. If this works, you
can either set in ess-R-post-run-hook or in process-coding-system-alist.

I cannot investigate this further on Windows at the moment, sorry.

 Vitalie



>> On Wed, Jan 24 2018 09:50, Ista Zahn wrote:

> On Wed, Jan 24, 2018 at 8:54 AM, Vitalie Spinu <spinu...@gmail.com> wrote:
>>
>>
>> Hi Vinh,
>>
>> It works for me out of the box, no need for Chinese locale or R specific 
>> tricks:

> Just to clarify -- it works for you _on Windows_? For me it works on
> Linux but _not_ on Windows. And "out of the box" means starting with

> runemacs.exe -q

> followed by

> (package-initialize)
> (require 'ess-site)

> ?

> For me R only displays a subset of characters correctly. For example,
> "\U00B5" displays correctly but "\U4E02" does not. Both characters
> display correctly when inserted with "insert-char", so this is not a
> font problem.

> The attached screen shot shows the behavior I observe in Emacs 25.3 on
> Windows starting from "runemacs.exe -q" (left) and when running
> "runemacs.exe" and using my usual configuration. The behavior is
> different, but in neither case is the 丂 character displayed correctly.

> Best,
> Ista
>>
>>
>>Variable type: numeric
>> variable missing complete   n mean   sd  p0 p25 median p75 p100 
>> hist
>> Petal.Length   0  150 150 3.76 1.77 1   1.6   4.35 5.1  6.9 
>> ▇▁▁▂▅▅▃▁
>>  Petal.Width   0  150 150 1.2  0.76 0.1 0.3   1.3  1.8  2.5 
>> ▇▁▁▅▃▃▂▂
>> Sepal.Length   0  150 150 5.84 0.83 4.3 5.1   5.8  6.4  7.9 
>> ▂▇▅▇▆▅▂▂
>>  Sepal.Width   0  150 150 3.06 0.44 2   2.8   33.3  4.4 
>> ▁▂▅▇▃▂▁▁
>>
>> My bet is that it's your emacs font which doesn't recognize those Unicode
>> characters.

>>
>> In my experience DejaVu is among the most complete fonts so I do this in my 
>> .emacs:
>>
>>   (set-face-font 'default  "DejaVu Sans Mono-9.5")
>>
>> You can see all fonts on your machine with by calling (font-family-list).
>>
>> HTH,
>>
>>   Vitalie
>>
>>
>>>> On Tue, Jan 23 2018 17:35, Vinh Nguyen wrote:
>>
>>> Hi everyone,
>>
>>> Was curious if anyone was able to print spark histograms from the
>>> skimr in the text console of Emacs ESS?  Tried setting to Chinese
>>> locale, playing around with environment variables, but can't get
>>> things to print as described here:
>>> https://github.com/ropenscilabs/skimr/issues/246>
>>> I'm able to print on the regular R console by setting to the Chinese
>>> locale and using the NSimSun font as described here
>>> (https://stackoverflow.com/questions/44253848/skimr-cant-seem-to-produce-the-histograms),but
>>>  no luck on the Emacs ESS side.
>>
>>> Curious if others have gotten this to work.  Thanks!
>>> -- Vinh
>>
>>> __
>>> 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

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

Re: [ESS] connection to Oracle does not work in ESS

2017-12-13 Thread Vitalie Spinu

Hi Stephen,

I doubt it's problem with ESS. Running R from emacs shell and with ESS should be
equivalent. Make sure that it's indeed the same R instance and RODBC what are
called in your experiments. Do you have a custom inferior-ess-r-program-name
setup?

Do you issue Rterm or R in the emacs shell?

  Vitalie

>> On Wed, Dec 13 2017 22:23, Bond, Stephen wrote:

> Further info:

> When I use Rterm in a cmd shell the connection works.
> When I use Rterm in a shell within Emacs the connection works.
> Something must be going wrong in the way ESS does things.

> Stephen

> From: Bond, Stephen
> Sent: Wednesday, December 13, 2017 12:53 PM
> To: 'ess-help@r-project.org'
> Subject: connection to Oracle does not work in ESS

> On 64-bit win7:

> I have a DSN which tests successfully in control panel. I can connect from 
> RGui with:
> con=odbcConnect("DSNname",uid="myuid",pwd="mypass")

> it does not work in ESS:

> R version 3.4.2 (2017-09-28) -- "Short Summer"
> Copyright (C) 2017 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)

>> > options(chmhelp=FALSE, help_type="text")
>> options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient.exe', 
>> show.error.locations=TRUE)
>> library(RODBC)
>> con=odbcConnect("DSNname",uid="myuid",pwd="mypass")

> Warning messages:
> 1: In RODBC::odbcDriverConnect() :
>   [RODBC] ERROR: state 08004, code 12154, message 
> [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier 
> specified
> 2: In RODBC::odbcDriverConnect() :
>   ODBC connection failed

> I have all the paths setup and the driver is installed correctly. Tnsping 
> finds the db.

> Let me know if anybody can help.

> Stephen

>   [[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] starting directory not detected correctly anymore

2017-12-02 Thread Vitalie Spinu

I think this is a consequence of the recent feature which sets the default
directory to the package directory. It looks like it treats your tmp directory
as a package. @Lionel?

  Vitalie

>> On Thu, Nov 30 2017 18:59, Paul Johnson wrote:

> Greetings.

> I want to have ESS know the working directory from shell pwd, I don't
> want it to ask me.

> I have a setting in my init.el that used to work that way:

> ;; start R in current working directory, don't let R ask user:
> (setq ess-ask-for-ess-directory nil)

> Recently, it has stopped working. The symptom of the problem is that
> the R session working directory trims off the last element in the
> path. This is in Ubuntu 17.04 with emacs 24.5.1 and ess 17.11.

> When I open a file from command line, say in

> $ cd ~/tmp/R/
> $ emacs testme.R

> and then I hit the bug blue icon to start R, then getwd() shows
> "~/tmp". The last element in the path is lost.  Same happens if I
> start R with "Alt-x R", so don't hate me for liking your pretty blue R
> button.

> I notice that M-x eshell gets it right, it opens a shell in the /R
> directory (the correct one). Also Emacs File "Open Directory" also
> gets it right. Its just the inferior ESS *R* session that doesn't get
> it right.

> If I remove that line from init.el, then the ESS process stops and
> asks me what directory what I want and it always guesses correctly.

> I never saw this happen before today when opening a pre-existing R
> file from the shell.  I have seem similar in past if I have an Emacs
> session open and close the R session and re-start a new R session
> without closing Emacs.  That second instance almost always has lost
> the "R" from the file path, and shows the parent directory.

> Would somebody try it and tell me if I've just gone all the way off
> the cliff toward crazy?

> Suggestions welcome (except concerning cliffs), thanks as usual.

> pj

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


Re: [ESS] (Aquamacs) Why is text at R prompt read-only, cannot delete?

2017-10-09 Thread Vitalie Spinu


>> On Mon, Oct 09 2017 17:57, Christian wrote:

> No such file or directory,
> ~/elisp/vendor/ess/lisp/ess-site.el

Isn't the above clear enough? Fixing your path should do it.

  Vitalie

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


Re: [ESS] R window: Text is read only

2017-09-27 Thread Vitalie Spinu


If you activate the debugger (M-x toggle-debug-on-error), does it show anything
meaningful?

>> On Wed, Sep 27 2017 09:47, Christian wrote:

> Hi, after start with M-x R the R window behaves OK, allowing writing to. BUT,
> after navigating in the help system, R refuses writing with "Text is read
> only". This makes R unusable. I found no help on the net, so, please, give me
> some hints.
> This behaviour started bothering me out of the blue. Some mis-manipulation?

> TIA  C.

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


Re: [ESS] Strange behaviour of ess-eval-buffer-from-beg-to-here?

2017-08-10 Thread Vitalie Spinu
I can confirm this. Last prompt is not detected for some reason.


  Vitalie

On 9 August 2017 at 19:14, Marius Hofert  wrote:
> Hi,
>
> Here is some R code, that, when put in an R script (.R), shows some
> strange behaviour (see sessionInfo() etc. below) under ess-version:
> 16.10-1.
>
> (foo <- matrix(rnorm(100), ncol = 5))
> L <- matrix(c(2, 0, 0,
>   6, 1, 0,
>  -8, 5, 3), ncol = 3, byrow = TRUE)
> Sigma <- L %*% t(L)
> P <- cov2cor(Sigma)
> d <- ncol(P)
> n <- 1e4
> set.seed(271)
> Z <- matrix(rnorm(n * d), ncol = d)
> X <- t(L %*% t(Z))
> (T <- cor(X, method = "kendall"))
>
> If I put the curser in line 2 and execute C-c 
> (ess-eval-buffer-from-beg-to-here), the matrix 'foo' is printed.
> However, if I put the cursor in the line after the last one and
> execute C-c , I still see the matrix 'foo' but the correlation
> matrix 'T' is not printed. (If I step through the code line-by-line, T
> is of course printed). Is this a bug?
>
> I could replicate a similar behaviour (T not printed) as above with
> C-c C-c (ess-eval-region-or-function-or-paragraph-and-step). Needless
> to say, this is frustrating if you want to show several
> outputs/variables at once in a script (for example, when teaching). I
> can't remember this ever happening before. Any ideas?
>
> I have ess-version: 16.10-1 [git:
> 58c130a1bc13c8933bde229424d628ec2b6a6a97] (loaded from
> /usr/local/ESS/)
>
> sessionInfo() is:
>
> R version 3.4.1 (2017-06-30)
> Platform: x86_64-apple-darwin16.6.0 (64-bit)
> Running under: macOS Sierra 10.12.6
>
> Matrix products: default
> BLAS: /usr/local/R/R-3.4.1_build/lib/libRblas.dylib
> LAPACK: /usr/local/R/R-3.4.1_build/lib/libRlapack.dylib
>
> locale:
> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
>
> loaded via a namespace (and not attached):
>  [1] copula_0.999-18   compiler_3.4.1Matrix_1.2-10 ADGofTest_0.3
>  [5] tools_3.4.1   pspline_1.0-18gsl_1.9-10.3  mvtnorm_1.0-6
>  [9] grid_3.4.1pcaPP_1.9-61  numDeriv_2016.8-1 stats4_3.4.1
> [13] lattice_0.20-35   stabledist_0.7-1
>
> Thanks & cheers,
> Marius
>
> __
> 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] Ever consider changing indentation on #?

2017-05-06 Thread Vitalie Spinu

I would add here that other modes in emacs except lisp don't usually respect
this convention.

  Vitalie

>> On Fri, May 05 2017 23:52, Steven McKinney wrote:

> As an old lisp programmer I use # and ## and ### in all my code.

> ### 
> ### for code block and function headers
> ### (this was actually functional in 
> ###  SPLUS for auto-generating help)
> ### 

> ## for inline comments in code, and   # brief margin notes

> I find it useful, but all things change over time.

> Steven McKinney

>> -Original Message-
>> From: ESS-help [mailto:ess-help-boun...@r-project.org] On Behalf Of Paul
>> Johnson
>> Sent: May-04-17 7:50 PM
>> To: ess-help
>> Subject: Re: [ESS] Ever consider changing indentation on #?
>> 
>> Please raise your hand if you have EVER used # to document R code in
>> the way mentioned on the LISP coding standards page.
>> 
>> pj
>> 
>> On Thu, May 4, 2017 at 10:52 AM, Brahm, David
>>  wrote:
>> > Since we're on the topic, is there a style to make the # comments right-
>> justified against
>> > "fill-column" (which is 97 for me, as that makes printouts look good)
>> and/or the window
>> > width?  So as you type the comment, it marches leftward.  E.g.:
>> >
>> > x <- y + z   # This
>> comment ends on column 97
>> >
>> 123456789012345678901234567890123456789012345678901234567890123456789012345
>> 6789012345678901234567
>> >
>> > -- David Brahm (br...@alum.mit.edu)
>> >
>> >
>> > -Original Message-
>> > From: ESS-help [mailto:ess-help-boun...@r-project.org] On Behalf Of
>> Charles C. Berry
>> > Sent: Thursday, May 04, 2017 11:38 AM
>> > To: Ista Zahn
>> > Cc: Stephen Eglen; ess-help
>> > Subject: Re: [ESS] Ever consider changing indentation on #?
>> >
>> > On Thu, 4 May 2017, Ista Zahn wrote:
>> >
>> >> On Thu, May 4, 2017 at 10:25 AM, Lionel Henry 
>> wrote:
>> >>>
>>  On 4 mai 2017, at 16:22, Paul Johnson  wrote:
>> 
>>  I understand I can fix my init.el go avoid this, but it would be nicer
>>  for my purpose
>>  if this were in ESS itself, because I keep telling students to use it
>>  and they are put off/discouraged
>>  by this.
>> >>>
>> >>> Emacs is for people willing to put the effort into customisation.
>> >>> Your students are probably better off with RStudio. That said
>> >>> I agree that good defaults are important.
>> >>
>> >
>> > And there are a bunch of styles from which to choose a personal default.
>> > See below.
>> >
>> >> Yes, IMO Emacs/ESS isn't going to compete with Rstudio on
>> >> out-of-the-box convenience. But we can compete on features! Put this
>> >> in your config file
>> >>
>> >> (add-hook 'ess-mode-hook
>> >>  (lambda()
>> >>;; don't indent comments
>> >>(setq ess-indent-with-fancy-comments nil)
>> >>;; turn on outline mode
>> >>(setq-local outline-regexp "[# ]+")
>> >>(outline-minor-mode t)))
>> >>
>> >> and not only will single # comments not be aligned at comment-column,
>> >> but code folder will work too!
>> >>
>> >>
>> >
>> > There are `off-the-shelf' styles like `Rstudio' that might satisfy Paul's
>> > student.
>> >
>> > Setting `ess-default-style' to `Rstudio' gives these settings:
>> >
>> >   (RStudio
>> >(ess-indent-offset . 2)
>> >(ess-offset-arguments . open-delim)
>> >(ess-offset-arguments-newline . prev-line)
>> >(ess-offset-block . prev-line)
>> >(ess-offset-continued . straight)
>> >(ess-align-nested-calls)
>> >(ess-align-arguments-in-calls "function[ ]*(")
>> >(ess-align-continuations-in-calls)
>> >(ess-align-blocks)
>> >(ess-indent-from-lhs arguments)
>> >(ess-indent-from-chain-start . t)
>> >(ess-indent-with-fancy-comments))
>> >
>> >
>> > Or one can customize the `OWN' style and select it. See the
>> > `ess-style-alist' docstring for more details.
>> >
>> > HTH,
>> >
>> > Chuck
>> >
>> > __
>> > 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> 
>> 
>> 
>> --
>> Paul E. Johnson   http://pj.freefaculty.org> Director, Center for Research 
>> Methods and Data Analysis http://crmda.ku.edu> 
>> To write to me directly, please address me at pauljohn at ku.edu.
>> 
>> __
>> 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

__
ESS-help@r-project.org mailing list

Re: [ESS] completion of command in R ??

2017-02-19 Thread Vitalie Spinu

Hi Christian,

I misunderstood you problem. My problem with company completion not comint
completion.

For your issue, make sure that your C-^ is bound to
comint-previous-matching-input-from-input and not comint-previous-input or
something else.

  Vitalie

>> On Mon, Feb 13 2017 14:44, Christian wrote:

> Hi,

> since I switched to Sierra (Mac) and R-3.3.2, ESS 16.04,
> I miss the convenient completion of a command in R. Previously, after entering
> xyz, commands came up starting with this sequence only  with presses of C-^. 
> Now
> *all* past commands come up, and the point is at the end now, instead of at 
> the
> start, which I find more convenient.

> Can the old behaviour brought back? How?

> Thanks  C.

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


Re: [ESS] completion of command in R

2016-12-17 Thread Vitalie Spinu

This is an emacs change. I am also annoyed by it but never got down to
submitting a patch to emacs. No easy workaround AFAIK.

  Vitalie

>> On Fri, Dec 16 2016 12:35, Christian wrote:

> Hi,
> since I switched to Sierra (Mac) and R-3.3.2, ESS 16.04,
> I miss the convenient completion of a command in R. Now C-^ brings *all* past
> commands, and the point is at the end now, instead of at the start, which I 
> find
> more convenient.
> Can the old behaviour brought back? How?
> Thanks  C.

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


Re: [ESS] turning off ess-r-package-mode

2016-08-25 Thread Vitalie Spinu


>> On Wed, Aug 24 2016 15:49, Tyler Smith wrote:

> The `ess-r-package-auto-activate` toggle isn't working for me. From
> `emacs -Q`, I'm setting up with this script:

> (require 'package)
> (setq package-load-list
>   '((ess t)
> (julia-mode t))
> (package-initialize)

> (require 'ess-site)
> (setq ess-r-package-auto-activate nil)

It should be

  (setq ess-r-package-auto-set-evaluation-env nil)

> And I'm still getting the problems I describe.

> However, `C-c C-t C-s` did allow me to turn off the namespace
> evaluation, thanks!

Yes. This is the on-the fly method which is probably more suitable for your
needs.

I am actually wondering if we should be more resilient with respect to package
loading errors somehow.

  Vitalie

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