Re: [ESS] ESS M-x R failing in a Windows installation
> Sparapani, Rodney via ESS-help > on Wed, 10 Mar 2021 15:40:05 + writes: > Hi Jeremie: As you say, Windows installs do depend on the > user’s preferences. However, in ancient ESS (circa 2004), > we coded around this by going to the Windows registry. > However, I have rarely used Windows since so I can’t say > how that approach might be used today (or if it is, how it > might be failing). I think a big issue is that few (if > any) ESS developers are using Windows. Rich was probably > the rear guard and he switched to Mac. Actually, I use ESS + R on a Windows server (I log into in a window on my Linux Desktop/notebook) every couple of weeks or so, to test R things (notably those that I know are platform dependent, e.g., all my numeric / accuracy experiments/research). I have many (half a dozen to a dozen) versions of R installed on that server, but indeed M-x R had stopped many months ago, but the current workaround for me has always been to M-x R-[tab] [tab] = tabulator for "tab completion" in Emacs, and then choose from the possible completions which do show both the 32-bit and 64-bit versions of every version of R (see above). Martin > PS. the old registry discussions are probably in the > archives https://stat.ethz.ch/pipermail/ess-help/ > -- > Rodney Sparapani, Associate Professor of Biostatistics > Chair ISBA Section on Biostatistics and Pharmaceutical > Statistics Institute for Health and Equity, Division of > Biostatistics Medical College of Wisconsin, Milwaukee > Campus > [[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] ESS M-x R failing in a Windows installation
[Re-sending, as my prior reply seems to have been problematic] Hi, While not a Windows user, I am on macOS, I might point out the R Windows FAQ: https://cran.r-project.org/bin/windows/base/rw-FAQ.html which has a section on installation and customization. The relevant reference for the current version of R (4.0.4) and the registry is here: https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-use-the-Registry_003f Note, that saving the version information to the registry is an optional part of the Windows install process. So, the presence of the registry keys is not guaranteed. There may be other relevant FAQ entries as well. Regards, Marc Schwartz Sparapani, Rodney via ESS-help wrote on 3/10/21 1:28 PM: Hi Gang: Just to follow-up on my own post. I see that the Windows Registry was discussed here in June of 2012 and March of 2013 (not 2004 which was my initial guess). But, whether that even exists in modern Windows, IDK! Here are the most relevant snippets… On 06/15/2012 12:06 PM, Rodney Sparapani wrote: Hi Paul: Very nice thoughts. I'm just going to react to this part which seems to be the most straightforward. I think you can call this from elisp. But, the problem with this code is that it doesn't work, does it? Here's what I get on Windows XP: H:\>reg query hklm\software\R-core\R /v InstallPath Error: The system was unable to find the specified registry key or value H:\>reg query hklm\software\wow6432Node\r-core\r /v InstallPath Error: The system was unable to find the specified registry key or value What do you see? Rodney Oh, hang on. For me, I need H:\>reg query hkcu\software\R-core\R /v InstallPath ! REG.EXE VERSION 3.0 HKEY_CURRENT_USER\software\R-core\R InstallPath REG_SZ C:\Documents and Settings\rsparapa.MCWCORP\My Documents\R\R-2.14.2 Ok, I think I see what is going on. You need to check each ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] REG QUERY KeyName [/v ValueName | /ve] [/s] KeyName[\Machine\]FullKey Machine - Name of remote machine, omitting defaults to the current machine Only HKLM and HKU are available on remote machines FullKey - in the form of ROOTKEY\SubKey name ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] SubKey - The full name of a registry key under the selected ROOTKEY /v query for a specific registry key ValueName - The name, under the selected Key, to query if omitted, all values under the Key are queried /ve query for the default value or empty value name /s queries all subkeys and values So, that code is incomplete. But, it could easily be adapted. Rodney On 03/28/2013 01:42 PM, Ross Boylan wrote: BTW, the path is available in the registry at HKEY_CURRENT_USER\Software\R-core\R\2.15.3 under InstallPath. There is also an entry that uses \R32\ instead of \R\ in the registry tree. Something like this has been suggested before (for example, see the discussion from June 15th). There are a few problems here: 1) Generally, ESS developers are not cracker-jack Windows developers. 2) There have been MAJOR changes in Windows especially 7 and 8 which may (or may not) be at issue here; for example, multi-user installs of ESS require omniscience. 3) it is not obvious to me why we need to search both the HKLM and HKCU root keys (and perhaps others as well?!?). So, I don't see this suggestion being acted on UNLESS there is a Windows developer lurking out there who wants to work on ESS. But, thanks anyways ;o) -- Rodney Sparapani, Associate Professor of Biostatistics Chair ISBA Section on Biostatistics and Pharmaceutical Statistics Institute for Health and Equity, Division of Biostatistics Medical College of Wisconsin, Milwaukee Campus [[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] ESS M-x R failing in a Windows installation
Hello, I suspect there is a bug regarding the variable ess-rterm-version-paths It is now available in ess-custom.el but is nil by default. This should not be the case. It should have the value (setq ess-rterm-version-paths (ess-flatten-list (delete-dups (if (not ess-directory-containing-R) (if (getenv "ProgramW6432") (let ((P-1 (getenv "ProgramFiles(x86)")) (P-2 (getenv "ProgramFiles(x64)"))) (nconc ;; Always 32 on 64 bit OS, nil on 32 bit OS (ess-find-rterm (concat P-1 "/R/") "bin/Rterm.exe") (ess-find-rterm (concat P-1 "/R/") "bin/i386/Rterm.exe") ;; Keep this both for symmetry and because it can happen: (ess-find-rterm (concat P-1 "/R/") "bin/x64/Rterm.exe") ;; Always 64 on 64 bit OS, nil on 32 bit OS (ess-find-rterm (concat P-2 "/R-4.03/") "bin/Rterm.exe") (ess-find-rterm (concat P-2 "/R-4.03/") "bin/i386/Rterm.exe") (ess-find-rterm (concat P-2 "/R-4.03/") "bin/x64/Rterm.exe"))) (let ((PF (getenv "ProgramFiles"))) (nconc ;; Always 32 on 32 bit OS, depends on 32 or 64 process on 64 bit OS (ess-find-rterm (concat PF "/R/") "bin/Rterm.exe") (ess-find-rterm (concat PF "/R/") "bin/i386/Rterm.exe") (ess-find-rterm (concat PF "/R/") "bin/x64/Rterm.exe" (let ((PF ess-directory-containing-R)) (nconc (ess-find-rterm (concat PF "/R/") "bin/Rterm.exe") (ess-find-rterm (concat PF "/R/") "bin/i386/Rterm.exe") (ess-find-rterm (concat PF "/R/") "bin/x64/Rterm.exe"))) as in ess-r-mode.el. Please check again as I may have modified it. Best regards, Jeremie On Wednesday, 10 Mar 2021 at 15:40, Sparapani, Rodney via ESS-help wrote: > Hi Jeremie: > > As you say, Windows installs do depend on the user’s preferences. > However, in ancient ESS (circa 2004), we coded around this by > going to the Windows registry. However, I have rarely used > Windows since so I can’t say how that approach might be > used today (or if it is, how it might be failing). I think a big > issue is that few (if any) ESS developers are using Windows. > Rich was probably the rear guard and he switched to Mac. > > PS. the old registry discussions are probably in the archives > https://stat.ethz.ch/pipermail/ess-help/ > > -- > Rodney Sparapani, Associate Professor of Biostatistics > Chair ISBA Section on Biostatistics and Pharmaceutical Statistics > Institute for Health and Equity, Division of Biostatistics > Medical College of Wisconsin, Milwaukee Campus > > [[alternative HTML version deleted]] > > __ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help -- Jeremie Juste __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
__ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
Hi Rodney, HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R\4.0.3\InstallPath and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\R-core\R\4.0.3\InstallPath both exist in my Windows 10 installation. Best, Steve On 3/10/21 1:28 PM, Sparapani, Rodney via ESS-help wrote: Hi Gang: Just to follow-up on my own post. I see that the Windows Registry was discussed here in June of 2012 and March of 2013 (not 2004 which was my initial guess). But, whether that even exists in modern Windows, IDK! Here are the most relevant snippets… On 06/15/2012 12:06 PM, Rodney Sparapani wrote: Hi Paul: Very nice thoughts. I'm just going to react to this part which seems to be the most straightforward. I think you can call this from elisp. But, the problem with this code is that it doesn't work, does it? Here's what I get on Windows XP: H:\>reg query hklm\software\R-core\R /v InstallPath Error: The system was unable to find the specified registry key or value H:\>reg query hklm\software\wow6432Node\r-core\r /v InstallPath Error: The system was unable to find the specified registry key or value What do you see? Rodney Oh, hang on. For me, I need H:\>reg query hkcu\software\R-core\R /v InstallPath ! REG.EXE VERSION 3.0 HKEY_CURRENT_USER\software\R-core\R InstallPath REG_SZ C:\Documents and Settings\rsparapa.MCWCORP\My Documents\R\R-2.14.2 Ok, I think I see what is going on. You need to check each ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] REG QUERY KeyName [/v ValueName | /ve] [/s] KeyName[\Machine\]FullKey Machine - Name of remote machine, omitting defaults to the current machine Only HKLM and HKU are available on remote machines FullKey - in the form of ROOTKEY\SubKey name ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] SubKey - The full name of a registry key under the selected ROOTKEY /v query for a specific registry key ValueName - The name, under the selected Key, to query if omitted, all values under the Key are queried /ve query for the default value or empty value name /s queries all subkeys and values So, that code is incomplete. But, it could easily be adapted. Rodney On 03/28/2013 01:42 PM, Ross Boylan wrote: BTW, the path is available in the registry at HKEY_CURRENT_USER\Software\R-core\R\2.15.3 under InstallPath. There is also an entry that uses \R32\ instead of \R\ in the registry tree. Something like this has been suggested before (for example, see the discussion from June 15th). There are a few problems here: 1) Generally, ESS developers are not cracker-jack Windows developers. 2) There have been MAJOR changes in Windows especially 7 and 8 which may (or may not) be at issue here; for example, multi-user installs of ESS require omniscience. 3) it is not obvious to me why we need to search both the HKLM and HKCU root keys (and perhaps others as well?!?). So, I don't see this suggestion being acted on UNLESS there is a Windows developer lurking out there who wants to work on ESS. But, thanks anyways ;o) -- Rodney Sparapani, Associate Professor of Biostatistics Chair ISBA Section on Biostatistics and Pharmaceutical Statistics Institute for Health and Equity, Division of Biostatistics Medical College of Wisconsin, Milwaukee Campus [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help -- Steve Gutreuter __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
Hi Gang: Just to follow-up on my own post. I see that the Windows Registry was discussed here in June of 2012 and March of 2013 (not 2004 which was my initial guess). But, whether that even exists in modern Windows, IDK! Here are the most relevant snippets… On 06/15/2012 12:06 PM, Rodney Sparapani wrote: > Hi Paul: > > Very nice thoughts. I'm just going to react to this part which seems > to be the most straightforward. I think you can call this from elisp. > But, the problem with this code is that it doesn't work, does it? Here's > what I get on Windows XP: > > H:\>reg query hklm\software\R-core\R /v InstallPath > > Error: The system was unable to find the specified registry key or value > > H:\>reg query hklm\software\wow6432Node\r-core\r /v InstallPath > > Error: The system was unable to find the specified registry key or value > > What do you see? > > Rodney > Oh, hang on. For me, I need H:\>reg query hkcu\software\R-core\R /v InstallPath ! REG.EXE VERSION 3.0 HKEY_CURRENT_USER\software\R-core\R InstallPath REG_SZ C:\Documents and Settings\rsparapa.MCWCORP\My Documents\R\R-2.14.2 Ok, I think I see what is going on. You need to check each ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] REG QUERY KeyName [/v ValueName | /ve] [/s] KeyName[\Machine\]FullKey Machine - Name of remote machine, omitting defaults to the current machine Only HKLM and HKU are available on remote machines FullKey - in the form of ROOTKEY\SubKey name ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ] SubKey - The full name of a registry key under the selected ROOTKEY /v query for a specific registry key ValueName - The name, under the selected Key, to query if omitted, all values under the Key are queried /ve query for the default value or empty value name /s queries all subkeys and values So, that code is incomplete. But, it could easily be adapted. Rodney On 03/28/2013 01:42 PM, Ross Boylan wrote: > BTW, the path is available in the registry at > HKEY_CURRENT_USER\Software\R-core\R\2.15.3 under InstallPath. There is > also an entry that uses \R32\ instead of \R\ in the registry tree. Something like this has been suggested before (for example, see the discussion from June 15th). There are a few problems here: 1) Generally, ESS developers are not cracker-jack Windows developers. 2) There have been MAJOR changes in Windows especially 7 and 8 which may (or may not) be at issue here; for example, multi-user installs of ESS require omniscience. 3) it is not obvious to me why we need to search both the HKLM and HKCU root keys (and perhaps others as well?!?). So, I don't see this suggestion being acted on UNLESS there is a Windows developer lurking out there who wants to work on ESS. But, thanks anyways ;o) -- Rodney Sparapani, Associate Professor of Biostatistics Chair ISBA Section on Biostatistics and Pharmaceutical Statistics Institute for Health and Equity, Division of Biostatistics Medical College of Wisconsin, Milwaukee Campus [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
Hi Jeremie: As you say, Windows installs do depend on the user’s preferences. However, in ancient ESS (circa 2004), we coded around this by going to the Windows registry. However, I have rarely used Windows since so I can’t say how that approach might be used today (or if it is, how it might be failing). I think a big issue is that few (if any) ESS developers are using Windows. Rich was probably the rear guard and he switched to Mac. PS. the old registry discussions are probably in the archives https://stat.ethz.ch/pipermail/ess-help/ -- Rodney Sparapani, Associate Professor of Biostatistics Chair ISBA Section on Biostatistics and Pharmaceutical Statistics Institute for Health and Equity, Division of Biostatistics Medical College of Wisconsin, Milwaukee Campus [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
Hello Steve, Is there any reason for this downgrade? In general R is harder to find on windows because installation configuration depends too much on the user. It might be a good idea to live it to the user in this case. A possible solution is to take the override the default command. For instance on a windows setting, locate Rterm.exe, wherever it may be. I have a window config R is in D directory: "d:/R/R-4.0.3/bin/x64/Rterm.exe" Then in the init.el file override the ess-rterm-version-paths variable (setq ess-rterm-version-paths '("d:/R/R-4.0.3/bin/x64/Rterm.exe")) Then M-x R-newest, should let through. I have even binded it to a key (global-set-key (kbd "C-'") 'R-newest) HTH, Jeremie On Friday, 5 Mar 2021 at 17:26, Steve Gutreuter wrote: > Thank you Jeremie. > > M-x ess-r-newest returns "[No match]" on my system. > > Does it not seem odd that everything worked properly until I > downgraded from emacs-27.1-modified-1.exe to > emacs-26.1-modified-2.exe? > > Again, thanks, > > Steve > On Wednesday, 10 Mar 2021 at 09:59, Dominic Steinitz via ESS-help wrote: > I am not on windows but for me a way round this is to start R in a shell (in > emacs) and then ess-remote. I’ve moved on to using direnv and lorri but > that’s not an option for windows. > > Dominic Steinitz > domi...@steinitz.org > http://idontgetoutmuch.org > Twitter: @idontgetoutmuch > >> >> 1. Re: ESS M-x R failing in a Windows installation (Jeremie Juste) >> >> ------ >> >> Message: 1 >> Date: Fri, 05 Mar 2021 22:37:44 +0100 >> From: Jeremie Juste >> To: Steve Gutreuter via ESS-help >> Subject: Re: [ESS] ESS M-x R failing in a Windows installation >> Message-ID: <87eegtxown@gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hello Steve, >> >> Yest this is a known problem on windows. >> >> A temporary solution might be to use the command M-x ess-r-newest. >> For my part I have rebinded the above command to a key C-'. >> It is not the best solution but it works for me. >> If I come up with a better fix I'll update. >> >> HTH, >> Jeremie >> >> >> >> >> On Friday, 5 Mar 2021 at 15:51, Steve Gutreuter via ESS-help wrote: >>> M-x R is returning the message "Searching for program: No such file or >>> directory, Rterm" under MS Windows. >>> >>> R 4.0.3 is installed in c:\Program Files\R\4.0.3, and Rterm.exe is >>> present in c:/Program Files/R/R-4.0.3/bin/x64. >>> My path environment variable includes c:\Program Files\R\4.0.3. >>> R starts fine outside of Emacs. >>> My .emacs file includes: >>>(require 'ess-rutils) >>>(setq inferior-ess-r-program "c:/Program >>> Files/R/R-4.0.3/bin/x64/Rterm.exe) >>> I am using Vincent Goulet's emacs-26.1-modified-2.exe and >>> emacs-27.1-modified-1.exe which bundle ESS within the Emacs >>> installation. >>> Everything worked fine under Emacs 26.1 and earlier. I upgraded to >>> Emacs 27.1 and M-x R still worked. I backed down to Emacs 26.1 and >>> now M-x R is broken. >>> >>> I am baffled as to why ESS is not finding R. Any clues? >>> >>> Many thanks >> >> -- >> Jeremie Juste >> > > [[alternative HTML version deleted]] > > __ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > -- Jeremie Juste __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
I am not on windows but for me a way round this is to start R in a shell (in emacs) and then ess-remote. I’ve moved on to using direnv and lorri but that’s not an option for windows. Dominic Steinitz domi...@steinitz.org http://idontgetoutmuch.org Twitter: @idontgetoutmuch > > 1. Re: ESS M-x R failing in a Windows installation (Jeremie Juste) > > -- > > Message: 1 > Date: Fri, 05 Mar 2021 22:37:44 +0100 > From: Jeremie Juste > To: Steve Gutreuter via ESS-help > Subject: Re: [ESS] ESS M-x R failing in a Windows installation > Message-ID: <87eegtxown@gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello Steve, > > Yest this is a known problem on windows. > > A temporary solution might be to use the command M-x ess-r-newest. > For my part I have rebinded the above command to a key C-'. > It is not the best solution but it works for me. > If I come up with a better fix I'll update. > > HTH, > Jeremie > > > > > On Friday, 5 Mar 2021 at 15:51, Steve Gutreuter via ESS-help wrote: >> M-x R is returning the message "Searching for program: No such file or >> directory, Rterm" under MS Windows. >> >> R 4.0.3 is installed in c:\Program Files\R\4.0.3, and Rterm.exe is >> present in c:/Program Files/R/R-4.0.3/bin/x64. >> My path environment variable includes c:\Program Files\R\4.0.3. >> R starts fine outside of Emacs. >> My .emacs file includes: >>(require 'ess-rutils) >>(setq inferior-ess-r-program "c:/Program >> Files/R/R-4.0.3/bin/x64/Rterm.exe) >> I am using Vincent Goulet's emacs-26.1-modified-2.exe and >> emacs-27.1-modified-1.exe which bundle ESS within the Emacs >> installation. >> Everything worked fine under Emacs 26.1 and earlier. I upgraded to >> Emacs 27.1 and M-x R still worked. I backed down to Emacs 26.1 and >> now M-x R is broken. >> >> I am baffled as to why ESS is not finding R. Any clues? >> >> Many thanks > > -- > Jeremie Juste > [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ESS M-x R failing in a Windows installation
Hello Steve, Yest this is a known problem on windows. A temporary solution might be to use the command M-x ess-r-newest. For my part I have rebinded the above command to a key C-'. It is not the best solution but it works for me. If I come up with a better fix I'll update. HTH, Jeremie On Friday, 5 Mar 2021 at 15:51, Steve Gutreuter via ESS-help wrote: > M-x R is returning the message "Searching for program: No such file or > directory, Rterm" under MS Windows. > > R 4.0.3 is installed in c:\Program Files\R\4.0.3, and Rterm.exe is > present in c:/Program Files/R/R-4.0.3/bin/x64. > My path environment variable includes c:\Program Files\R\4.0.3. > R starts fine outside of Emacs. > My .emacs file includes: > (require 'ess-rutils) > (setq inferior-ess-r-program "c:/Program > Files/R/R-4.0.3/bin/x64/Rterm.exe) > I am using Vincent Goulet's emacs-26.1-modified-2.exe and > emacs-27.1-modified-1.exe which bundle ESS within the Emacs > installation. > Everything worked fine under Emacs 26.1 and earlier. I upgraded to > Emacs 27.1 and M-x R still worked. I backed down to Emacs 26.1 and > now M-x R is broken. > > I am baffled as to why ESS is not finding R. Any clues? > > Many thanks -- Jeremie Juste __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
[ESS] ESS M-x R failing in a Windows installation
M-x R is returning the message "Searching for program: No such file or directory, Rterm" under MS Windows. R 4.0.3 is installed in c:\Program Files\R\4.0.3, and Rterm.exe is present in c:/Program Files/R/R-4.0.3/bin/x64. My path environment variable includes c:\Program Files\R\4.0.3. R starts fine outside of Emacs. My .emacs file includes: (require 'ess-rutils) (setq inferior-ess-r-program "c:/Program Files/R/R-4.0.3/bin/x64/Rterm.exe) I am using Vincent Goulet's emacs-26.1-modified-2.exe and emacs-27.1-modified-1.exe which bundle ESS within the Emacs installation. Everything worked fine under Emacs 26.1 and earlier. I upgraded to Emacs 27.1 and M-x R still worked. I backed down to Emacs 26.1 and now M-x R is broken. I am baffled as to why ESS is not finding R. Any clues? Many thanks -- Steve Gutreuter __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help