[PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.

DoneSubmitted by Evan Straw.
Details
3 participants
  • Evan Straw
  • Nicolas Goaziou
  • Tobias Geerinckx-Rice
Owner
unassigned
Severity
normal
E
E
Evan Straw wrote on 30 Mar 2020 01:34
(address . guix-patches@gnu.org)
87k13220st.fsf@gmail.com
From 603fe12010817b41a4d1e93fab6b8356cbf2f50f Mon Sep 17 00:00:00 2001
From: Evan Straw <evan.straw99@gmail.com>
Date: Sun, 29 Mar 2020 16:27:34 -0700
Subject: [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.

* gnu/packages/emacs-xyz.scm (emacs-arduino-mode): Change to a maintained
fork.
---
gnu/packages/emacs-xyz.scm | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 782d8650dd..d23905075f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17092,23 +17092,34 @@ other frame parameters.")
     (license license:gpl3+)))
 
 (define-public emacs-arduino-mode
-  (let ((commit "3e2bad4569ad26e929e6db2cbcff0d6d36812698")) ;no release yet
+  (let ((commit "23ae47c9f28f559e70b790b471f20310e163a39b")) ;no release yet
     (package
       (name "emacs-arduino-mode")
       (version (git-version "0" "0" commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-                      (url "https://github.com/bookest/arduino-mode.git")
+                      (url "https://github.com/stardiviner/arduino-mode.git")
                       (commit commit)))
                 (sha256
                  (base32
-                  "1yvaqjc9hadbnnay5fprnh890xsp53kidad1zpb4a5z4a5z61n3c"))
+                  "08vnbz9gpah1l93fzfd87aawrhcnh2v1kyfxgsn88pdwg8awz8rx"))
                 (file-name (git-file-name name version))))
       (build-system emacs-build-system)
+      (inputs
+       `(("spinner" ,emacs-spinner)
+         ("flycheck" ,emacs-flycheck)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-obsolete
+             (lambda _
+               (substitute* "ede-arduino.el"
+                 (("defmethod") "cl-defmethod")
+                 (("defgeneric") "cl-defgeneric")))))))
       (synopsis "Emacs major mode for editing Arduino sketches")
       (description "Emacs major mode for editing Arduino sketches.")
-      (home-page "https://github.com/bookest/arduino-mode")
+      (home-page "https://github.com/stardiviner/arduino-mode")
       (license license:gpl3+))))
 
 (define-public emacs-annalist
-- 
2.20.1
Hello!

The Emacs Arduino mode that is currently packaged in Guix is an old,
unmaintained version, and there is a newer fork of the project by the
same name that has much more functionality. The patch attached to this
email replaces the package emacs-arduino-mode with this newer version,
which basically just amounts to changing the Git repository, hash, and
commit. There's also a substitution done that stops Emacs from
complaining about obsolete macros.

I have no idea if this is the correct way of going about this, or if I
should instead make another package with a different name to refer to
the new fork of arduino-mode. Please let me know if I should change or
revise anything.

Thanks,
-- Evan <evan.straw99@gmail.com>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE6f/SZXb4DLdwy+VR9TDDtKKp8G0FAl6BMHIACgkQ9TDDtKKp
8G2jZQ/+MQK6BbeSGP1yr3yfuAg6saD5cPEWQpSF3sD2je47Rh6hX6CQlE9cVEyu
S/YqArlYbQwaMH6+kgm1vgzxdRNlUaDfKLsFdNeY/Z1T/EU795saIUT+6s3P52lp
uQg6X86CTiq638E5WxHHdJ+/JqlFc7931AIVlU8tR+jZHJBRMAchaP3TxfgwVBD8
gjYHmlZIsnIkm3eVnw0KDvXExrhio/mPau5vvXFxc7ENtMiam2VGIb4zJkC7SHuP
xP+OmOxODKl8qtqyUlRnCr0szGfFOjJ7JjsNYYbUaNwflKkylfpBFajtKQpMMxK2
RS9V894lUSsRSM/Pa7DiJ5ny+WyWVZWgSV8ccI01ZI3U8aIZ0vgUrEzdK64fzUk2
A6wKtBH3Re/O3i9gh+HU6C4lmNMnaCetpE/ZvSEXTCBcG+HWCsnoOKbKKC8blED+
fu+QOm+Ljc38MHxCeLoCSW9kqCgjUPdYbsD6BZSEtsfe+azZszs57TxYo6gHAIkb
2MOmhouB4VHK6Jm+fBG4hzx22b6pPpI9sWGmsjp5HmXKDz+24LYHQnhTjG4X4ZTF
iWc1NnvSdKifBgnl/xc87SfjZeBXO6+5RXq9ZHJveOvY6FNFXP8cfE7GoD7KUcAL
+dGRngDFntiu+xq3zWBhDOKKMQdIrW2kGsD1rLG9OxhbfCfsWzQ=
=LMBy
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 30 Mar 2020 01:59
(name . Evan Straw)(address . evan.straw99@gmail.com)(address . 40284@debbugs.gnu.org)
87sghqaf1w.fsf@nicolasgoaziou.fr
Hello,

Evan Straw <evan.straw99@gmail.com> writes:

Toggle quote (5 lines)
> Subject: [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.
>
> * gnu/packages/emacs-xyz.scm (emacs-arduino-mode): Change to a maintained
> fork.

Thank you.

Toggle quote (6 lines)
> - (let ((commit "3e2bad4569ad26e929e6db2cbcff0d6d36812698")) ;no release yet
> + (let ((commit "23ae47c9f28f559e70b790b471f20310e163a39b")) ;no release yet
> (package
> (name "emacs-arduino-mode")
> (version (git-version "0" "0" commit))

We want to increment version, too, so the above should be:

(git-version "0" "1" commit)

For clarity, you may want to bind `revision' to "1" right after `commit'
and use that in the `git-version' call.

Toggle quote (6 lines)
> + (add-after 'unpack 'fix-obsolete
> + (lambda _
> + (substitute* "ede-arduino.el"
> + (("defmethod") "cl-defmethod")
> + (("defgeneric") "cl-defgeneric")))))))

The phase must end with a #f

Could you send an updated patch?

Regards,

--
Nicolas Goaziou
T
T
Tobias Geerinckx-Rice wrote on 30 Mar 2020 02:42
874ku6lllf.fsf@nckx
Nicolas Goaziou 写道:
Toggle quote (2 lines)
> The phase must end with a #f

Typo of course, but: #t! :-)

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl6BQGwACgkQ2Imw8BjF
STzXEw//ez+qMvSQ5Vv3euioBbnFlcxkzdD9ANTrCgU6VpVhaADSGxsE0iMvfqDp
vtPt4ziEuCdBIPFC4b1eqboI8WExiLAV/+D5TM5iitVfBL0vjKiJxqa7Tsx0fRFI
JLK3WY/MtEvvvfhR24cxA/+wKZyrpviy+UPtLyyRcFiW/y9RCBK9LR9TK17mzHx9
al7ha+yseCCciAVNJ0LAzjXwdQ6gMI4mYxqpYj65Lm/bqLvHNZ6KB+qBdM8ngxuc
1dstT95NmEUYJKLsQEAbnsDbkX7tkZwwL6oSKsY3AQsEeg8cEbjmnSOksQ8vxpIK
vU1l+ijB18ZUfobr7DrTMfmfS6XiGniJ6rd5Odl0FjIPJxJNqgcq8nYmpvAE1wxf
X8hchHY+x5x/8gDjkIc+v9cT3EQzJOu61QByAEGx1XV9BPjNkEismwVlY8Uam2z5
AFGIW3Bv3IdD6G1vHfFr9n+zEIm795UQXdNGzH+/mNelROtZQUKDmgQa4x7PvgZk
uQ1k8HQK+HBW8UAfm4JSYU8ee9g+ovZjCR3l0BUYz9c8Kv9EViVvHvUI7nM7YKMu
dfCMUlRVYyb+n3bLdFCsVlHyndMURTY4uMJk7Y8nKukakEcRVhvgf5PD3aS6qVDd
jyEmzaa5b7kNqYDvt2pREPOSZ6XdVbRYHidl4FNfASXCrHpJJx0=
=SwKU
-----END PGP SIGNATURE-----

E
E
Evan Straw wrote on 30 Mar 2020 02:56
[bug#40284] [PATCH v2] gnu: emacs-arduino-mode: Change to a maintained fork.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
877dz21x05.fsf_-_@gmail.com
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (36 lines)
> Hello,
>
> Evan Straw <evan.straw99@gmail.com> writes:
>
>> Subject: [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.
>>
>> * gnu/packages/emacs-xyz.scm (emacs-arduino-mode): Change to a maintained
>> fork.
>
> Thank you.
>
>> - (let ((commit "3e2bad4569ad26e929e6db2cbcff0d6d36812698")) ;no release yet
>> + (let ((commit "23ae47c9f28f559e70b790b471f20310e163a39b")) ;no release yet
>> (package
>> (name "emacs-arduino-mode")
>> (version (git-version "0" "0" commit))
>
> We want to increment version, too, so the above should be:
>
> (git-version "0" "1" commit)
>
> For clarity, you may want to bind `revision' to "1" right after `commit'
> and use that in the `git-version' call.
>
>> + (add-after 'unpack 'fix-obsolete
>> + (lambda _
>> + (substitute* "ede-arduino.el"
>> + (("defmethod") "cl-defmethod")
>> + (("defgeneric") "cl-defgeneric")))))))
>
> The phase must end with a #f
>
> Could you send an updated patch?
>
> Regards,

Thanks for the feedback. Attached to this email should be an updated
patch. Please let me know if there's anything else I should change.

Thanks,
-- Evan <evan.straw99@gmail.com>
From 9488d348f12631aa76b13f259434a996e3370aa9 Mon Sep 17 00:00:00 2001
From: Evan Straw <evan.straw99@gmail.com>
Date: Sun, 29 Mar 2020 16:27:34 -0700
Subject: [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.

* gnu/packages/emacs-xyz.scm (emacs-arduino-mode): Change to a maintained
fork.
---
gnu/packages/emacs-xyz.scm | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 782d8650dd..4fe61fafaf 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17092,23 +17092,39 @@ other frame parameters.")
     (license license:gpl3+)))
 
 (define-public emacs-arduino-mode
-  (let ((commit "3e2bad4569ad26e929e6db2cbcff0d6d36812698")) ;no release yet
+  (let ((commit "23ae47c9f28f559e70b790b471f20310e163a39b")
+        (revision "1")) ;no release yet
     (package
       (name "emacs-arduino-mode")
-      (version (git-version "0" "0" commit))
+      (version (git-version "0" revision commit))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-                      (url "https://github.com/bookest/arduino-mode.git")
+                      (url "https://github.com/stardiviner/arduino-mode.git")
                       (commit commit)))
                 (sha256
                  (base32
-                  "1yvaqjc9hadbnnay5fprnh890xsp53kidad1zpb4a5z4a5z61n3c"))
+                  "08vnbz9gpah1l93fzfd87aawrhcnh2v1kyfxgsn88pdwg8awz8rx"))
                 (file-name (git-file-name name version))))
       (build-system emacs-build-system)
+      (inputs
+       `(("spinner" ,emacs-spinner)
+         ("flycheck" ,emacs-flycheck)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           ;; Emacs complains that "defmethod" and "defgeneric" are obsolete
+           ;; macros when compiling. Substitute them with the recommended
+           ;; macros "cl-defmethod" and "cl-defgeneric", respectively.
+           (add-after 'unpack 'fix-obsolete
+             (lambda _
+               (substitute* "ede-arduino.el"
+                 (("defmethod") "cl-defmethod")
+                 (("defgeneric") "cl-defgeneric"))
+               #t)))))
       (synopsis "Emacs major mode for editing Arduino sketches")
       (description "Emacs major mode for editing Arduino sketches.")
-      (home-page "https://github.com/bookest/arduino-mode")
+      (home-page "https://github.com/stardiviner/arduino-mode")
       (license license:gpl3+))))
 
 (define-public emacs-annalist
-- 
2.20.1
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE6f/SZXb4DLdwy+VR9TDDtKKp8G0FAl6BQ6oACgkQ9TDDtKKp
8G1HbBAAmH7k+ENMMG/OzRxc3LPSdaf5De0A5RXkmopUbqmdJtda8tMDDLXx6OJL
b6vuvTI85C3ceCNCLoCoD3oXx2Jx2y4YO+r7MFR0naOVOstKpiHJSphAR2H0rXgl
dKa/i+SParS3crMcUpLPcOuKK0+ilcQ812Ne+5LGJiJmlFyKIYnzEqYfQ3dPYkS0
O3lzo5pq4ItsWW1YhsnASMhrONoZn2WYkbDgacFKP1oVHoD9iT8D5P2DkdJdc8BF
qEs5Cqlwp9fv++pV4qCxMzpnwg3zGcK7WNtihS7cPDy4qGSRuY/Iu9MARvo9TZIJ
4QVXgH+W2ZF/Yqn1U2KPteOaYv60nqrqPBfyNjj4XyygZ7zTT/AV88L6C2BL0ZA2
z4NSd19vFX6VfNgaTMbocqAlCHHs972d0hlKlxJHsiq70V7/aEMbBqtsiVqThqj7
5Jz5+aoeb69SBuhWabsDR8Ef3tjBx0B5s0LHT3GL63iIjKPQ/GtOvHlseheds62N
PluOfp8dy4BJZikvJZXXPYhuhh0LRSwELfG86tJ+kltmhqdyUSefyEQYOD+IfWgS
0r7g0gobIQLmoaGHL/G2dVbZ6YDbbkD8/ycAFvMuNEbGmeNloAaC7LGwEfH5GoqV
jKOMPipbFcj72tgudI1DGXxQ/Buq7hYQgdnfTrW/Xs/j5MIC8QY=
=L9L9
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 30 Mar 2020 12:12
Re: [bug#40284] [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.
(name . Tobias Geerinckx-Rice via Guix-patches via)(address . guix-patches@gnu.org)
87ftdq9mne.fsf@nicolasgoaziou.fr
Hello,

Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
writes:

Toggle quote (5 lines)
> Nicolas Goaziou 写道:
>> The phase must end with a #f
>
> Typo of course, but: #t! :-)

Duh! Here's what happens when I answer mails at 3 am.

Thanks,

Regards,

--
Nicolas Goaziou
N
N
Nicolas Goaziou wrote on 30 Mar 2020 14:01
Re: [bug#40284] [PATCH v2] gnu: emacs-arduino-mode: Change to a maintained fork.
(name . Evan Straw)(address . evan.straw99@gmail.com)
87a73y9hlc.fsf@nicolasgoaziou.fr
Hello,

Evan Straw <evan.straw99@gmail.com> writes:

Toggle quote (5 lines)
> Subject: [PATCH] gnu: emacs-arduino-mode: Change to a maintained fork.
>
> * gnu/packages/emacs-xyz.scm (emacs-arduino-mode): Change to a maintained
> fork.

Applied as 6957e4c13d0c01b50b616832360ee510dac58e66.

I expounded a bit the commit message.

Thank you!

Regards,

--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 40284@debbugs.gnu.org