[17/17] gnu: Add emacs-solarized-theme.

Message ID 20160712210514.21310-18-rekado@elephly.net
State New
Headers

Commit Message

Ricardo Wurmus July 12, 2016, 9:05 p.m. UTC
  * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
---
 gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
  

Comments

Roel Janssen July 13, 2016, 5:33 p.m. UTC | #1
Ricardo Wurmus writes:

> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
> ---
>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 2c92756..4f2d5ca 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -2086,6 +2086,30 @@ number.")
>  It is built on top of the custom theme support in Emacs 24 or later.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-solarized-theme
> +  (package
> +    (name "emacs-solarized-theme")
> +    (version "1.2.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
> +                                  "archive/v"  version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
> +    (build-system emacs-build-system)
> +    (propagated-inputs
> +     `(("emacs-dash" ,emacs-dash)
> +       ("emacs-f" ,emacs-f)
> +       ("emacs-s" ,emacs-s)))
> +    (home-page "http://github.com/bbatsov/solarized-emacs")
> +    (synopsis "Port of the Solarized theme for Emacs")
> +    (description
> +     "Solarized for Emacs is a port of the Solarized theme for Vim.  This
> +package provides a light and a dark variant.")
> +    (license license:gpl3+)))
> +
>  (define-public emacs-smartparens
>    (package
>      (name "emacs-smartparens")

After installing this package I tried to `M-x load-theme solarized'.  That
resulted in the error: `Undefined Custom theme solarized'.

However, `solarized-dark' works fine.

Could you verify that `M-x load-theme solarized' works on your end?

Kind regards,
Roel Janssen
  
Ricardo Wurmus July 13, 2016, 7:13 p.m. UTC | #2
Roel Janssen <roel@gnu.org> writes:

> Ricardo Wurmus writes:
>
>> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
>> ---
>>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>>  1 file changed, 24 insertions(+)
>>
>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>> index 2c92756..4f2d5ca 100644
>> --- a/gnu/packages/emacs.scm
>> +++ b/gnu/packages/emacs.scm
>> @@ -2086,6 +2086,30 @@ number.")
>>  It is built on top of the custom theme support in Emacs 24 or later.")
>>      (license license:gpl3+)))
>>  
>> +(define-public emacs-solarized-theme
>> +  (package
>> +    (name "emacs-solarized-theme")
>> +    (version "1.2.2")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
>> +                                  "archive/v"  version ".tar.gz"))
>> +              (file-name (string-append name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
>> +    (build-system emacs-build-system)
>> +    (propagated-inputs
>> +     `(("emacs-dash" ,emacs-dash)
>> +       ("emacs-f" ,emacs-f)
>> +       ("emacs-s" ,emacs-s)))
>> +    (home-page "http://github.com/bbatsov/solarized-emacs")
>> +    (synopsis "Port of the Solarized theme for Emacs")
>> +    (description
>> +     "Solarized for Emacs is a port of the Solarized theme for Vim.  This
>> +package provides a light and a dark variant.")
>> +    (license license:gpl3+)))
>> +
>>  (define-public emacs-smartparens
>>    (package
>>      (name "emacs-smartparens")
>
> After installing this package I tried to `M-x load-theme solarized'.  That
> resulted in the error: `Undefined Custom theme solarized'.
>
> However, `solarized-dark' works fine.
>
> Could you verify that `M-x load-theme solarized' works on your end?

I’m using “solarized-light” only.  Is “M-x load-theme solarized”
even supposed to work?

~~ Ricardo
  
Roel Janssen July 13, 2016, 8:50 p.m. UTC | #3
Ricardo Wurmus writes:

> Roel Janssen <roel@gnu.org> writes:
>
>> Ricardo Wurmus writes:
>>
>>> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
>>> ---
>>>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>>>  1 file changed, 24 insertions(+)
>>>
>>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>>> index 2c92756..4f2d5ca 100644
>>> --- a/gnu/packages/emacs.scm
>>> +++ b/gnu/packages/emacs.scm
>>> @@ -2086,6 +2086,30 @@ number.")
>>>  It is built on top of the custom theme support in Emacs 24 or later.")
>>>      (license license:gpl3+)))
>>>  
>>> +(define-public emacs-solarized-theme
>>> +  (package
>>> +    (name "emacs-solarized-theme")
>>> +    (version "1.2.2")
>>> +    (source (origin
>>> +              (method url-fetch)
>>> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
>>> +                                  "archive/v"  version ".tar.gz"))
>>> +              (file-name (string-append name "-" version ".tar.gz"))
>>> +              (sha256
>>> +               (base32
>>> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
>>> +    (build-system emacs-build-system)
>>> +    (propagated-inputs
>>> +     `(("emacs-dash" ,emacs-dash)
>>> +       ("emacs-f" ,emacs-f)
>>> +       ("emacs-s" ,emacs-s)))
>>> +    (home-page "http://github.com/bbatsov/solarized-emacs")
>>> +    (synopsis "Port of the Solarized theme for Emacs")
>>> +    (description
>>> +     "Solarized for Emacs is a port of the Solarized theme for Vim.  This
>>> +package provides a light and a dark variant.")
>>> +    (license license:gpl3+)))
>>> +
>>>  (define-public emacs-smartparens
>>>    (package
>>>      (name "emacs-smartparens")
>>
>> After installing this package I tried to `M-x load-theme solarized'.  That
>> resulted in the error: `Undefined Custom theme solarized'.
>>
>> However, `solarized-dark' works fine.
>>
>> Could you verify that `M-x load-theme solarized' works on your end?
>
> I’m using “solarized-light” only.  Is “M-x load-theme solarized”
> even supposed to work?

The auto-completion shows three themes: solarized, solarized-light, and
solarized-dark.  The description says this package provides two themes:
light and dark.

I guess it works as it is supposed to, because the description tells
there are two variants.

So, the patch is fine with me.

Kind regards,
Roel Janssen
  
Alex Kost July 15, 2016, 1:55 p.m. UTC | #4
Roel Janssen (2016-07-13 23:50 +0300) wrote:

> Ricardo Wurmus writes:
>
>> Roel Janssen <roel@gnu.org> writes:
[...]
>>> After installing this package I tried to `M-x load-theme solarized'.  That
>>> resulted in the error: `Undefined Custom theme solarized'.
>>>
>>> However, `solarized-dark' works fine.
>>>
>>> Could you verify that `M-x load-theme solarized' works on your end?
>>
>> I’m using “solarized-light” only.  Is “M-x load-theme solarized”
>> even supposed to work?
>
> The auto-completion shows three themes: solarized, solarized-light, and
> solarized-dark.  The description says this package provides two themes:
> light and dark.

The code also says there are only 2 themes (light and dark).

> I guess it works as it is supposed to, because the description tells
> there are two variants.

Right, "M-x load-theme solarized" is not supposed to work.  There is no
such theme.

As for the false completion you mentioned, it happens because of this
file:

  https://github.com/bbatsov/solarized-emacs/blob/master/solarized-theme.el

"M-x load-theme" uses 'custom-available-themes' function to define a
list of themes and since there is "solarized-theme.el" file, 'solarized'
symbol also appears in this list (but there is no "solarized" theme).

I would say this is a (tiny) solarized bug.  I don't see a purpose in
this "solarized-theme.el" file (probably historical reasons).
  
Alex Kost July 15, 2016, 1:57 p.m. UTC | #5
Ricardo Wurmus (2016-07-13 00:05 +0300) wrote:

> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
> ---
>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 2c92756..4f2d5ca 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -2086,6 +2086,30 @@ number.")
>  It is built on top of the custom theme support in Emacs 24 or later.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-solarized-theme
> +  (package
> +    (name "emacs-solarized-theme")
> +    (version "1.2.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
> +                                  "archive/v"  version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
> +    (build-system emacs-build-system)
> +    (propagated-inputs
> +     `(("emacs-dash" ,emacs-dash)
> +       ("emacs-f" ,emacs-f)
> +       ("emacs-s" ,emacs-s)))

There is no need in "f" and "s", this package depends only on "dash"
library.  Otherwise LGTM.

> +    (home-page "http://github.com/bbatsov/solarized-emacs")
> +    (synopsis "Port of the Solarized theme for Emacs")
> +    (description
> +     "Solarized for Emacs is a port of the Solarized theme for Vim.  This
> +package provides a light and a dark variant.")
> +    (license license:gpl3+)))
> +
>  (define-public emacs-smartparens
>    (package
>      (name "emacs-smartparens")
  
Alex Kost July 20, 2016, 7:07 a.m. UTC | #6
Alex Kost (2016-07-15 16:57 +0300) wrote:

> Ricardo Wurmus (2016-07-13 00:05 +0300) wrote:
>
>> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
>> ---
>>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>>  1 file changed, 24 insertions(+)
>>
>>
>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>> index 2c92756..4f2d5ca 100644
>> --- a/gnu/packages/emacs.scm
>> +++ b/gnu/packages/emacs.scm
>> @@ -2086,6 +2086,30 @@ number.")
>>  It is built on top of the custom theme support in Emacs 24 or later.")
>>      (license license:gpl3+)))
>>  
>> +(define-public emacs-solarized-theme
>> +  (package
>> +    (name "emacs-solarized-theme")
>> +    (version "1.2.2")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
>> +                                  "archive/v"  version ".tar.gz"))
>> +              (file-name (string-append name "-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
>> +    (build-system emacs-build-system)
>> +    (propagated-inputs
>> +     `(("emacs-dash" ,emacs-dash)
>> +       ("emacs-f" ,emacs-f)
>> +       ("emacs-s" ,emacs-s)))
>
> There is no need in "f" and "s", this package depends only on "dash"
> library.  Otherwise LGTM.

<cough> you seem to forget to remove "f" and "s" in commit 012c8b3 :-)
  
Ricardo Wurmus July 20, 2016, 8:01 p.m. UTC | #7
Alex Kost <alezost@gmail.com> writes:

> Alex Kost (2016-07-15 16:57 +0300) wrote:
>
>> Ricardo Wurmus (2016-07-13 00:05 +0300) wrote:
>>
>>> * gnu/packages/emacs.scm (emacs-solarized-theme): New variable.
>>> ---
>>>  gnu/packages/emacs.scm | 24 ++++++++++++++++++++++++
>>>  1 file changed, 24 insertions(+)
>>>
>>>
>>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>>> index 2c92756..4f2d5ca 100644
>>> --- a/gnu/packages/emacs.scm
>>> +++ b/gnu/packages/emacs.scm
>>> @@ -2086,6 +2086,30 @@ number.")
>>>  It is built on top of the custom theme support in Emacs 24 or later.")
>>>      (license license:gpl3+)))
>>>  
>>> +(define-public emacs-solarized-theme
>>> +  (package
>>> +    (name "emacs-solarized-theme")
>>> +    (version "1.2.2")
>>> +    (source (origin
>>> +              (method url-fetch)
>>> +              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
>>> +                                  "archive/v"  version ".tar.gz"))
>>> +              (file-name (string-append name "-" version ".tar.gz"))
>>> +              (sha256
>>> +               (base32
>>> +                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
>>> +    (build-system emacs-build-system)
>>> +    (propagated-inputs
>>> +     `(("emacs-dash" ,emacs-dash)
>>> +       ("emacs-f" ,emacs-f)
>>> +       ("emacs-s" ,emacs-s)))
>>
>> There is no need in "f" and "s", this package depends only on "dash"
>> library.  Otherwise LGTM.
>
> <cough> you seem to forget to remove "f" and "s" in commit 012c8b3 :-)

Argh, you are right!  I’m sorry :(

~~ Ricardo
  

Patch

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 2c92756..4f2d5ca 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2086,6 +2086,30 @@  number.")
 It is built on top of the custom theme support in Emacs 24 or later.")
     (license license:gpl3+)))
 
+(define-public emacs-solarized-theme
+  (package
+    (name "emacs-solarized-theme")
+    (version "1.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/bbatsov/solarized-emacs/"
+                                  "archive/v"  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1ha3slc6d9wi9ilkhmwrzkvf308n6ph7b0k69pk369s9304awxzx"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-dash" ,emacs-dash)
+       ("emacs-f" ,emacs-f)
+       ("emacs-s" ,emacs-s)))
+    (home-page "http://github.com/bbatsov/solarized-emacs")
+    (synopsis "Port of the Solarized theme for Emacs")
+    (description
+     "Solarized for Emacs is a port of the Solarized theme for Vim.  This
+package provides a light and a dark variant.")
+    (license license:gpl3+)))
+
 (define-public emacs-smartparens
   (package
     (name "emacs-smartparens")