spacemacs
spacemacs copied to clipboard
Documentation: an introduction to spacemacs for ESS users
Hi All,
Sorry for the borderline spam, but as you seem to be a regular contributor to the ESS layer on spacemacs I figure you must be friendly folk and I wasn't sure how else you could all be contacted.
@smile13241324 @robbyoconnor @yyoncho @sei40kr @emacspace
You may have noticed that Dirk Eddelbuettel has been leading an effort to assemble some resources for new ESS users: https://github.com/ess-intro/ess-intro I've been putting together some material on spacemacs for ESS users. If anyone would be interested in skimming it to make sure I'm not grossly misrepresenting spacemacs (and your work), I'd very much welcome any feedback you have.
The idea is to have about 5 minutes worth of slides and a slightly longer document providing more details: https://github.com/ess-intro/presentation-ess-from-spacemacs
Thank you all for your work on the ESS layer!
Cheers, Alex
The target audience is unclear. Do you want to introduce ESS and spacemacs to non-emacs users, or non-spacemacs users, or non-ESS users?
Thanks, I'll make the intended audience explicit at the start of the readme.
The intended audience is new-ish users of ESS with no prior spacemacs knowledge. Initially I had in mind to position this as a guide for people considering switching over from Rstudio, as an easy way to get into ESS, but I'd like to avoid making this a flamewar between Rstudio vs everything else.
Nice introduction @aezarebski. I have given it a read and found some smaller points you should possibly change:
In general you should link to https://develop.spacemacs.org/ for further details. This is because the primary branch is now "develop" and "master" is officially stale.
consistency
This is a really good aspect of spacemacs, the bindings are very consistent across layers which makes switching between languages is easy.
This should rather be "which makes switching between languages very easy."
Cloning the spacemacs repository from github using the command shown below creates a .emacs.d directory in your home directory. It is this repository that contains the actual spacemacs configuration. For the most part you can just ignore this though. Emacs will find this information on start up and guide you through the rest of the installation.
I think you should also mention that an existing .emacs.d must be moved before cloning into .emacs.d. If this is not done and emacs has been started already on that system the init.el in there may prevent Spacemacs from starting, instead you will load vanilla emacs.
Spacemacs seems to like to use source code pro, this beyond the scope of this presentation, but there are good instructions for installing it all over the internet. It appears that spacemacs works fine even if you do not have Source Code Pro available, so there is no need to get hung up on this.
Yeah installing source-code-pro is different on every distro I suppose. I am on Manjaro, there I can just install it via pacman. Anyway Spacemacs runs with every font you like even with your local one. There is an appropriate section in the documentation here maybe you should link to it, to give new users a chance to set it up for their needs.
Maybe you should mention LSP support and how to set it up for ess layer too. I think this should be especially useful for R users, as they may be used to auto-completion and syntax-checking from other editors.
This is great, thanks! I haven't looked into the whole LSP thing yet, but this should provide the required motivation to do so. Interesting about "develop" being the new primary branch, definitely a Gotcha.
I'll leave this open for a bit longer in case anyone wants to comment, but this has certainly satisfied me that I haven't grossly misrepresented your work. Thanks again for the replies.
Hi Alexander, a minor comment about lsp:
if you add lsp mode to the layers, then ess uses lsp backend. One does not need to define it additionally.
It might be useful to show though, how one can actually switch it off by setting
(ess :variables ess-r-backend 'ess)
;; or like this
;; (ess :variables ess-r-backend t)
in case lsp layer is installed.
Maybe it is worth to mention/demonstrate nice navigation and search features:
SPS j i
to jump to definitions inside a buffer, SPS s s
and SPS s p
to search an expression in a buffer and the whole project.
Thanks, I didn't know about the SPC j
and SPC s
functionality! That's awesome. I've made some edits and added you to the acknowledgements https://github.com/ess-intro/presentation-ess-from-spacemacs/commit/0043290bf7da3adc219ae374a691fa6c16024657
I don't particularly want to dwell too much on the LSP stuff in case it distracts from the overall Spacemacs vibe.
The ESS backend is insufficient for reasonable level of R programming. It's not worth introducing without LSP.
The ESS backend is insufficient for reasonable level of R programming. It's not worth introducing without LSP.
It is more a matter of preference.
Nope. ESS doesn't handle C/C++, which means you need to install that layer and learn the c/c++ workflow. LSP provides a unified workflow.
I have very little experience with LSP, the defaults have served me fine so far, so I'm not really sure what to say about it. If you'd like to contribute additional comments, I'm open to PRs.
Just a simple question, how do you deal with C/C++ files in a R package within ESS?
I only really use R for scripting, so haven't really needed to work with bit R/C/C++ codebases.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
I wish there was an easy way to exclude issues or PRs from being marked stale
Just make a comment and the stale label is removed.
I set up ess with lisp backend, and lost auto-completion of paths in R buffers. Any suggestions for fix?
Sorry, I can't offer any help, but can confirm that I'm having the same issue. File paths do hyperlink to the file though, so maybe this takes preference over the completion?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!