[PATCH] gnu: Add emacs-opencl-mode

  • Done
  • quality assurance status badge
Details
3 participants
  • Nicolas Goaziou
  • Maxime Devos
  • Thomas Albers
Owner
unassigned
Submitted by
Thomas Albers
Severity
normal
T
T
Thomas Albers wrote on 3 Apr 2022 15:41
(address . guix-patches@gnu.org)(name . Thomas Albers)(address . thomas@thomaslabs.org)
20220403134116.7688-1-thomas@thomaslabs.org
Hi guix,

the following patch adds the emacs-opencl-mode package. It provides
syntax highlighting when editing OpenCL kernels.

Regards,
Thomas

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

Toggle diff (36 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 42fc13f4c2..6c82a9d784 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021, 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Brandon Lucas <br@ndon.dk>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Thomas Albers Raviola <thomas@thomaslabs.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30833,3 +30834,23 @@ (define-public emacs-osm
zoomable and moveable map display, display of tracks and POIs from GPX files,
parallel fetching of tiles with cURL, and more.")
(license license:gpl3+)))
+
+(define-public emacs-opencl-mode
+ (let ((commit "15091eff92c33ee0d1ece40eb99299ef79fee92d")
+ (revision "1"))
+ (package
+ (name "emacs-opencl-mode")
+ (version (git-version "1.0" revision commit))
+ (source (origin
+ (uri (git-reference
+ (url "https://github.com/salmanebah/opencl-mode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zn6rr48w0ai0sn51zzyp546va6flfgf9lm12vfrdb6kkiiiq403"))
+ (method git-fetch)))
+ (build-system emacs-build-system)
+ (synopsis "OpenCL syntax coloring for Emacs")
+ (description "This Emacs package provides syntax coloring for OpenCL kernels.")
+ (home-page "https://github.com/salmanebah/opencl-mode")
+ (license license:gpl3))))
--
2.34.0
M
M
Maxime Devos wrote on 3 Apr 2022 16:30
f08274cc51620334eaaa01269289fcb9c8dcf82d.camel@telenet.be
Thomas Albers via Guix-patches via schreef op zo 03-04-2022 om 15:41
[+0200]:
Toggle quote (2 lines)
> +      (license license:gpl3))))

According to opencl-mode.el, it's GPL3+.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iIwEABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkmvhBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lJaAQCzjTJX6Lrb8Ef0iwMlFcjMMTuy
z3BEnoQ5ceZrchNf0gD0DFXORL8gtuaDxTzuEnspogD+sPWTPYXwRH72wnDADg==
=aq+c
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 3 Apr 2022 16:31
a1c0ee67aa4f758fa441e9fc594cbbd917d26f43.camel@telenet.be
Thomas Albers via Guix-patches via schreef op zo 03-04-2022 om 15:41
[+0200]:
Toggle quote (2 lines)
> +      (source (origin

The code does (require 'cc-fonts) -- is this part of Emacs itself, or
is it a dependency that needs to be added to propagated-inputs?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkmvvxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7k8kAPwJ62+Swf61DPBSCOri5cnig0DY
lz3lUnxWdkUOspjhxgEAmnhibdAEoNzkUL0d8qA/Hhq9U/otlwwXc9IShcUrGwY=
=QAOU
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 3 Apr 2022 16:33
46a51dbb255ebc283f69f1468ac758ccd5bca1c8.camel@telenet.be
Thomas Albers via Guix-patches via schreef op zo 03-04-2022 om 15:41
[+0200]:
Toggle quote (2 lines)
> +      (version (git-version "1.0" revision commit))

I would add a comment here, maybe

;; Upstream never makes any formal releases, there is only v1.0.
;; Use the latest commit instead.

to explain why a non-version commit was chosen.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkmwPhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iQaAQDOYbu8u913iM1e7EQn9RtGcxxu
/ah4ECbEB+tROLXS9gEAyaNRYBD715sm231ELq9Yeh64JQM6Vs1RvdR5bPnBiwg=
=5xI7
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 3 Apr 2022 16:42
7618c71dcc0d1994819ca735e13b73b38d3b1e72.camel@telenet.be
Thomas Albers via Guix-patches via schreef op zo 03-04-2022 om 15:41
[+0200]:
Toggle quote (2 lines)
> +      (description "This Emacs package provides syntax coloring for OpenCL kernels.")

This is a bit short. Some additional things that could be mentioned:


* the name of the emacs mode (in case a non-recognised file name is
used)
* its documentation support (opencl-lookup)

Additionally, for offline usage, it would be nice if the OpenCL
documentation was built from source (*) and referred to by
file:///gnu/store/... instead of http://www.khronos.org, though I don't
think that can be a requirement.

Greetings,
Maxime.

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkmyZhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lnwAP0YuyBRxHjN2nvuYbvIfVAbhuVH
oJ70hdng2kbgq2yy1wD/eOU6mhFUN5gMQJcw8l0T76kMY1M2bGGwpaT+JgZd5gc=
=rZFr
-----END PGP SIGNATURE-----


T
T
Thomas Albers wrote on 3 Apr 2022 19:53
[PATCH] gnu: Add emacs-opencl-mode
(address . 54692@debbugs.gnu.org)
20220403175302.3771-1-thomas@thomaslabs.org
Hello Maxime,

thank you for your feedback. Here I send a new patch with the suggested
corrections.

About your questions:

- cc-fonts is part of emacs
- Offline access to the OpenCL documentation would indeed be nice, I guess
this should however be a separate package. I could add this afterwards,
once this package is available.

Greetings,
Thomas

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

Toggle diff (42 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 42fc13f4c2..8aef0b42eb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021, 2022 Taiju HIGASHI <higashi@taiju.info>
;;; Copyright © 2022 Brandon Lucas <br@ndon.dk>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Thomas Albers Raviola <thomas@thomaslabs.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30833,3 +30834,27 @@ (define-public emacs-osm
zoomable and moveable map display, display of tracks and POIs from GPX files,
parallel fetching of tiles with cURL, and more.")
(license license:gpl3+)))
+
+(define-public emacs-opencl-mode
+ ;; Upstream never makes any formal releases, there is only v1.0.
+ ;; Use the latest commit instead.
+ (let ((commit "15091eff92c33ee0d1ece40eb99299ef79fee92d")
+ (revision "1"))
+ (package
+ (name "emacs-opencl-mode")
+ (version (git-version "1.0" revision commit))
+ (source (origin
+ (uri (git-reference
+ (url "https://github.com/salmanebah/opencl-mode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zn6rr48w0ai0sn51zzyp546va6flfgf9lm12vfrdb6kkiiiq403"))
+ (method git-fetch)))
+ (build-system emacs-build-system)
+ (synopsis "Emacs major mode for editing OpenCL kernels")
+ (description "This Emacs package provides the @code{opencl-mode} major
+mode for editing OpenCL kernels. It supports syntax highlighting and online
+access to the OpenCL documentation through the @code{opencl-lookup} function.")
+ (home-page "https://github.com/salmanebah/opencl-mode")
+ (license license:gpl3+))))
--
2.34.0
M
M
Maxime Devos wrote on 3 Apr 2022 20:43
a1646ee6e1d443a69887ea5fd67598b3d5442fba.camel@telenet.be
Thomas Albers schreef op zo 03-04-2022 om 19:53 [+0200]:
Toggle quote (4 lines)
> +      (description "This Emacs package provides the @code{opencl-mode} major
> +mode for editing OpenCL kernels.  It supports syntax highlighting and online
> +access to the OpenCL documentation through the @code{opencl-lookup} function.")

Looks like a nice description!

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYknqvRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ko4AQCM97w8Tfy90VCLwaNYcNppBMFP
oWGdOXTyLrsygaI6oAD/ZM6wlHNZkAGpAf2N6fB3SqIbVEVA+lBa+v02Yo9pmgs=
=ICwG
-----END PGP SIGNATURE-----


N
N
Nicolas Goaziou wrote on 8 Jun 2022 00:03
Re: [bug#54692] [PATCH] gnu: Add emacs-opencl-mode
(name . Thomas Albers via Guix-patches via)(address . guix-patches@gnu.org)
87bkv4qggg.fsf@nicolasgoaziou.fr
Hello,

Thomas Albers via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (24 lines)
>
> ---
> gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 42fc13f4c2..8aef0b42eb 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -108,6 +108,7 @@
> ;;; Copyright © 2021, 2022 Taiju HIGASHI <higashi@taiju.info>
> ;;; Copyright © 2022 Brandon Lucas <br@ndon.dk>
> ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
> +;;; Copyright © 2022 Thomas Albers Raviola <thomas@thomaslabs.org>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -30833,3 +30834,27 @@ (define-public emacs-osm
> zoomable and moveable map display, display of tracks and POIs from GPX files,
> parallel fetching of tiles with cURL, and more.")
> (license license:gpl3+)))
> +
> +(define-public emacs-opencl-mode

I added a proper commit message and pushed.

Thank you.

Regards,
--
Nicolas Goaziou
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 54692
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