Discussion:
[R-sig-Debian] elpa-ess fails to initialize after update to 18.10 on ubuntu bionic
Chris Sims
2018-10-23 02:22:43 UTC
Permalink
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.
Dirk Eddelbuettel
2018-10-23 02:45:11 UTC
Permalink
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 | ***@debian.org
Dirk Eddelbuettel
2018-10-23 11:33:44 UTC
Permalink
Chris,

For what it is worth, I made two more tests:

- on my system 'M-x R' as well as the suggested-in-the-ESS-documentation
'M-x ess-version' both work whether or not I have my ~/.emacs -- so
somehow system path must work

- I have the .el files in the default directory:
/usr/share/emacs/site-lisp/elpa-src/ess-18.10

- They are also symlinked each into
/usr/share/emacs25/site-lisp/elpa/ess-18.10/
which also contains the 'compiled' .elc files

"Works here" and I currently have no suggestion as to what to fix on your end.

Best, Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Dirk Eddelbuettel
2018-10-24 17:13:25 UTC
Permalink
As a follow-up, I now also received a Debian bug report email from Sebastian
Meyer (CC'ed) with some helpful detective work I should have done -- my
packaging was still setting ess-site.el to the wrong (old) path.

I fixed this in a new build 18.10-1-2. Before I toss that at the Debian
build servers (and Michael for his Ubuntu builds), could anyone who has an
issue please test it? Thes ess and elpa-ess deb files are here for now:

http://dirk.eddelbuettel.com/tmp/ess/

It's just a directory, not an apt repo, so you need to download eg
http://dirk.eddelbuettel.com/tmp/ess/elpa-ess_18.10-1-2_all.deb
and then install it.

These "work for me" but then I also did not have that recent issue.
Testing feedback (on list or off-list) would be much appreciated.

Thanks, Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Paul Johnson
2018-10-24 19:49:54 UTC
Permalink
Post by Dirk Eddelbuettel
It's just a directory, not an apt repo, so you need to download eg
http://dirk.eddelbuettel.com/tmp/ess/elpa-ess_18.10-1-2_all.deb
and then install it.
These "work for me" but then I also did not have that recent issue.
Testing feedback (on list or off-list) would be much appreciated.
Thanks, Dirk
--
Hello, Dirk

It looks OK from my end.

On my Ubuntu 18.1 system, I did not see the problem described above.
However, today I saw some other wrinkles and I have installed your
package and it works as well. M-R does cause an R session to open.
I see an explicit setwd() function call in the R inferior session,
I've not noticed that before. Otherwise, no damage from the new deb
file.

The standard keyboard shortcuts like C-c C-n work work fine too. The
buttons like "->" and eval region seem OK.

I have some other problems to fix, but I don't think they are related
to packaging.

Thanks for your effort

PJ
--
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.
Dirk Eddelbuettel
2018-10-24 20:28:48 UTC
Permalink
Hi Paul,

On 24 October 2018 at 14:49, Paul Johnson wrote:
| It looks OK from my end.
|
| On my Ubuntu 18.1 system, I did not see the problem described above.

Yes, my Ubuntu 18.04 is fine as well.

| However, today I saw some other wrinkles and I have installed your
| package and it works as well. M-R does cause an R session to open.

(I guess you meant M-x R, presumably ? )

The (updated, nice) ESS docs also recommend M-x ess-version which works of
course too.

| I see an explicit setwd() function call in the R inferior session,
| I've not noticed that before. Otherwise, no damage from the new deb
| file.
|
| The standard keyboard shortcuts like C-c C-n work work fine too. The
| buttons like "->" and eval region seem OK.
|
| I have some other problems to fix, but I don't think they are related
| to packaging.

Ok, I'll probably ship this one then.

| Thanks for your effort

My pleasure.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Steve Gutreuter
2018-10-25 16:15:34 UTC
Permalink
Updates to Linux Mint included an update to ESS. After the update, M-x R
produces:

load ESSR: + + + Error in file(filename, "r", encoding = encoding) :
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file ’/usr/share/ess/etc/ESSR/R/.load.R’: No such file or
directory

Any guesses?

Thanks,

Steve Gutreuter
Post by Dirk Eddelbuettel
Hi Paul,
| It looks OK from my end.
|
| On my Ubuntu 18.1 system, I did not see the problem described above.
Yes, my Ubuntu 18.04 is fine as well.
| However, today I saw some other wrinkles and I have installed your
| package and it works as well. M-R does cause an R session to open.
(I guess you meant M-x R, presumably ? )
The (updated, nice) ESS docs also recommend M-x ess-version which works of
course too.
| I see an explicit setwd() function call in the R inferior session,
| I've not noticed that before. Otherwise, no damage from the new deb
| file.
|
| The standard keyboard shortcuts like C-c C-n work work fine too. The
| buttons like "->" and eval region seem OK.
|
| I have some other problems to fix, but I don't think they are related
| to packaging.
Ok, I'll probably ship this one then.
| Thanks for your effort
My pleasure.
Dirk
--
Steve Gutreuter


[[alternative HTML version deleted]]
Dirk Eddelbuettel
2018-10-25 16:33:06 UTC
Permalink
On 25 October 2018 at 12:15, Steve Gutreuter wrote:
| Updates to Linux Mint included an update to ESS. After the update, M-x R
| produces:
|
| load ESSR: + + + Error in file(filename, "r", encoding = encoding) :
|   cannot open the connection
| In addition: Warning message:
| In file(filename, "r", encoding = encoding) :
|   cannot open file ’/usr/share/ess/etc/ESSR/R/.load.R’: No such file or
| directory
|
| Any guesses?

You are the seventh message in a thread. Did you read the other six, and
particularly mine from yesterday saying

I fixed this in a new build 18.10-1-2. Before I toss that at the Debian
build servers (and Michael for his Ubuntu builds), could anyone who has an
issue please test it? Thes ess and elpa-ess deb files are here for now:

http://dirk.eddelbuettel.com/tmp/ess/

It's just a directory, not an apt repo, so you need to download eg
http://dirk.eddelbuettel.com/tmp/ess/elpa-ess_18.10-1-2_all.deb
and then install it.

These "work for me" but then I also did not have that recent issue.
Testing feedback (on list or off-list) would be much appreciated.

Also, you did not tell us which version you used.

There could be three at least (not knowing what other remixing Mint may use)

18.10-1
18.10-1-1
18.10-1-2

Of these only the last one would contain the fix to the issue you describe.

Dirk

| Thanks,
|
| Steve Gutreuter
|
|
|
| On 10/24/18 4:28 PM, Dirk Eddelbuettel wrote:
| > Hi Paul,
| >
| > On 24 October 2018 at 14:49, Paul Johnson wrote:
| > | It looks OK from my end.
| > |
| > | On my Ubuntu 18.1 system, I did not see the problem described above.
| >
| > Yes, my Ubuntu 18.04 is fine as well.
| >
| > | However, today I saw some other wrinkles and I have installed your
| > | package and it works as well. M-R does cause an R session to open.
| >
| > (I guess you meant M-x R, presumably ? )
| >
| > The (updated, nice) ESS docs also recommend M-x ess-version which works of
| > course too.
| >
| > | I see an explicit setwd() function call in the R inferior session,
| > | I've not noticed that before. Otherwise, no damage from the new deb
| > | file.
| > |
| > | The standard keyboard shortcuts like C-c C-n work work fine too. The
| > | buttons like "->" and eval region seem OK.
| > |
| > | I have some other problems to fix, but I don't think they are related
| > | to packaging.
| >
| > Ok, I'll probably ship this one then.
| >
| > | Thanks for your effort
| >
| > My pleasure.
| >
| > Dirk
| >
| --
| Steve Gutreuter
|
|
| [[alternative HTML version deleted]]
|
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-***@r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Loading...