GNU bug report logs - #65717
[PATCH] gnu: Add emacs-latex-extra.

Previous Next

Package: guix-patches;

Reported by: Sergiu Ivanov <sivanov <at> colimite.fr>

Date: Sun, 3 Sep 2023 18:30:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65717 in the body.
You can then email your comments to 65717 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#65717; Package guix-patches. (Sun, 03 Sep 2023 18:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergiu Ivanov <sivanov <at> colimite.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 03 Sep 2023 18:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sergiu Ivanov <sivanov <at> colimite.fr>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add emacs-latex-extra.
Date: Sun, 03 Sep 2023 19:52:14 +0200
[Message part 1 (text/plain, inline)]
Dear Guix,

Here's a patch packaging the MELPA package https://github.com/Malabarba/latex-extra .

Thanks!

-
Sergiu
[0001-gnu-Add-emacs-latex-extra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#65717; Package guix-patches. (Sun, 03 Sep 2023 19:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 65717 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Sergiu Ivanov <sivanov <at> colimite.fr>
Cc: 65717 <at> debbugs.gnu.org
Subject: Re: [bug#65717] [PATCH] gnu: Add emacs-latex-extra.
Date: Sun, 03 Sep 2023 21:44:49 +0200
Hello,

Sergiu Ivanov <sivanov <at> colimite.fr> writes:

> Subject: [PATCH] gnu: Add emacs-latex-extra.

Thank you.

Some comments follow.

> +      (build-system emacs-build-system)
> +      (arguments
> +       `(#:phases (modify-phases %standard-phases
> +                    (add-before 'build 'set-home
> +                      (lambda _
> +                        (setenv "HOME"
> +                                (getcwd)))))))

Why is it needed ?

Also, upstream provides tests. Could you run them?

> +      (inputs (list emacs-auctex))

Usually, inputs are propagated, although it doesn't make a difference
for Emacs.

> +      (home-page "https://github.com/Malabarba/latex-extra")
> +      (synopsis "Usability improvements for latex-mode")

Nitpick: "latex-mode" -> "LaTeX mode"

> +      (description
> +       "Latex-extra defines extra commands and keys for LaTeX-mode, as well
> +as brings user experience improvements.")

Nitpick: "LaTeX-mode" -> "LaTeX mode"

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#65717; Package guix-patches. (Tue, 05 Sep 2023 12:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 65717 <at> debbugs.gnu.org (full text, mbox):

From: Sergiu Ivanov <sivanov <at> colimite.fr>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 65717 <at> debbugs.gnu.org
Subject: Re: [bug#65717] [PATCH] gnu: Add emacs-latex-extra.
Date: Mon, 04 Sep 2023 22:16:27 +0200
[Message part 1 (text/plain, inline)]
Hello Nicolas,

Thank you very much for your feedback.


Nicolas Goaziou <mail <at> nicolasgoaziou.fr> [2023-09-03T21:44:49+0200]:
> Hello,
>
> Sergiu Ivanov <sivanov <at> colimite.fr> writes:
>
>> Subject: [PATCH] gnu: Add emacs-latex-extra.
>
> Thank you.
>
> Some comments follow.
>
>> +      (build-system emacs-build-system)
>> +      (arguments
>> +       `(#:phases (modify-phases %standard-phases
>> +                    (add-before 'build 'set-home
>> +                      (lambda _
>> +                        (setenv "HOME"
>> +                                (getcwd)))))))
>
> Why is it needed ?

If I don't explicitly set $HOME, the build fails with

Debugger entered--Lisp error: (file-missing "Setting current directory" "No such file or directory" "/homeless-shelter/")
  call-process("sh" nil t nil "-c" "evince --help")
  call-process-shell-command("evince --help" nil t)
  shell-command("evince --help" t)
  shell-command-to-string("evince --help")
  TeX-view-program-select-evince("gnome" "evince")
  ...

> Also, upstream provides tests. Could you run them?

I tried adding the following to the arguments list:

#:tests? #t
#:test-command '("make" "test")

and the build now fails with this error:


starting phase `check'
echo "hi " /tmp/guix-build-emacs-latex-extra-1.14-0.a81e758.drv-0/source && \
emacs -Q --batch -L "auctex-11.87.7/" -L "tests/auctex-11.87.7/" -l "auctex-autoloads.el"   -L . -L .. -L tests/ --eval \
    "(progn                                \
      (unless (fboundp 'function-put) (defalias 'function-put #'(lambda (f prop value) (put f prop value)))) \
      (defun define-error (name message &optional parent) (unless parent (setq parent 'error)) (let ((conditions (if (consp parent) (apply #'nconc (mapcar (lambda (parent) (cons parent (or (get parent 'error-conditions) (error \"Unknown signal %s\" parent)))) parent)) (cons parent (get parent 'error-conditions))))) (put name 'error-conditions (delete-dups (copy-sequence (cons name conditions)))) (when message (put name 'error-message message)))) \
      (setq byte-compile-error-on-warn t)  \
      (batch-byte-compile))" *.el
hi  /tmp/guix-build-emacs-latex-extra-1.14-0.a81e758.drv-0/source
Eager macro-expansion failure: (error "Package cl is deprecated")
Eager macro-expansion failure: (error "Package cl is deprecated")

In toplevel form:
latex-extra.el:130:1: Error: Package cl is deprecated
make: *** [Makefile:25: build] Error 1
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("test" "-j" "8") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `check' failed after 0.1 seconds


I hunted around emacs-xyz.scm and tried using ert-runner, which
complained that the tests are in the wrong directory, since it expects
apparently the tests to be under test/ and not tests/, as in the case of
latex-extra.  Still, by looking at how the test target is defined in the
Makefile of latex-extra, I think that this is not the problem.  On the
other hand, I don't believe that package cl being deprecated is the
problem either, since that is normally a warning and not an error.

Do you have any ideas as to how to debug this kind of issues?

FWIW, I am already using the draft version of this package out of my
private channel, and it works nicely, so this problem seems to be
specific for the tests.


>> +      (inputs (list emacs-auctex))
>
> Usually, inputs are propagated, although it doesn't make a difference
> for Emacs.

I changed this to propagated-inputs.

>> +      (home-page "https://github.com/Malabarba/latex-extra")
>> +      (synopsis "Usability improvements for latex-mode")
>
> Nitpick: "latex-mode" -> "LaTeX mode"

Fixed.

>> +      (description
>> +       "Latex-extra defines extra commands and keys for LaTeX-mode, as well
>> +as brings user experience improvements.")
>
> Nitpick: "LaTeX-mode" -> "LaTeX mode"

Fixed as well.

-
Sergiu
[0001-gnu-Add-emacs-latex-extra.patch (text/x-patch, attachment)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Tue, 05 Sep 2023 12:52:02 GMT) Full text and rfc822 format available.

Notification sent to Sergiu Ivanov <sivanov <at> colimite.fr>:
bug acknowledged by developer. (Tue, 05 Sep 2023 12:52:02 GMT) Full text and rfc822 format available.

Message #16 received at 65717-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Sergiu Ivanov <sivanov <at> colimite.fr>
Cc: 65717-done <at> debbugs.gnu.org
Subject: Re: [bug#65717] [PATCH] gnu: Add emacs-latex-extra.
Date: Tue, 05 Sep 2023 14:50:54 +0200
Hello,

Sergiu Ivanov <sivanov <at> colimite.fr> writes:

> If I don't explicitly set $HOME, the build fails with
>
> Debugger entered--Lisp error: (file-missing "Setting current directory" "No such file or directory" "/homeless-shelter/")

OK.

> I tried adding the following to the arguments list:
>
> #:tests? #t
> #:test-command '("make" "test")

Sometimes, it is necessary to skip the Makefile step and write
explicitly what the Makefile is doing right into #:test-command.

Here, I called `ert-run-tests-batch-and-exit' after loading the test
library. The unusual part was the tests required to be run from within
the "tests/" directory, hence the `cd' evaluation:


        #:test-command
        #~(list "emacs" "-Q" "--batch"
                "--eval=(cd \"tests/\")"
                "-l" "latex-extra-test.el"
                "-f" "ert-run-tests-batch-and-exit")

I applied your patch. Thank you!

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Oct 2023 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.