[PATCH] gnu: Add emacs-sage-shell-mode.

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Nicolas Goaziou
Severity
normal

Debbugs page

N
N
Nicolas Goaziou wrote on 23 Mar 14:07 -0700
(address . guix-patches@gnu.org)(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
1bf346bbbbebd9c277dd63a10c148993be33763c.1742764031.git.mail@nicolasgoaziou.fr
* gnu/packages/emacs-xyz.scm (emacs-sage-shell-mode): New variable.

Change-Id: I73189f919f0f1a36b0f4826685b8ace4563a9a81
---
gnu/packages/emacs-xyz.scm | 55 ++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f00c5e4b29..dc36455058 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6544,6 +6544,61 @@ (define-public emacs-org-pdftools
(home-page "https://github.com/fuxialexander/org-pdftools")
(license license:gpl3+))))
+(define-public emacs-sage-shell-mode
+ (let ((commit "4291700e981a2105d55fa56382ba25046d3d268d")
+ (revision "1"))
+ (package
+ (name "emacs-sage-shell-mode")
+ (version (git-version "0.3" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sagemath/sage-shell-mode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1dch7cwwslffgnzp1djlhz6a792ci42p4bvazxd9lqzhzal0rsbb"))))
+ (build-system emacs-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; Test file contains a duplicate test, causing a check
+ ;; error. Remove the first occurrence.
+ (add-before 'check 'remove-duplicate-test
+ (lambda _
+ (emacs-batch-edit-file "test/sage-shell-mode-test.el"
+ '(progn
+ (search-forward
+ "(ert-deftest sage-shell:parse-state-func-call-1")
+ (goto-char (match-beginning 0))
+ (kill-sexp)
+ (basic-save-buffer)))))
+ ;; The test below is meant to be called from a CI environment
+ ;; and can be ignored.
+ (add-before 'check 'skip-failing-test
+ (lambda _
+ (substitute* "test/sage-shell-mode-test.el"
+ (("\\(ert-deftest sage-shell:development-version-test .*"
+ all)
+ (string-append all "(skip-unless nil)\n"))))))
+ #:tests? #true
+ ;; The "test" command from the Makefile rebuilds everything. Run
+ ;; the tests at a lower level.
+ #:test-command #~(list "emacs" "-Q" "-batch"
+ "-L" "."
+ "-l" "test/sage-shell-mode-test.el"
+ "-f" "ert-run-tests-batch-and-exit")))
+ (propagated-inputs (list emacs-deferred))
+ (home-page "https://github.com/sagemath/sage-shell-mode")
+ (synopsis "Emacs front-end for SageMath")
+ (description
+ "Sage Shell mode provides an Emacs front-end for SageMath. It can run
+the Sage terminal inside Emacs, and allows editing @file{.sage} source files
+with a dedicated major mode and sending their contents directly to that
+terminal.")
+ (license license:gpl3+))))
+
(define-public emacs-sakura-theme
(package
(name "emacs-sakura-theme")

base-commit: 60e4012dfcbe0df5c7e60f097ae2b11d92f982ff
--
2.48.1
L
L
Liliana Marie Prikler wrote on 23 Mar 15:02 -0700
3c0a30a3113e5b33f6e9a18a0d0c64bfaced41f8.camel@gmail.com
Am Sonntag, dem 23.03.2025 um 22:07 +0100 schrieb Nicolas Goaziou:
Toggle quote (51 lines)
> * gnu/packages/emacs-xyz.scm (emacs-sage-shell-mode): New variable.
>
> Change-Id: I73189f919f0f1a36b0f4826685b8ace4563a9a81
> ---
>  gnu/packages/emacs-xyz.scm | 55
> ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index f00c5e4b29..dc36455058 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -6544,6 +6544,61 @@ (define-public emacs-org-pdftools
>        (home-page "https://github.com/fuxialexander/org-pdftools")
>        (license license:gpl3+))))
>  
> +(define-public emacs-sage-shell-mode
> +  (let ((commit "4291700e981a2105d55fa56382ba25046d3d268d")
> +        (revision "1"))
> +    (package
> +      (name "emacs-sage-shell-mode")
> +      (version (git-version "0.3" revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url
> "https://github.com/sagemath/sage-shell-mode")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                 
> "1dch7cwwslffgnzp1djlhz6a792ci42p4bvazxd9lqzhzal0rsbb"))))
> +      (build-system emacs-build-system)
> +      (arguments
> +       (list #:phases
> +             #~(modify-phases %standard-phases
> +                 ;; Test file contains a duplicate test, causing a
> check
> +                 ;; error.  Remove the first occurrence.
> +                 (add-before 'check 'remove-duplicate-test
> +                   (lambda _
> +                     (emacs-batch-edit-file "test/sage-shell-mode-
> test.el"
> +                       '(progn
> +                         (search-forward
> +                          "(ert-deftest sage-shell:parse-state-func-
> call-1")
> +                         (goto-char (match-beginning 0))
> +                         (kill-sexp)
> +                         (basic-save-buffer)))))
There is an ert-number-tests function in emacs-utils that you can use.
Toggle quote (12 lines)
> +                 ;; The test below is meant to be called from a CI
> environment
> +                 ;; and can be ignored.
> +                 (add-before 'check 'skip-failing-test
> +                   (lambda _
> +                     (substitute* "test/sage-shell-mode-test.el"
> +                       (("\\(ert-deftest sage-shell:development-
> version-test .*"
> +                         all)
> +                        (string-append all "(skip-unless
> nil)\n"))))))
> +             #:tests? #true
You don't actually need #:tests? #true anymore with the next emacs-team
merge :)
Toggle quote (25 lines)
> +             ;; The "test" command from the Makefile rebuilds
> everything.  Run
> +             ;; the tests at a lower level.
> +             #:test-command #~(list "emacs" "-Q" "-batch"
> +                                    "-L" "."
> +                                    "-l" "test/sage-shell-mode-
> test.el"
> +                                    "-f" "ert-run-tests-batch-and-
> exit")))
> +      (propagated-inputs (list emacs-deferred))
> +      (home-page "https://github.com/sagemath/sage-shell-mode")
> +      (synopsis "Emacs front-end for SageMath")
> +      (description
> +       "Sage Shell mode provides an Emacs front-end for SageMath. 
> It can run
> +the Sage terminal inside Emacs, and allows editing @file{.sage}
> source files
> +with a dedicated major mode and sending their contents directly to
> that
> +terminal.")
> +      (license license:gpl3+))))
> +
>  (define-public emacs-sakura-theme
>    (package
>      (name "emacs-sakura-theme")
Cheers
N
N
Nicolas Goaziou wrote on 23 Mar 15:19 -0700
[PATCH v2] gnu: Add emacs-sage-shell-mode.
(address . 77219@debbugs.gnu.org)(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
a4a0e4941d08a5daa7796db7a5835d246c1fede1.1742768257.git.mail@nicolasgoaziou.fr
* gnu/packages/emacs-xyz.scm (emacs-sage-shell-mode): New variable.

Change-Id: I73189f919f0f1a36b0f4826685b8ace4563a9a81
---

v2: Make use of `ert-number-tests'. Remove unnecesary "#:test? t" argument.

gnu/packages/emacs-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (63 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f00c5e4b29..889b8bfc8b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6544,6 +6544,54 @@ (define-public emacs-org-pdftools
(home-page "https://github.com/fuxialexander/org-pdftools")
(license license:gpl3+))))
+(define-public emacs-sage-shell-mode
+ (let ((commit "4291700e981a2105d55fa56382ba25046d3d268d")
+ (revision "1"))
+ (package
+ (name "emacs-sage-shell-mode")
+ (version (git-version "0.3" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sagemath/sage-shell-mode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1dch7cwwslffgnzp1djlhz6a792ci42p4bvazxd9lqzhzal0rsbb"))))
+ (build-system emacs-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; Fix duplicate tests in test file.
+ (add-before 'check 'remove-duplicate-test
+ (lambda _
+ (ert-number-tests "test/sage-shell-mode-test.el"
+ "sage-shell:parse-state-func-call-1")))
+ ;; The test below is meant to be called from a CI environment
+ ;; and can be ignored.
+ (add-before 'check 'skip-failing-test
+ (lambda _
+ (substitute* "test/sage-shell-mode-test.el"
+ (("\\(ert-deftest sage-shell:development-version-test .*"
+ all)
+ (string-append all "(skip-unless nil)\n"))))))
+ ;; The "test" command from the Makefile rebuilds everything. Run
+ ;; the tests at a lower level.
+ #:test-command #~(list "emacs" "-Q" "-batch"
+ "-L" "."
+ "-l" "test/sage-shell-mode-test.el"
+ "-f" "ert-run-tests-batch-and-exit")))
+ (propagated-inputs (list emacs-deferred))
+ (home-page "https://github.com/sagemath/sage-shell-mode")
+ (synopsis "Emacs front-end for SageMath")
+ (description
+ "Sage Shell mode provides an Emacs front-end for SageMath. It can run
+the Sage terminal inside Emacs, and allows editing @file{.sage} source files
+with a dedicated major mode and sending their contents directly to that
+terminal.")
+ (license license:gpl3+))))
+
(define-public emacs-sakura-theme
(package
(name "emacs-sakura-theme")

base-commit: 60e4012dfcbe0df5c7e60f097ae2b11d92f982ff
--
2.49.0
L
L
Liliana Marie Prikler wrote 5 days ago
65ac02fefeae254cb79983d8b4af88493f7e1081.camel@gmail.com
Am Sonntag, dem 23.03.2025 um 23:19 +0100 schrieb Nicolas Goaziou:
Toggle quote (4 lines)
> * gnu/packages/emacs-xyz.scm (emacs-sage-shell-mode): New variable.
>
> Change-Id: I73189f919f0f1a36b0f4826685b8ace4563a9a81
> ---
Pushed.

Thanks
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 77219@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 77219
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch