From patchwork Mon Sep 4 20:16:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sergiu Ivanov X-Patchwork-Id: 53459 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0FF5B27BBEA; Tue, 5 Sep 2023 13:31:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CCB7427BBE9 for ; Tue, 5 Sep 2023 13:31:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdVD4-0000rM-CC; Tue, 05 Sep 2023 08:31:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdVCw-0000pO-1j for guix-patches@gnu.org; Tue, 05 Sep 2023 08:31:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdVCv-0002Pb-Ov for guix-patches@gnu.org; Tue, 05 Sep 2023 08:31:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdVCv-0007d6-TJ for guix-patches@gnu.org; Tue, 05 Sep 2023 08:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65717] [PATCH] gnu: Add emacs-latex-extra. Resent-From: Sergiu Ivanov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Sep 2023 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65717 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 65717@debbugs.gnu.org Received: via spool by 65717-submit@debbugs.gnu.org id=B65717.169391705129310 (code B ref 65717); Tue, 05 Sep 2023 12:31:01 +0000 Received: (at 65717) by debbugs.gnu.org; 5 Sep 2023 12:30:51 +0000 Received: from localhost ([127.0.0.1]:54850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdVCl-0007cf-51 for submit@debbugs.gnu.org; Tue, 05 Sep 2023 08:30:51 -0400 Received: from captaincourier.marvid.fr ([51.159.66.78]:51178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdVCg-0007cN-TX for 65717@debbugs.gnu.org; Tue, 05 Sep 2023 08:30:50 -0400 References: <875y4ri1n7.fsf@colimite.fr> <87r0nf9h3i.fsf@nicolasgoaziou.fr> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=colimite.fr; s=mail; t=1693917039; bh=G7pjriQcck+g1hY/fs+L+tWuslHl8y4pFN3thicDdkk=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=IyHWN82ItF+CCn0ekD1QnurbAyYAHkOope5fZxS+MchBlEOBh7Sc77cnN4DhXj/ZX jxfSXVtv6LfqbRWMm2B25RWWd+Q6hwYLTzDsOrzb7Eak+gt0o641PmmmkneytEs3G0 E30U6zTiVSj2MiTcaU/CJQ1zjArs1sgh7c2kT88M= From: Sergiu Ivanov Date: Mon, 04 Sep 2023 22:16:27 +0200 In-reply-to: <87r0nf9h3i.fsf@nicolasgoaziou.fr> Message-ID: <878r9ker9t.fsf@colimite.fr> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello Nicolas, Thank you very much for your feedback. Nicolas Goaziou [2023-09-03T21:44:49+0200]: > Hello, > > Sergiu Ivanov 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 From c8fe800f453c139177dcfb28bbe59b1cd362a902 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 3 Sep 2023 19:29:03 +0200 Subject: [PATCH] gnu: Add emacs-latex-extra. * gnu/packages/emacs-xyz.scm (emacs-latex-extra): New variable. --- gnu/packages/emacs-xyz.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index dc2998a217..6815d8410f 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -132,6 +132,7 @@ ;;; Copyright © 2023 Fabio Natali ;;; Copyright © 2023 Arnaud Lechevallier ;;; Copyright © 2023 Ahmad Draidi +;;; Copyright © 2023 Sergiu Ivanov ;;; ;;; This file is part of GNU Guix. ;;; @@ -4067,6 +4068,36 @@ (define-public emacs-auctex or XEmacs.") (license license:gpl3+))) +(define-public emacs-latex-extra + (let ((commit "a81e7588448f85c5fcc3f3fc71cf957d0928a656") + (revision "0")) + (package + (name "emacs-latex-extra") + (version (git-version "1.14" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Malabarba/latex-extra") + (commit commit))) + (sha256 + (base32 + "0sajg5vmygnkcnmkrpf8r7c4b8v95hgsv1y6pz868jpznmldnxkb")) + (file-name (git-file-name name version)))) + (build-system emacs-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'build 'set-home + (lambda _ + (setenv "HOME" + (getcwd))))))) + (propagated-inputs (list emacs-auctex)) + (home-page "https://github.com/Malabarba/latex-extra") + (synopsis "Usability improvements for LaTeX mode") + (description + "Latex-extra defines extra commands and keys for LaTeX mode, as well +as brings user experience improvements.") + (license license:gpl3+)))) + (define-public emacs-autothemer (let ((commit "8f72afc6dba5ad7cc3a201a084fd20571f945d2e")) ;version bump (package -- 2.41.0