emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
614 stars 160 forks source link

Difficulty installing ESS from MELPA #1165

Open markseeto opened 2 years ago

markseeto commented 2 years ago

Thanks for the ESS package. I'm using Vincent Goulet's modified Emacs 27.1 for Windows, with ESS 18.10.2, on a Windows 10 computer, but the problem described below also happens with Vincent's modified Emacs 27.2.

I want to install the latest ESS from MELPA, but I'm having trouble installing it. I did M-x package-list-packages, then went down the list to ess, then pressed i, then pressed x.

The installation process seemed to get "stuck" with the message Checking c:/Users/marks/.emacs.d/elpa/ess-20211006.2210... being displayed. After about 10 minutes, I stopped the installation process using C-g. In the list of packages, it now says ess 20211006.2210 has Status "installed", but I'm doubtful about whether it has installed correctly.

The directory C:\Users\marks.emacs.d\elpa\ess-20211006.2210 contains only 48 items, whereas C:\Users\marks.emacs.d\elpa\ess-18.10.2 contains 134 items.

I restarted Emacs, and when I start R, there is a message Symbol's function definition is void: ess-local-process-name, which doesn't normally happen. When I do C-h v ess-version, it says "18.10.3snapshot".

When I send a command from a .R file to the R console buffer, the command is sent successfully, but there is a message Error running timer 'ess--idle-timer-function': (void-function ess-local-process-name), which doesn't normally happen.

For comparison, I tried installing the packages 0blayout and 2048-game from MELPA, and they both finished successfully within about one second, with message Operation finished. Packages that are no longer needed: 7. Type 'M-x package-autoremove' to remove them.

Based on the error messages, and the installation process appearing not to finish successfully, and having only 48 items in C:\Users\marks.emacs.d\elpa\ess-20211006.2210 compared to 134 items in C:\Users\marks.emacs.d\elpa\ess-18.10.2, I'm assuming that the new ESS was not installed correctly.

I've tried installing again at different times and the same thing happens.

What can I do to troubleshoot the installation process?

Thanks.

mikegilchrist commented 2 years ago

I'm running Emacs 26.3 on MATE 20.04.3 and have similar issues after updating my melpa repo (which gave me ess-20211231.1746). Fortunately, I hadn't deleted my old one and reverting to ess-20201004.1522 solved these problems.

lionel- commented 2 years ago

What can I do to troubleshoot the installation process?

Can you see from the compilation output which file gets stuck? If so, maybe try to load it manually, then compile it manually? That's where I would start. Compile-time dependencies might make this a bit tricky, make sure to load the dependencies as well.

mikegilchrist commented 2 years ago

Mine compiles without any errors. I get the messages when I try to use it. Also, it seemed to work when I used the non-compiled (.el) file.

markseeto commented 2 years ago

Can you see from the compilation output which file gets stuck?

Thanks for your reply Lionel. I can't see which file gets stuck, although I might not be looking in the right place. It gets stuck at Checking c:/Users/marks/.emacs.d/elpa/ess-20211231.1746...

I'll be very happy when a new version becomes available on MELPA Stable. Version 18.10.2 is good, but the incorrect line breaks that sometimes appear in output after <NA> can be annoying.

mikegilchrist commented 1 year ago

I just tried using ess-20220815.2020, but got the error message ess-command: Symbol’s function definition is void: ess-local-process-name, similar to before.

Additional observation:

  1. When I started an R session by evaluating code in a .Rmd file, the first command of setwd() set the directory to "../../" relative to where it would normally be set to.
  2. No other code (such as the code in the .Rmd region I was trying to evaluate) was sent to the R session.
  3. markseeto's fix in the other bug that mentions this does not fix it.
  4. As before, reverting to ess-20201004.1522, does fix this.
mikegilchrist commented 9 months ago

I'm still having this issue if I try to use the latest version of ess. I do have some addition info. I realized there's an *ESS* buffer created and it has the following information.

(R): ess-dialect=R, buf=final_analyses_and_plots.Rmd[R], start-arg=nil
 current-prefix-arg=nil
(inferior-ess: waiting for process to start (before hook)
(inferior-ess): waiting for process (after hook)
Failed to start ESSR