unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: divoplade <d@divoplade.fr>
To: Tim Howes <timhowes@lavabit.com>, 43093@debbugs.gnu.org
Subject: bug#43093: emacs-ess is broken by emacs 27.1
Date: Mon, 07 Sep 2020 23:19:40 +0200	[thread overview]
Message-ID: <a08c9907f6354c9ed13b6676e558ad96738b2789.camel@divoplade.fr> (raw)
In-Reply-To: <1dcca395-324d-d167-836d-31329e2c3fd7@lavabit.com>

[-- Attachment #1: Type: text/plain, Size: 2922 bytes --]

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

[-- Attachment #2: modified-emacs.scm --]
[-- Type: text/x-scheme, Size: 3489 bytes --]

(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+)))

  reply	other threads:[~2020-09-07 21:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 20:07 bug#43093: emacs-ess is broken by emacs 27.1 divoplade
2020-09-04 14:44 ` bug#43093: Is Emacs 27.1 that breaks emacs-ess? zimoun
2020-09-04 15:26   ` divoplade
2020-09-04 17:00     ` Mark H Weaver
2020-09-04 18:09     ` zimoun
2020-09-04 18:25 ` bug#43093: emacs-ess is broken by emacs 27.1 Tim Howes via Bug reports for GNU Guix
2020-09-07 21:19   ` divoplade [this message]
2020-09-07 21:43     ` divoplade
2020-09-07 21:52     ` divoplade
2020-09-08 19:24       ` Tim Howes via Bug reports for GNU Guix
2020-09-04 23:25 ` bug#43093: [PATCH] gnu: emacs-ess: Update to 20200903.1516 Tim Howes via Bug reports for GNU Guix
2020-09-28  3:28   ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a08c9907f6354c9ed13b6676e558ad96738b2789.camel@divoplade.fr \
    --to=d@divoplade.fr \
    --cc=43093@debbugs.gnu.org \
    --cc=timhowes@lavabit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).