diff --git a/lisp/ess-r-mode.el b/lisp/ess-r-mode.el index ff092b73b..dba310fa8 100644 --- a/lisp/ess-r-mode.el +++ b/lisp/ess-r-mode.el @@ -1554,7 +1554,12 @@ download step is omitted. This function returns t if the ESSR load is successful, and nil otherwise." (let ((loader (ess-file-content (expand-file-name "ESSR/LOADREMOTE" ess-etc-directory)))) (or (with-temp-message "Fetching and loading ESSR into the remote ..." - (ess-boolean-command (format loader essr-version))) + (let ((essr (or essr-version + ;; FIXME: Hack: on MELPA essr-version is not set + (lm-with-file (expand-file-name "ess.el" ess-lisp-directory) + (lm-header "ESSR-Version")) + (error "`essr-version' could not be automatically inferred from ess.el file")))) + (ess-boolean-command (format loader essr-version)))) (let ((errmsg (with-current-buffer " *ess-command-output*" (buffer-string)))) (message (format "Couldn't load or download ESSR.rds on the remote.\n Error: %s\n Injecting local copy of ESSR." errmsg)) nil)))) diff --git a/lisp/ess.el b/lisp/ess.el index 2db3daa68..0cb0141b5 100644 --- a/lisp/ess.el +++ b/lisp/ess.el @@ -51,19 +51,17 @@ (require 'ess-utils) (require 'cl-generic) - +(require 'lisp-mnt) (defvar reporter-prompt-for-summary-p) ;; Versions (defconst ess-version (eval-when-compile - (require 'lisp-mnt) (lm-version (or load-file-name buffer-file-name))) "Version of ESS currently loaded.") (defconst essr-version (eval-when-compile - (require 'lisp-mnt) (lm-with-file (or load-file-name buffer-file-name) (lm-header "ESSR-Version"))) "Version of ESSR package.")