[R-sig-Debian] elpa-ess fails to initialize after update to 18.10 on ubuntu bionic

Dirk Eddelbuettel edd @ending from debi@n@org
Tue Oct 23 04:45:11 CEST 2018


Hi Chris,

On 22 October 2018 at 22:22, Chris Sims wrote:
| The latest ess and elpa-ess 18.10-1bionic0 packages for ubuntu leave
| ess unable to find initialization files when it is invoked from R via
| M-x R.  I've found a workaround by creating a soft link:
| 
| cd /usr/share
| sudo ln -s /usr/share/emacs/site-lisp/elpa-src/ess-18.10 ess
| 
| but this may be a widespread problem.  It appeared on each of the three
| computers on which I updated the packages, and survived complete
| removal, followed by reinstallation of the packages, and also
| reinstallation of elpa-ess alone.  The workaround seems ok on all three
| computers.

I am truly sorry.

I tested this on my computer before I uploaded 18.10, and "it worked for me"
here (Ubuntu 18.04) with the package I uploaded to Debian (these are just
elisp code, so easy to share between the distros).  And I now got elpa-ess
"back" via the CRAN mirroring of Michael's Ubuntu builds of our packages. And
it still works.

Also note that upstream rewrote / updated the docs on this. I found that to
be useful reading -- please see eg

   Section 2: Installation
   http://ess.r-project.org/Manual/ess.html#Installation

and particularly

   Section 2.3: Activating and Loading ESS
   http://ess.r-project.org/Manual/ess.html#Activating-and-Loading-ESS

Now, while I install this from the .deb I prepare, I also use / switch to
(M)ELPA.  And Section 2.3 stronly suggests it influences how it loads.

Could you give that a read?

For what it is worth, I have this in my (decades-old, messy) .emacs:

First me make sure 'packages work' for Emacs. Apparently here the line about
"(package-initialize)" matters a lot. I only really activate this when I
first converted ess to elpa-ess.  As I am told, this make package init themselves.

   (require 'package)
   (add-to-list 'package-archives '("marmalade" . "https://marmalade-repo.org/packages/"))
   (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
   (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t)
   (package-initialize)

and after that it goes straight into actually setting up ess -- the same
indent block I had for 20+ years:

   (add-hook 'ess-mode-hook
             (lambda ()
                (ess-set-style 'C++ 'quiet)
                ;; Because
                ;;                                 DEF GNU BSD K&R C++
                ;; ess-indent-level                  2   2   8   5   4
                ;; ess-continued-statement-offset    2   2   8   5   4
                ;; ess-brace-offset                  0   0  -8  -5  -4
                ;; ess-arg-function-offset           2   4   0   0   0
                ;; ess-expression-offset             4   2   8   5   4
                ;; ess-else-offset                   0   0   0   0   0
                ;; ess-close-brace-offset            0   0   0   0   0
                (add-hook 'local-write-file-hooks
                          (lambda ()
                            (ess-nuke-trailing-whitespace)))))

and so on.

One observation I have is that we (pre-ELPA) had /etc/emacs/site-start.d/50ess.el.
It sets a path (but this is harder now as the path has the version number
embedded, as also shown in your snippet). But ... as I longer needed it, and
ELPA seems to cover this, I thought we were good.

So maybe we do need the startup file for as long as not every user activates
packages-initialize ?

I hope we get this squared away. I actually did ask upstream for help at some
point, but let's just say that it didn't go to well. CCing two of the ESS
team member though.

Best,  Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-SIG-Debian mailing list