[ESS] ESS unable to find R on Linux when emacs started by opening a .R file
Gavin Simpson
ucfagls at gmail.com
Wed Jul 15 21:12:53 CEST 2015
Dear list,
I've been re-setting up my laptop after upgrading my Fedora installation to
Fedora 22. I run a locally built R (in ~/R/build/3.2-patched) with a sym
link to the R executable located in ~/bin. I am using the github version of
ESS (setup today).
I can start R in a bash shell in the usual way (typing R), and from within
Emacs shell after M-x shell. I can also do M-x R in a clean Emacs session
(no files loaded into buffers). What is not working for me is starting R
within Emacs via M-x R when I have a .R file open in the Emacs buffer.
Instead I see "Searching for program: no such file or directory, R" after I
accept the suggestion for the starting directory.
Anyone know what is going on here and how to solve this issue?
TIA
Gavin
My .emacs contains:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(display-battery-mode t)
'(inhibit-startup-screen t)
'(show-paren-mode t)
'(size-indication-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Fira Mono" :foundry "CTDB" :slant normal :weight
normal :height 113 :width normal)))))
(add-to-list 'load-path "~/R/ess/lisp/")
(load "ess-site")
;(setq ess-use-auto-complete 'script-only)
;(setq ess-tab-complete-in-script t)
(setq ess-first-tab-never-complete t)
(delete-selection-mode 1)
;;; ESS
(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)))))
(setq ess-nuke-trailing-whitespace-p 'ask)
;; or even
;; (setq ess-nuke-trailing-whitespace-p t)
;;; Perl
(add-hook 'perl-mode-hook
(lambda () (setq perl-indent-level 4)))
(add-to-list 'custom-theme-load-path
"~/.emacs.d/emacs-color-theme-solarized")
(load-theme 'solarized t)
--
Gavin Simpson, PhD
[[alternative HTML version deleted]]
More information about the ESS-help
mailing list