Re: [ESS] Need help installing ess using M-x package-install-file

2022-12-12 Thread Naresh Gurbuxani via ESS-help
Juste,

Thanks for your suggestions.  At work, I am getting a new computer.  I will 
copy ess directory from old computer (where ess works fine).

Our R version is controlled by the organization.

Thanks,
Naresh

Sent from my iPhone

> On Dec 11, 2022, at 11:04 AM, Jeremie Juste  wrote:
> 
> Hello Naresh,
> 
>> On Saturday, 10 Dec 2022 at 08:46, Naresh Gurbuxani via ESS-help wrote:
>> In my organization, IT security set up disables emacs package
>> installation from package archives (e.g. MELPA) using M-x
>> package-install.  Therefore, I am downloading package tar files from
>> package archives, then using M-x package-install-file command.  This
>> method has successfully installed several packages (e.g., auctex) on
>> my computer.  But with ess, I have run into problems.
> 
> 
> I feel for you. Do you have a personal computer that you can control? I
> see that you are working in a Windows environment. Many times I installed
> all the packages one machine then just copied the .emacs.d directory
> to the other machine, with  most packages working as expected.
> 
> If this is an option for you ESS might work out of the box as well. You
> might just have to let ESS know where to find R.
> 
> |(setq inferior-ess-r-program 
> "c:/Users/JeremieJuste/Documents/R/R-4.2.0/bin/x64/Rterm")
> |(add-to-list 'exec-path "c:/Users/JeremieJuste/Documents/R/R-4.2.0/bin/")
> 
> Alternatively, for ESS you also have the git repo 
> https://github.com/emacs-ess/ESS.
> From that you can switch to branch 18.10.
> 
> You have more information in the manual
> https://ess.r-project.org/Manual/ess.html#Installation.
> 
> 
> 
> As far as I understand ESS is supposed to work even without compiling it
> on your machine. Although it won't provide the best experience but is
> expected to work.
> 
> 
> | (add-to-list 'load-path "/path/to/ESS/lisp")
> | (require 'ess-site)
> | (setq-default inferior-R-program-name
> |"c:/Program Files/Microsoft/R 
> Open/R-3.5.1/bin/x64/Rterm.exe")
> 
> 
> I also note that you are running R 3.5. From the 4.2,
> R uses UTF-8 as the native encoding. This has been a real pain before.
> 
> Please see https://cran.r-project.org/doc/manuals/r-release/NEWS.html
> 
> 
> HTH,
> Jeremie
> 
__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] Need help installing ess using M-x package-install-file

2022-12-11 Thread Jeremie Juste via ESS-help
Hello Naresh,

On Saturday, 10 Dec 2022 at 08:46, Naresh Gurbuxani via ESS-help wrote:
> In my organization, IT security set up disables emacs package
> installation from package archives (e.g. MELPA) using M-x
> package-install.  Therefore, I am downloading package tar files from
> package archives, then using M-x package-install-file command.  This
> method has successfully installed several packages (e.g., auctex) on
> my computer.  But with ess, I have run into problems.


I feel for you. Do you have a personal computer that you can control? I
see that you are working in a Windows environment. Many times I installed
all the packages one machine then just copied the .emacs.d directory
to the other machine, with  most packages working as expected.

If this is an option for you ESS might work out of the box as well. You
might just have to let ESS know where to find R.

|(setq inferior-ess-r-program 
"c:/Users/JeremieJuste/Documents/R/R-4.2.0/bin/x64/Rterm")
|(add-to-list 'exec-path "c:/Users/JeremieJuste/Documents/R/R-4.2.0/bin/")

Alternatively, for ESS you also have the git repo 
https://github.com/emacs-ess/ESS.
>From that you can switch to branch 18.10.

You have more information in the manual
https://ess.r-project.org/Manual/ess.html#Installation.



As far as I understand ESS is supposed to work even without compiling it
on your machine. Although it won't provide the best experience but is
expected to work.


| (add-to-list 'load-path "/path/to/ESS/lisp")
| (require 'ess-site)
| (setq-default inferior-R-program-name
|"c:/Program Files/Microsoft/R 
Open/R-3.5.1/bin/x64/Rterm.exe")


I also note that you are running R 3.5. From the 4.2,
R uses UTF-8 as the native encoding. This has been a real pain before.

Please see https://cran.r-project.org/doc/manuals/r-release/NEWS.html


HTH,
Jeremie

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


[ESS] Need help installing ess using M-x package-install-file

2022-12-10 Thread Naresh Gurbuxani via ESS-help
In my organization, IT security set up disables emacs package installation from 
package archives (e.g. MELPA) using M-x package-install.  Therefore, I am 
downloading package tar files from package archives, then using M-x 
package-install-file command.  This method has successfully installed several 
packages (e.g., auctex) on my computer.  But with ess, I have run into 
problems. 

Here are details.  I used tar file downloaded from MELPA stable archives.  Ess 
homepage also has zip files.  I do not know how to use them to install ess.  

My ess installation went without any error messages (although some files were 
skipped).   
> 
> M-x ess-version
> ess-version: 18.10.2 [] (loaded from 
> c:/Users/ngurbuxani/AppData/Roaming/.emacs.d/elpa/)
>  
But I cannot launch R inferior process. 

> M-x R
> Eager macro-expansion failure: (wrong-number-of-arguments (3 . 4) 2) [2 times]
> define-obsolete-function-alias: Wrong number of arguments: (3 . 4), 2

I am using emacs 28.2
>  
> M-x emacs-version
> GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13
>  
This is my ess setup in int.el file. 
> ;; 
> ;; ESS settings
> ;;
> (defun then_R_operator_ess ()
> "R - %>% operator or 'then' pipe operator for ess mode"
> (interactive)
> (just-one-space 1)
> (insert "%>%")
> (reindent-then-newline-and-indent))
>  
> (defun then_R_operator ()
> "R - %>% operator or 'then pipe operator for inferior mode"
> (interactive)
> (insert " %>% "))  ;no need to go 
> to next line
> ;; Keyboard shortcuts for pipe operators do not work in terminal
> ;; Use M-x
>  
> (use-package ess
> :ensure t
> :defer t
> :config
> (require 'ess-r-mode)
> (load "ess-autoloads")
> ;; (setq-default inferior-R-program-name "Rterm")
> (setq-default inferior-R-program-name
>"c:/Program Files/Microsoft/R 
> Open/R-3.5.1/bin/x64/Rterm.exe")
> (define-key ess-mode-map "_" #'ess-insert-assign)
> (define-key inferior-ess-mode-map "_" #'ess-insert-assign)
> (define-key ess-mode-map (kbd "C->") 'then_R_operator_ess)
> (define-key inferior-ess-mode-map (kbd "C->") 'then_R_operator)
> (setq inferior-ess-r-help-command
>"help(\"%s\", help_type=\"text\")\n") ; display help in emacs
> (show-paren-mode)  ; show matching 
> parentheses
> (setq ess-eval-visibly 'nowait); emacs is available during command run
> )
> ;;
> ;; End ESS settings
> ;;

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help