[PATCH] gnu: Add emacs-nano-theme

OpenSubmitted by Maya.
Details
3 participants
  • Liliana Marie Prikler
  • Maxime Devos
  • Maya
Owner
unassigned
Severity
normal
M
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
eOjW4-qn1Zv6eHF0qV0YA8UnOd3rnQqJcuim3jpooWykVlSTjMWtrrtKhMc0ZZ-o1y8J2FMQriORYSN_eGnHN7254U5aQZGXjvRT-VuSppg=@protonmail.com
---
This is my first git patch ever. I really hope I did everything correctly. This is imported emacs package from ELPA, but I shortened the ELPA description a bit.

I apologize for any mistakes I made. I never used this method before.

Maya

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

Toggle diff (39 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 2d95421472..e88c2898b8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1076,6 +1076,34 @@ (define-public emacs-nano-modeline
 displayed at the bottom or at the top.")
       (license license:gpl3+))))

+(define-public emacs-nano-theme
+  (package
+   (name "emacs-nano-theme")
+   (version "0.3.0")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://elpa.gnu.org/packages/nano-theme-"
+           version
+           ".tar"))
+     (sha256
+      (base32 "1nq5x46467vnsfg3fzb0qyg97xpnwsvbqg8frdjil5zq5fhsgmrz"))))
+   (build-system emacs-build-system)
+   (home-page "https://github.com/rougier/nano-theme")
+   (synopsis "N Λ N O theme")
+   (description
+    "N Λ N O theme is a consistent theme that comes in two flavors:  - a light theme
+that is based on Material (https://material.io/)  - a dark theme that is based
+on Nord (https://www.nordtheme.com/).
+
+A theme is fully defined by a set of (1+6) faces as explained in this paper
+https://arxiv.org/abs/2008.06030
+
+Recommended font is \"Roboto Mono\" or \"Roboto Mono Nerd\" if you want to benefit
+from all the fancy glyphs.")
+   (license license:gpl3+)))
+
 (define-public emacs-moody
   (package
     (name "emacs-moody")
--
2.35.1
M
M
Maxime Devos wrote on 17 Apr 10:31 +0200
f4b98dea396c32dda07f434ce5d4a0f5975a056e.camel@telenet.be
Maya via Guix-patches via schreef op vr 15-04-2022 om 09:50 [+0000]:
Toggle quote (4 lines)
> +   (synopsis "N Λ N O theme")
> +   (description
> +    "N Λ N O theme

Conventionally, except for composite words, words are written without
spaces. And Λ is not a fancy A, but the capital Greek letter lambda.
You are also mixing Greek and Latin alphabet here, and I don't see why
the lambda, nu and omicron is capitalised here. My proposal: Νανο.

(Nitpickery reported upstream at
has to be changed downstream in Guix.)

Toggle quote (4 lines)
> is a consistent theme that comes in two flavors:  - a light theme
> +that is based on Material (https://material.io/)  - a dark theme that is based
> +on Nord (https://www.nordtheme.com/).

To make lists, use the Texinfo markup @itemize, @item and @end itemize,
then "guix show emacs-nano-theme" can render the list nicely.
Texinfo also has some markup for hyperlinks.

Toggle quote (4 lines)
> +
> +A theme is fully defined by a set of (1+6) faces as explained in this paper
> +https://arxiv.org/abs/2008.06030

Missing period at end of sentence.

Toggle quote (4 lines)
> +
> +Recommended font is \"Roboto Mono\" or \"Roboto Mono Nerd\" if you want to benefit
> +from all the fancy glyphs.")

Maybe a reference to the Guix package (I think it's font-google-
roboto?) would be useful here?

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlvQSRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7r0SAQCSRH2rFm9qmmBguik7g4jowCxU
UfEHLR5QbKvwnm6JbwD9EQkhYIUq5hWzSOTXwRtAZOKMQcpwyDhXUfeWXqXkYAw=
=739v
-----END PGP SIGNATURE-----


M
[PATCH] gnu: Add emacs-nano-theme
(name . 54953@debbugs.gnu.org)(address . 54953@debbugs.gnu.org)
snqjE56SFvZc2ZK1KzOP_pQjX5PwLZkCtIl5TIIQ068OgfXnjeg9VVQANDwwhUQwEzLFVgmfcQGigX20lh2IOPSDZT0BnpGfhdq4FgfUkRE=@protonmail.com
I have made the changes you suggested, I only didn't know what to do about your comment regarding the use of greek alphabet, does that mean the patch won't be merged until upstream changes it?

Maya

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

Toggle diff (41 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3d105747d1..ed3aa2e3a6 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1076,6 +1076,36 @@ (define-public emacs-nano-modeline
 displayed at the bottom or at the top.")
       (license license:gpl3+))))

+(define-public emacs-nano-theme
+  (package
+   (name "emacs-nano-theme")
+   (version "0.3.0")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://elpa.gnu.org/packages/nano-theme-"
+           version
+           ".tar"))
+     (sha256
+      (base32 "1nq5x46467vnsfg3fzb0qyg97xpnwsvbqg8frdjil5zq5fhsgmrz"))))
+   (build-system emacs-build-system)
+   (home-page "https://github.com/rougier/nano-theme")
+   (synopsis "N Λ N O theme")
+   (description
+    "N Λ N O theme is a consistent theme that comes in two flavors:
+@itemize
+@item a light theme that is based on Material (@url{https://material.io/})
+@item a dark theme that is based on Nord (@url{https://www.nordtheme.com/}).
+@end itemize
+
+A theme is fully defined by a set of (1+6) faces as explained in this paper
+@url{https://arxiv.org/abs/2008.06030}.
+
+Recommended font is \"Roboto Mono\" (package @code{font-google-roboto}) or \"Roboto Mono Nerd\" if you want to benefit
+from all the fancy glyphs.")
+   (license license:gpl3+)))
+
 (define-public emacs-moody
   (package
     (name "emacs-moody")
--
2.35.1
M
M
Maxime Devos wrote on 18 Apr 09:37 +0200
922635d9d3c353de877e255ba552e67e75e323a8.camel@telenet.be
Maya via Guix-patches via schreef op zo 17-04-2022 om 18:45 [+0000]:
Toggle quote (4 lines)
> I have made the changes you suggested, I only didn't know what to do
> about your comment regarding the use of greek alphabet, does that mean
> the patch won't be merged until upstream changes it?

I think we can keep the name upstream uses, it just bothered me a bit
(e.g. the extra spaces probably don't interact well with text-to-speech
software).

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYl0VTBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qLrAP0QaEFUEqr0kQLR7vFnVHsZKR+u
/BgJHvWjFTnhpGC8RwD9GoBcUIIgs3Q9dnEsAt4uJ/nd0xrituz9FG48kVnK9QY=
=fBLW
-----END PGP SIGNATURE-----


L
L
Liliana Marie Prikler wrote on 18 Apr 11:36 +0200
Re: [PATCH] gnu: Add emacs-nano-theme
f48e1729eb4e32d4fd3b5842a510bba37cde2a17.camel@gmail.com
Am Sonntag, dem 17.04.2022 um 18:45 +0000 schrieb Maya:
Toggle quote (5 lines)
> I have made the changes you suggested, I only didn't know what to do
> about your comment regarding the use of greek alphabet, does that
> mean the patch won't be merged until upstream changes it?
>
> Maya
For the record, this space is for the commit message, which should be
an explanation if needed (not needed for the addition of a package),
and a ChangeLog.

Toggle quote (1 lines)
> ---
You can add your own comments below this line.

Toggle quote (28 lines)
>  gnu/packages/emacs-xyz.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 3d105747d1..ed3aa2e3a6 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -1076,6 +1076,36 @@ (define-public emacs-nano-modeline
>  displayed at the bottom or at the top.")
>        (license license:gpl3+))))
>
> +(define-public emacs-nano-theme
> +  (package
> +   (name "emacs-nano-theme")
> +   (version "0.3.0")
> +   (source
> +    (origin
> +     (method url-fetch)
> +     (uri (string-append
> +           "https://elpa.gnu.org/packages/nano-theme-"
> +           version
> +           ".tar"))
> +     (sha256
> +      (base32
> "1nq5x46467vnsfg3fzb0qyg97xpnwsvbqg8frdjil5zq5fhsgmrz"))))
> +   (build-system emacs-build-system)
> +   (home-page "https://github.com/rougier/nano-theme")
> +   (synopsis "N Λ N O theme")
You might want to simply write "Emacs theme defined by 7 faces"
Toggle quote (2 lines)
> +   (description
> +    "N Λ N O theme is a consistent theme that comes in two flavors:
I agree with Maxime. Use "Nano Theme", "@code{nano-theme}" or simply
"This package provides a theme that comes in two flavours". I'm not
sure whether we should add "consistent" – it would suggest that other
themes are inconsistent, which sure some of them might be but most
don't strive to be.
Toggle quote (10 lines)
> +@itemize
> +@item a light theme that is based on Material
> (@url{https://material.io/})
> +@item a dark theme that is based on Nord
> (@url{https://www.nordtheme.com/}).
> +@end itemize
> +
> +A theme is fully defined by a set of (1+6) faces as explained in
> this paper
> +@url{https://arxiv.org/abs/2008.06030}.
Here too I would suggest @code{nano-theme} or this-theme.

Toggle quote (3 lines)
> +Recommended font is \"Roboto Mono\" (package @code{font-google-
> roboto}) or \"Roboto Mono Nerd\" if you want to benefit
> +from all the fancy glyphs.")
"It is recommended to use a font with programming ligatures, such as
@code{font-google-roboto}". On that note, does Roboto have programming
ligatures?

Cheers
M
(name . 54953@debbugs.gnu.org)(address . 54953@debbugs.gnu.org)
cuaa8n5SXvhDIcAp-l_CMpYCyIeT8yQIq0HdQ1kQNbcgXZ-pmOqUXJ2sn736Jn-we6TdndvERPT7CQMQTlqXKvmPES_uYBKhdP7mjYVoC8I=@protonmail.com
Toggle quote (3 lines)
> For the record, this space is for the commit message, which should be
> an explanation if needed (not needed for the addition of a package),
> and a ChangeLog.
Oh I am sorry, I didn't know that.

Toggle quote (1 lines)
>You might want to simply write "Emacs theme defined by 7 faces"
I agree. If it is fine that the package now will not agree with upstream.

Toggle quote (5 lines)
> I agree with Maxime. Use "Nano Theme", "@code{nano-theme}" or simply
> "This package provides a theme that comes in two flavours". I'm not
> sure whether we should add "consistent" -- it would suggest that other
> themes are inconsistent, which sure some of them might be but most
> don't strive to be.
I wouldn't call it that ("consistent") myself and I do agree that it sounds a bit weird, if it is, again, fine, that it will not agree with upstream, I will change it.

Toggle quote (1 lines)
> Here too I would suggest @code{nano-theme} or this-theme.
It sounds better. However does it matter that it now will not match guix package name but match the emacs package name?

Toggle quote (3 lines)
> "It is recommended to use a font with programming ligatures, such as
> @code{font-google-roboto}". On that note, does Roboto have programming
> ligatures?
It sadly does not. But Roboto Mono Nerd is not packaged for guix and I haven't checked the license on their assets yet. I believe that Roboto Mono is recommended as a aesthetic matching font.

Best,
Maya.
L
L
Liliana Marie Prikler wrote on 18 Apr 18:03 +0200
c73c48e7214835d6ca86a6e3d7a76aae490f2fd1.camel@gmail.com
Am Montag, dem 18.04.2022 um 13:52 +0000 schrieb Maya:
Toggle quote (4 lines)
> > For the record, this space is for the commit message, which should
> > be an explanation if needed (not needed for the addition of a
> > package), and a ChangeLog.
> Oh I am sorry, I didn't know that.
No problem. Now you do :)

Toggle quote (3 lines)
> > You might want to simply write "Emacs theme defined by 7 faces"
> I agree. If it is fine that the package now will not agree with
> upstream.
Many upstreams don't have useful synopses or descriptions, so we often
have to adapt them. In other words, it's no harm if you put more
effort into synopses and descriptions than merely copying them from
elsewhere, as long as formal requirements are met (e.g. the synopsis is
a short line, the description consists of full sentences, etc.)

Toggle quote (8 lines)
> > I agree with Maxime.  Use "Nano Theme", "@code{nano-theme}" or
> > simply "This package provides a theme that comes in two flavours". 
> > I'm not sure whether we should add "consistent" -- it would suggest
> > that other themes are inconsistent, which sure some of them might
> > be but most don't strive to be.
> I wouldn't call it that ("consistent") myself and I do agree that it
> sounds a bit weird, if it is, again, fine, that it will not agree
> with upstream, I will change it.
As above, we usually strip all marketing words from upstream
descriptions.

Toggle quote (3 lines)
> > Here too I would suggest @code{nano-theme} or this-theme.
> It sounds better. However does it matter that it now will not match
> guix package name but match the emacs package name?
That's fine imo. IIUC nano-theme would be a feature that you can
(require), no?

Toggle quote (6 lines)
> > "It is recommended to use a font with programming ligatures, such
> > as @code{font-google-roboto}".  On that note, does Roboto have
> > programming ligatures?
> It sadly does not. But Roboto Mono Nerd is not packaged for guix and
> I haven't checked the license on their assets yet. I believe that
> Roboto Mono is recommended as a aesthetic matching font.
Last time I checked, Nerd fonts were a special kind of mess that's
difficult to disentangle and more difficult to check licenses on. I
wouldn't bother too hard.

Is the recommendation important in your opinion?

Cheers
M
(No Subject)
(name . 54953@debbugs.gnu.org)(address . 54953@debbugs.gnu.org)
uxnwJ8HF46fjBr59V68T-4EdEVWG3K9VPflRRKOdgLhN-OJNRf7yvDI2t60g7mBZfp6Jaik4tnGTYQ3riLfG7DoV3YgCawur0DAOC4DOMIE=@protonmail.com
Toggle quote (5 lines)
> > > Here too I would suggest @code{nano-theme} or this-theme.
> > It sounds better. However does it matter that it now will not match
> > guix package name but match the emacs package name?
> That's fine imo. IIUC nano-theme would be a feature that you can
> (require), no?
Yes it is a emacs package of that name. You also then load-theme it, so I guess it's fine.

Toggle quote (9 lines)
> > > "It is recommended to use a font with programming ligatures, such
> > > as @code{font-google-roboto}". On that note, does Roboto have
> > > programming ligatures?
> > It sadly does not. But Roboto Mono Nerd is not packaged for guix and
> > I haven't checked the license on their assets yet. I believe that
> > Roboto Mono is recommended as a aesthetic matching font.
> Last time I checked, Nerd fonts were a special kind of mess that's
> difficult to disentangle and more difficult to check licenses on. I
> wouldn't bother too hard.
It looks like it. I didn't felt comfortable packaging it as it looked like they automatically download copyrighted content.

Toggle quote (1 lines)
> Is the recommendation important in your opinion?
There is kind of a problem with that. The nano-theme package also provides a method of setting other not theme-related functionality under the nano-mode function. But that function prints an error if Roboto Mono Nerd isn't present on the system. (but does not fail)

As for the recommendation of the Roboto Mono itself, I don't know. The nano packages are all about aesthetics. And the theme optionally sets faces to Roboto (or Fira Code as a fallback font). Weirdly enough, the code also sets some faces to Victor Mono, but there is no mention of that in the package description.

The longer I'm looking at the code, the weirder it gets. It seems like it's not only a them per-se. But rather a visual style that kind-of breaks the borders of normal emacs theme.

Best,
Maya
?