unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#74174] [PATCH] gnu: Add emacs-cargo-el
@ 2024-11-02  5:42 Javier Olaechea
  2024-11-04 13:11 ` [bug#74174] QA review for 74174 Cayetano Santos via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Javier Olaechea @ 2024-11-02  5:42 UTC (permalink / raw)
  To: 74174


[-- Attachment #1.1: Type: text/plain, Size: 216 bytes --]

Hi,
attached is patch to add the cargo.el package. It is a minor mode to
interact with rust's cargo package manager from Emacs.

Cheers

-- 
"I object to doing things that computers can do." — Olin Shivers

[-- Attachment #1.2: Type: text/html, Size: 435 bytes --]

[-- Attachment #2: 0001-gnu-Add-emacs-cargo-el.patch --]
[-- Type: text/x-patch, Size: 1905 bytes --]

From 1a3df5f98b1f785379c5b38661dc815bea9266c1 Mon Sep 17 00:00:00 2001
Message-ID: <1a3df5f98b1f785379c5b38661dc815bea9266c1.1730526066.git.pirata@gmail.com>
From: Javier Olaechea <pirata@gmail.com>
Date: Sat, 2 Nov 2024 00:36:57 -0500
Subject: [PATCH] gnu: Add emacs-cargo-el

* gnu/packages/emacs-xyz.scm (emacs-cargo-el): New variable.

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

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 488b4cb5d7..5b9c7437f2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29667,6 +29667,29 @@ (define-public emacs-rustic
     (license (list license:expat
                    license:asl2.0))))
 
+(define-public emacs-cargo-el
+  (let ((commit "7f8466063381eed05d4e222ce822b1dd44e3bf17")
+        (revision "1"))
+    (package
+      (name "emacs-cargo-el")
+      (version "0.4.0")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kwrooijen/cargo.el")
+               (commit commit)))
+         (sha256
+          (base32 "1hvxdmyppvx04jyn07dnynlgbwyasv22k8dd4qa68mrj8i9mz484"))))
+      (build-system emacs-build-system)
+      (propagated-inputs (list emacs-markdown-mode))
+      (home-page "https://github.com/kwrooijen/cargo.el")
+      (synopsis "Emacs Minor Mode for Cargo, Rust's Package Manager")
+      (description
+       "Cargo mode for Emacs. This package gives you a set of key combinations to
+perform Cargo tasks within your Rust projects.")
+      (license license:gpl3+))))
+
 (define-public emacs-ztree
   ;; Upstream provides no tag, but the commit below matches latest release.
   (let ((commit "c9ad9136d52ca5a81475693864e255d29448f43f"))

base-commit: ea11d3608566174c4bae70faa4f9d0c67748d2db
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#74174] QA review for 74174
  2024-11-02  5:42 [bug#74174] [PATCH] gnu: Add emacs-cargo-el Javier Olaechea
@ 2024-11-04 13:11 ` Cayetano Santos via Guix-patches via
  2024-11-05  4:54 ` [bug#74174] Javier Olaechea
  2024-11-05  9:08 ` [bug#74174] Cayetano Santos via Guix-patches via
  2 siblings, 0 replies; 5+ messages in thread
From: Cayetano Santos via Guix-patches via @ 2024-11-04 13:11 UTC (permalink / raw)
  To: control, 74174


user guix
usertag 74174 + waiting-on-contributor
thanks

Guix QA review form submission:

- sentences in description should be followed by two spaces
- check propagated-inputs,  emacs-rust-mode instead of
  emacs-markdown-mode ?
- first revision should be 0 instead of 1 ?

Items marked as checked: Commit messages, Package builds, Lint warnings




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#74174]
  2024-11-02  5:42 [bug#74174] [PATCH] gnu: Add emacs-cargo-el Javier Olaechea
  2024-11-04 13:11 ` [bug#74174] QA review for 74174 Cayetano Santos via Guix-patches via
@ 2024-11-05  4:54 ` Javier Olaechea
  2024-11-07  1:25   ` bug#74174: [PATCH v2] gnu: Add emacs-cargo-el Hilton Chain via Guix-patches via
  2024-11-05  9:08 ` [bug#74174] Cayetano Santos via Guix-patches via
  2 siblings, 1 reply; 5+ messages in thread
From: Javier Olaechea @ 2024-11-05  4:54 UTC (permalink / raw)
  To: 74174


[-- Attachment #1.1: Type: text/plain, Size: 910 bytes --]

Guix QA review form submission:

> - sentences in description should be followed by two spaces

Updated the description accordingly

> - check propagated-inputs, emacs-rust-mode instead of
> emacs-markdown-mode ?

No, the package doesn't depend on rust-mode at all. It shells out the cargo
and rustc instead. The require calls in the elisp files are

(require 'xref)
(require 'compile)
(require 'button)
(require 'markdown-mode)
(require 'tramp)

Of those, only emacs-markdown-mode is not a built-in package. Although we
could add xref and tramp as inputs. They are also distributed as separate
packages in GNU Elpa. This means they have a separate release cadence from
emacs. What do you think?

> - first revision should be 0 instead of 1 ?

Thanks, it is true 'hackers count from 0'. ^_^. Updated.

Cheers
-- 
"I object to doing things that computers can do." — Olin Shivers

[-- Attachment #1.2: Type: text/html, Size: 1584 bytes --]

[-- Attachment #2: v2-0001-gnu-Add-emacs-cargo-el.patch --]
[-- Type: text/x-patch, Size: 1909 bytes --]

From 95bb683ce62fd38c9bbbc4efa4f3499d0cc4f647 Mon Sep 17 00:00:00 2001
Message-ID: <95bb683ce62fd38c9bbbc4efa4f3499d0cc4f647.1730781951.git.pirata@gmail.com>
From: Javier Olaechea <pirata@gmail.com>
Date: Sat, 2 Nov 2024 00:36:57 -0500
Subject: [PATCH v2] gnu: Add emacs-cargo-el

* gnu/packages/emacs-xyz.scm (emacs-cargo-el): New variable.

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

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 59c804066a..fc8a5839b4 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29667,6 +29667,29 @@ (define-public emacs-rustic
     (license (list license:expat
                    license:asl2.0))))
 
+(define-public emacs-cargo-el
+  (let ((commit "7f8466063381eed05d4e222ce822b1dd44e3bf17")
+        (revision "0"))
+    (package
+      (name "emacs-cargo-el")
+      (version "0.4.0")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kwrooijen/cargo.el")
+               (commit commit)))
+         (sha256
+          (base32 "1hvxdmyppvx04jyn07dnynlgbwyasv22k8dd4qa68mrj8i9mz484"))))
+      (build-system emacs-build-system)
+      (propagated-inputs (list emacs-markdown-mode))
+      (home-page "https://github.com/kwrooijen/cargo.el")
+      (synopsis "Emacs Minor Mode for Cargo, Rust's Package Manager")
+      (description
+       "Cargo mode for Emacs.  This package gives you a set of key combinations to
+perform Cargo tasks within your Rust projects.")
+      (license license:gpl3+))))
+
 (define-public emacs-ztree
   ;; Upstream provides no tag, but the commit below matches latest release.
   (let ((commit "c9ad9136d52ca5a81475693864e255d29448f43f"))

base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#74174]
  2024-11-02  5:42 [bug#74174] [PATCH] gnu: Add emacs-cargo-el Javier Olaechea
  2024-11-04 13:11 ` [bug#74174] QA review for 74174 Cayetano Santos via Guix-patches via
  2024-11-05  4:54 ` [bug#74174] Javier Olaechea
@ 2024-11-05  9:08 ` Cayetano Santos via Guix-patches via
  2 siblings, 0 replies; 5+ messages in thread
From: Cayetano Santos via Guix-patches via @ 2024-11-05  9:08 UTC (permalink / raw)
  To: pirata; +Cc: 74174, GNU bug tracker automated control server


user guix
usertag 74174 + reviewed-looks-good
thanks

> Of those, only emacs-markdown-mode is not a built-in package. Although we
> could add xref and tramp as inputs. They are also distributed as separate
> packages in GNU Elpa. This means they have a separate release cadence from
> emacs. What do you think?

In my opinion, if the dependency is built-in with current emacs, there
is no need to pull anything else.

v1 looks good to me,

C.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#74174: [PATCH v2] gnu: Add emacs-cargo-el.
  2024-11-05  4:54 ` [bug#74174] Javier Olaechea
@ 2024-11-07  1:25   ` Hilton Chain via Guix-patches via
  0 siblings, 0 replies; 5+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-11-07  1:25 UTC (permalink / raw)
  To: Javier Olaechea; +Cc: 74174-done, Cayetano Santos

Hi Javier,

On Tue, 05 Nov 2024 12:54:49 +0800,
Javier Olaechea wrote:
>
> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> [1.2  <text/html; UTF-8 (quoted-printable)>]
> Guix QA review form submission:
>
> > - sentences in description should be followed by two spaces
>
> Updated the description accordingly
>
> > - check propagated-inputs, emacs-rust-mode instead of
> > emacs-markdown-mode ?
>
> No, the package doesn't depend on rust-mode at all. It shells out the cargo and rustc instead. The require
> calls in the elisp files are


We generally patch these references to paths within /gnu/store.


> (require 'xref)
> (require 'compile)
> (require 'button)
> (require 'markdown-mode)
> (require 'tramp)
>
> Of those, only emacs-markdown-mode is not a built-in package. Although we could add xref and tramp as inputs.
> They are also distributed as separate packages in GNU Elpa. This means they have a separate release cadence
> from emacs. What do you think?
>
> > - first revision should be 0 instead of 1 ?
>
> Thanks, it is true 'hackers count from 0'. ^_^. Updated.


There's no strict requirement on revisions :)
Just make sure (version + revision) is increasing when updating package source.


> Cheers
> --
> "I object to doing things that computers can do." ― Olin Shivers
> [2 v2-0001-gnu-Add-emacs-cargo-el.patch <text/x-patch; US-ASCII (base64)>]
> From 95bb683ce62fd38c9bbbc4efa4f3499d0cc4f647 Mon Sep 17 00:00:00 2001
> Message-ID: <95bb683ce62fd38c9bbbc4efa4f3499d0cc4f647.1730781951.git.pirata@gmail.com>
> From: Javier Olaechea <pirata@gmail.com>
> Date: Sat, 2 Nov 2024 00:36:57 -0500
> Subject: [PATCH v2] gnu: Add emacs-cargo-el


Don't forget to end the subject with ‘.’


> * gnu/packages/emacs-xyz.scm (emacs-cargo-el): New variable.
>
> Change-Id: I73a99eeb818fb1c7ab87cc15c5953beba818cb94
> ---
>  gnu/packages/emacs-xyz.scm | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 59c804066a..fc8a5839b4 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -29667,6 +29667,29 @@ (define-public emacs-rustic
>      (license (list license:expat
>                     license:asl2.0))))
>
> +(define-public emacs-cargo-el
> +  (let ((commit "7f8466063381eed05d4e222ce822b1dd44e3bf17")
> +        (revision "0"))
> +    (package
> +      (name "emacs-cargo-el")
> +      (version "0.4.0")


The version 0.4.0 doesn't match upstream commit 7f8466063381, so we shouldn't
use it here.  Please see package guidelines on version numbers[1] for details.


> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/kwrooijen/cargo.el")
> +               (commit commit)))


Don't forget to add a file name to this origin, you can use ‘guix lint’ to
identify such issue.


> +         (sha256
> +          (base32 "1hvxdmyppvx04jyn07dnynlgbwyasv22k8dd4qa68mrj8i9mz484"))))
> +      (build-system emacs-build-system)
> +      (propagated-inputs (list emacs-markdown-mode))
> +      (home-page "https://github.com/kwrooijen/cargo.el")
> +      (synopsis "Emacs Minor Mode for Cargo, Rust's Package Manager")


Uppercase only when it's meaningful.


> +      (description
> +       "Cargo mode for Emacs.  This package gives you a set of key combinations to
> +perform Cargo tasks within your Rust projects.")


Use full sentences for description, "Cargo mode for Emacs" should be reworded.
Guidelines for synopses and descriptions are available in [2].


> +      (license license:gpl3+))))
> +
>  (define-public emacs-ztree
>    ;; Upstream provides no tag, but the commit below matches latest release.
>    (let ((commit "c9ad9136d52ca5a81475693864e255d29448f43f"))
>
> base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f
> --
> 2.46.0


I have adjusted your patch based on above comments and applied it as
673b924ac1e30a5d498e28859af365cf2bb4a508, thanks!

Also thanks for Cayetano's previous review!

---
[1]: https://guix.gnu.org/manual/devel/en/html_node/Version-Numbers.html
[2]: https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-07  1:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-02  5:42 [bug#74174] [PATCH] gnu: Add emacs-cargo-el Javier Olaechea
2024-11-04 13:11 ` [bug#74174] QA review for 74174 Cayetano Santos via Guix-patches via
2024-11-05  4:54 ` [bug#74174] Javier Olaechea
2024-11-07  1:25   ` bug#74174: [PATCH v2] gnu: Add emacs-cargo-el Hilton Chain via Guix-patches via
2024-11-05  9:08 ` [bug#74174] Cayetano Santos via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).