Subject: [bug#78388] [PATCH] gnu: emacs-scad-mode: Upate to 96.0

From: nomike <[email-masked]>
Date: Mon, 12 May 2025 04:15:37 +0200

* gnu/packages/engineering.scm (emacs-scad-mode): Upate to 96.0

Change-Id: I52568717bd1793d982743fb80462ad09b2261fab
---
OpenSCAD was recently updated and since the last version, the emacs-mode was
extracted into it's own git repository which necessitates an update of this
package. Should be fairly sraight forward.
 gnu/packages/engineering.scm | 49 +++++++++++++++++++++++++-----------
 1 file changed, 34 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3ed3814d5a..e9398cb424 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -99,6 +99,7 @@ (define-module (gnu packages engineering)
   #:use-module (gnu packages digest)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages emacs-xyz)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
@@ -3311,23 +3312,41 @@ (define-public openscad
 
 (define-public emacs-scad-mode
   (package
-    (inherit openscad)
     (name "emacs-scad-mode")
-    (native-inputs '())
-    (inputs '())
+    (version "96.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/openscad/emacs-scad-mode")
+             (commit version)))
+       (sha256
+        (base32 "0vsidz3qws89z8blq5nng7mvzn3kj06lw9417aymhykyjgjn5f8m"))
+       (file-name (git-file-name name version))))
     (build-system emacs-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'chdir-elisp
-           ;; Elisp directory is not in root of the source.
-           (lambda _
-             (chdir "contrib")
-             #t)))))
-    (synopsis "Emacs major mode for editing editing OpenSCAD code")
-    (description "@code{scad-mode} provides an Emacs major mode for editing
-OpenSCAD code.  It supports syntax highlighting, indenting and refilling of
-comments.")))
+    (inputs (list emacs-compat))
+
+    (synopsis "Emacs mode to edit OpenSCAD files")
+    (description
+     "@code{scad-mode} provides an Emacs major mode for editing
+OpenSCAD code.  Features:
+@itemize @bullet
+Syntax highlighting
+@item
+Basic completion function (press @kbd{M-TAB})
+@item
+Preview rendered model in separate window (press @kbd{C-c C-c})
+@item
+Open buffer in OpenSCAD (press @kbd{C-c C-o})
+@item
+Export buffer with OpenSCAD (press @kbd{C-c C-e})
+@item
+Flymake support (enable flymake-mode in scad-mode buffers)
+@item
+Org Babel support (@code{scad} source blocks)
+@end itemize")
+    (home-page "https://openscad.org/")
+    (license license:gpl3+)))
 
 (define-public ondsel-solver
   (let ((commit "2e3659c4bce3e6885269e0cb3d640261b2a91108")
-- 
2.49.0