Hello Tim,
Le vendredi 04 septembre 2020 à 11:25 -0700, Tim Howes a écrit :
> I think, instead of disabling the test or trying to make it work
> with
> emacs 27, I'd like to update emacs-ess to a more recent version.
> Right
> now it's using the latest tagged release (18.10.2), which was from
> 2018,
> but there's been active development on the github repo since then. I
> can
> take the latest commit and give it a version number based on the
> commit
> time, similar to how it's done on melpa (20200903.1516). I'll try
> making
> a patch to update it to that version.
Right, emacs-ess is already a tag. Let's take the latest commit,
82cd308ae54a6b918bbceb235e6bf02f53e48e19
If I run guix hash -xr within the code, I get
0zw6j8jzrdmy41g6313js7c0xlmc2wmiazx4d4wm6hdvykn8q39k
The version would be 20200905.1022
If I do a drop-in replacement, remove the "Fix roxygen preview test."
modification and change the commands to disable julia, I get one other
test that fails:
Test ess-test-r-help-mode condition:
(ert-test-failed
((should
(or
(equal ess-help-object "plot.default")
(equal ess-help-object "plot")))
:form
(or
(equal ess-help-object "plot.default")
(equal ess-help-object "plot"))
:value nil))
The test is in test/ess-test-r.el, line 628.
(ert-deftest ess-test-r-help-mode ()
(with-r-running nil
(let ((ess-pop-to-buffer t))
(ess-display-help-on-object "plot")
(should (equal ess-help-object "plot"))
(should (derived-mode-p 'ess-r-help-mode))
;; Ensure help buffers after button presses are also in
;; `ess-r-help-mode', Bug#836
(forward-button 2)
(push-button)
(should (or (equal ess-help-object "plot.default")
(equal ess-help-object "plot"))) ;; Badaboom
;;(the value is "NULL")
(should (derived-mode-p 'ess-r-help-mode)))))
Looking at its friend, ess-test-r-index-mode, line 643:
(ert-deftest ess-test-r-index-mode ()
(skip-unless (not noninteractive)) ;; negation overflow ;p
(with-r-running nil
(let ((ess-pop-to-buffer t))
(ess-display-package-index "stats")
(should (equal ess-help-object "stats"))
(should (derived-mode-p 'ess-r-help-mode))
;; Ensure help buffers after button presses are also in
;; `ess-r-help-mode', Bug#836
(forward-button 2)
(push-button)
(should (equal ess-help-object "plot.default"))
(should (derived-mode-p 'ess-r-help-mode)))))
it seems that these tests should only run if (not (not (not (not
interactive)))) (i.e. interactive), and ess-test-r-help-mode has missed
a copy-paste.
Also, the license has changed: it is now gpl3+!
Anyway, here is a version that's working (I tested it with "emacs-ess-
next" as a name, but replaced it for this message).
Sorry, I don't know how to make a patch.
Best regards,
divoplade
(define-public emacs-ess
(package
(name "emacs-ess")
(version "20200905.1022")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/emacs-ess/ESS")
(commit "82cd308ae54a6b918bbceb235e6bf02f53e48e19")))
(sha256
(base32
"0zw6j8jzrdmy41g6313js7c0xlmc2wmiazx4d4wm6hdvykn8q39k"))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
'(begin
;; Stop ESS from trying to bundle an external julia-mode.el.
(substitute* "lisp/Makefile"
(("JULIAS := julia-mode.el julia-mode-latexsubs.el") "JULIAS ="))
(substitute* "Makefile"
(("$(MAKE) julia-mode.el") ""))
(substitute* "test/Makefile"
(("lisp: julia") "lisp:"))
;; It looks like this test misses a paste
(substitute* "test/ess-test-r.el"
(("\\(ert-deftest ess-test-r-help-mode \\(\\)") "(ert-deftest ess-test-r-help-mode () (skip-unless (not noninteractive))"))
;; Include *.el files in install target.
(substitute* "lisp/Makefile"
(("\t\\$\\(INSTALL) \\$\\(ELC\\) \\$\\(LISPDIR\\)" elc)
(string-append "\t$(INSTALL) $(ELS) ess-autoloads.el "
"$(LISPDIR)\n" elc)))
;; Only build docs in info format.
(substitute* "doc/Makefile"
(("all : info text")
"all : info")
(("install: install-info install-other-docs")
"install: install-info"))
;; Stop install-info from trying to update the info directory.
(substitute* "doc/Makefile"
((".*\\$\\(INFODIR\\)/dir.*") ""))
#t))))
(build-system gnu-build-system)
(arguments
(let ((base-directory "/share/emacs/site-lisp"))
`(#:make-flags (list (string-append "PREFIX=" %output)
(string-append "ETCDIR=" %output
,base-directory "/etc")
(string-append "LISPDIR=" %output
,base-directory))
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-before 'build 'more-shebang-patching
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "Makeconf"
(("SHELL = /bin/sh")
(string-append "SHELL = " (which "sh"))))
#t))
(replace 'check
(lambda _
(invoke "make" "test")))))))
(inputs
`(("emacs" ,emacs-minimal)
("r-minimal" ,r-minimal)))
(native-inputs
`(("perl" ,perl)
("r-roxygen2" ,r-roxygen2)
("texinfo" ,texinfo)))
(propagated-inputs
`(("emacs-julia-mode" ,emacs-julia-mode)))
(home-page "https://ess.r-project.org/")
(synopsis "Emacs mode for statistical analysis programs")
(description "Emacs Speaks Statistics (ESS) is an add-on package for GNU
Emacs. It is designed to support editing of scripts and interaction with
various statistical analysis programs such as R, Julia, and JAGS.")
(license license:gpl3+)))