diff mbox

[01/10] gnu: Add emacs-smex.

Message ID 20160601140538.20311-1-dthompson2@worcester.edu
State New
Headers show

Commit Message

David Thompson June 1, 2016, 2:05 p.m. UTC
From: David Thompson <davet@gnu.org>

* gnu/packages/emacs.scm (emacs-smex): New variable.
---
 gnu/packages/emacs.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Alex Kost June 2, 2016, 9:26 a.m. UTC | #1
David Thompson (2016-06-01 17:05 +0300) wrote:

> From: David Thompson <davet@gnu.org>
>
> * gnu/packages/emacs.scm (emacs-smex): New variable.
> ---
>  gnu/packages/emacs.scm | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index b7c0a1f..71f2f8b 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -10,6 +10,7 @@
>  ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
>  ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2016 David Thompson <davet@gnu.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1795,3 +1796,24 @@ work on lists, strings and vectors.")
>  Emacs default configuration in uncontroversial ways that nearly everyone can
>  agree upon.")
>      (license license:gpl3+)))
> +
> +(define-public emacs-smex
> +  (package
> +    (name "emacs-smex")
> +    (version "3.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://raw.githubusercontent.com"
> +                                  "/nonsequitur/smex/" version "/smex.el"))

Hm, I see in some packages you use these "githubusercontent" URLs
instead of <https://github.com/nonsequitur/smex/archive/3.0.tar.gz> as
we usually do for github.  IIUC you did it to avoid extra files
(".gitignore", etc.) in the final package directory, right?  If so, I
think it is not needed, I would still use a link to a tagged source code
archive.  Moreover I think it's a problem of emacs-build-system that
these uninteresting files are not removed.

Overall, I don't mind against "githubusercontent", I was just wondering.
Actually, I think you found a good way how to pick the needed files to
make several packages from a single repo (as you did for
"ido-ubiquitous" and "ido-completing-read+").

> +              (file-name (string-append "smex-" version ".el"))
> +              (sha256
> +               (base32
> +                "0ar310zx9k5y4i1vl2rawvi712xj9gx77160860jbs691p77cxqp"))))
> +    (build-system emacs-build-system)
> +    (home-page "http://github.com/nonsequitur/smex/")
> +    (synopsis "M-x interface with Ido-style fuzzy matching")
> +    (description
> +     "Smex is a M-x enhancement for Emacs.  Built on top of Ido, it provides a
> +convenient interface to your recently and most frequently used commands.  And
> +to all the other commands, too.")
> +    (license license:gpl3+)))
David Thompson June 2, 2016, 1:33 p.m. UTC | #2
On Thu, Jun 2, 2016 at 5:26 AM, Alex Kost <alezost@gmail.com> wrote:
> David Thompson (2016-06-01 17:05 +0300) wrote:
>
>> From: David Thompson <davet@gnu.org>
>>
>> * gnu/packages/emacs.scm (emacs-smex): New variable.
>> ---
>>  gnu/packages/emacs.scm | 22 ++++++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>
>>
>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>> index b7c0a1f..71f2f8b 100644
>> --- a/gnu/packages/emacs.scm
>> +++ b/gnu/packages/emacs.scm
>> @@ -10,6 +10,7 @@
>>  ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
>>  ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
>>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>> +;;; Copyright © 2016 David Thompson <davet@gnu.org>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -1795,3 +1796,24 @@ work on lists, strings and vectors.")
>>  Emacs default configuration in uncontroversial ways that nearly everyone can
>>  agree upon.")
>>      (license license:gpl3+)))
>> +
>> +(define-public emacs-smex
>> +  (package
>> +    (name "emacs-smex")
>> +    (version "3.0")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://raw.githubusercontent.com"
>> +                                  "/nonsequitur/smex/" version "/smex.el"))
>
> Hm, I see in some packages you use these "githubusercontent" URLs
> instead of <https://github.com/nonsequitur/smex/archive/3.0.tar.gz> as
> we usually do for github.  IIUC you did it to avoid extra files
> (".gitignore", etc.) in the final package directory, right?  If so, I
> think it is not needed, I would still use a link to a tagged source code
> archive.  Moreover I think it's a problem of emacs-build-system that
> these uninteresting files are not removed.
>
> Overall, I don't mind against "githubusercontent", I was just wondering.
> Actually, I think you found a good way how to pick the needed files to
> make several packages from a single repo (as you did for
> "ido-ubiquitous" and "ido-completing-read+").

Yes, I did this to avoid all sorts of unnecessary files making into
the store, as well as making it more closely mimic the single elisp
files that were released on MELPA or whatever.  These URLs are stable,
so I thought it had a good clever/useful hack ratio. :)

- Dave
Ludovic Courtès June 3, 2016, 8:14 a.m. UTC | #3
"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Thu, Jun 2, 2016 at 5:26 AM, Alex Kost <alezost@gmail.com> wrote:
>> David Thompson (2016-06-01 17:05 +0300) wrote:
>>
>>> From: David Thompson <davet@gnu.org>
>>>
>>> * gnu/packages/emacs.scm (emacs-smex): New variable.
>>> ---
>>>  gnu/packages/emacs.scm | 22 ++++++++++++++++++++++
>>>  1 file changed, 22 insertions(+)
>>>
>>>
>>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>>> index b7c0a1f..71f2f8b 100644
>>> --- a/gnu/packages/emacs.scm
>>> +++ b/gnu/packages/emacs.scm
>>> @@ -10,6 +10,7 @@
>>>  ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
>>>  ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
>>>  ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>>> +;;; Copyright © 2016 David Thompson <davet@gnu.org>
>>>  ;;;
>>>  ;;; This file is part of GNU Guix.
>>>  ;;;
>>> @@ -1795,3 +1796,24 @@ work on lists, strings and vectors.")
>>>  Emacs default configuration in uncontroversial ways that nearly everyone can
>>>  agree upon.")
>>>      (license license:gpl3+)))
>>> +
>>> +(define-public emacs-smex
>>> +  (package
>>> +    (name "emacs-smex")
>>> +    (version "3.0")
>>> +    (source (origin
>>> +              (method url-fetch)
>>> +              (uri (string-append "https://raw.githubusercontent.com"
>>> +                                  "/nonsequitur/smex/" version "/smex.el"))
>>
>> Hm, I see in some packages you use these "githubusercontent" URLs
>> instead of <https://github.com/nonsequitur/smex/archive/3.0.tar.gz> as
>> we usually do for github.  IIUC you did it to avoid extra files
>> (".gitignore", etc.) in the final package directory, right?  If so, I
>> think it is not needed, I would still use a link to a tagged source code
>> archive.  Moreover I think it's a problem of emacs-build-system that
>> these uninteresting files are not removed.
>>
>> Overall, I don't mind against "githubusercontent", I was just wondering.
>> Actually, I think you found a good way how to pick the needed files to
>> make several packages from a single repo (as you did for
>> "ido-ubiquitous" and "ido-completing-read+").
>
> Yes, I did this to avoid all sorts of unnecessary files making into
> the store, as well as making it more closely mimic the single elisp
> files that were released on MELPA or whatever.  These URLs are stable,
> so I thought it had a good clever/useful hack ratio. :)

I think the downside is that the GitHub updater won’t be able to
identify these, although I’m not 100% sure of that.

Anyway, since the URLs are stable, it’s OK.

Thanks,
Ludo’.
Ludovic Courtès June 3, 2016, 8:16 a.m. UTC | #4
Hi!

I skimmed over these patches, and apart from the question regarding the
GitHub updater vs. githubusercontent.com, they LGTM.

Thanks!

Ludo’.
Ben Woodcroft June 3, 2016, 12:10 p.m. UTC | #5
On 06/03/2016 06:14 PM, Ludovic Courtès wrote:
> "Thompson, David" <dthompson2@worcester.edu> skribis:
>
>> On Thu, Jun 2, 2016 at 5:26 AM, Alex Kost <alezost@gmail.com> wrote:
>>> David Thompson (2016-06-01 17:05 +0300) wrote:
>>>
>>>> From: David Thompson <davet@gnu.org>
>>>>
>>>> * gnu/packages/emacs.scm (emacs-smex): New variable.
>>>> ---
>>>>   gnu/packages/emacs.scm | 22 ++++++++++++++++++++++
>>>>   1 file changed, 22 insertions(+)
>>>>
>>>>
>>>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>>>> index b7c0a1f..71f2f8b 100644
>>>> --- a/gnu/packages/emacs.scm
>>>> +++ b/gnu/packages/emacs.scm
>>>> @@ -10,6 +10,7 @@
>>>>   ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
>>>>   ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
>>>>   ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
>>>> +;;; Copyright © 2016 David Thompson <davet@gnu.org>
>>>>   ;;;
>>>>   ;;; This file is part of GNU Guix.
>>>>   ;;;
>>>> @@ -1795,3 +1796,24 @@ work on lists, strings and vectors.")
>>>>   Emacs default configuration in uncontroversial ways that nearly everyone can
>>>>   agree upon.")
>>>>       (license license:gpl3+)))
>>>> +
>>>> +(define-public emacs-smex
>>>> +  (package
>>>> +    (name "emacs-smex")
>>>> +    (version "3.0")
>>>> +    (source (origin
>>>> +              (method url-fetch)
>>>> +              (uri (string-append "https://raw.githubusercontent.com"
>>>> +                                  "/nonsequitur/smex/" version "/smex.el"))
>>> Hm, I see in some packages you use these "githubusercontent" URLs
>>> instead of <https://github.com/nonsequitur/smex/archive/3.0.tar.gz> as
>>> we usually do for github.  IIUC you did it to avoid extra files
>>> (".gitignore", etc.) in the final package directory, right?  If so, I
>>> think it is not needed, I would still use a link to a tagged source code
>>> archive.  Moreover I think it's a problem of emacs-build-system that
>>> these uninteresting files are not removed.
>>>
>>> Overall, I don't mind against "githubusercontent", I was just wondering.
>>> Actually, I think you found a good way how to pick the needed files to
>>> make several packages from a single repo (as you did for
>>> "ido-ubiquitous" and "ido-completing-read+").
>> Yes, I did this to avoid all sorts of unnecessary files making into
>> the store, as well as making it more closely mimic the single elisp
>> files that were released on MELPA or whatever.  These URLs are stable,
>> so I thought it had a good clever/useful hack ratio. :)
> I think the downside is that the GitHub updater won’t be able to
> identify these, although I’m not 100% sure of that.

I haven't actually tested but I would think that is right Ludo. However, 
I expect this issue is solvable with modifications to the GitHub updater.

ben
David Thompson June 3, 2016, 12:56 p.m. UTC | #6
On Fri, Jun 3, 2016 at 4:16 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> Hi!
>
> I skimmed over these patches, and apart from the question regarding the
> GitHub updater vs. githubusercontent.com, they LGTM.

Thanks, I've pushed the patches.  If githubusercontent.com becomes a
problem we can change them back.

- Dave
Ludovic Courtès June 5, 2016, 8:03 p.m. UTC | #7
Ben Woodcroft <b.woodcroft@uq.edu.au> skribis:

> On 06/03/2016 06:14 PM, Ludovic Courtès wrote:

[...]

>> I think the downside is that the GitHub updater won’t be able to
>> identify these, although I’m not 100% sure of that.
>
> I haven't actually tested but I would think that is right
> Ludo.

Indeed:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix upstream)
scheme@(guile-user)> ,use(guix import github)
scheme@(guile-user)> ,use(gnu packages emacs)
scheme@(guile-user)> (package-update-path emacs-smex (list %github-updater))
$2 = #f
scheme@(guile-user)> ((upstream-updater-latest %github-updater) emacs-smex)
$3 = #f
scheme@(guile-user)> ((upstream-updater-predicate %github-updater) emacs-smex)
$4 = #f
--8<---------------cut here---------------end--------------->8---

> However, I expect this issue is solvable with modifications to the
> GitHub updater.

Yeah, we should probably do it eventually.

Thanks for your feedback,
Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index b7c0a1f..71f2f8b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -10,6 +10,7 @@ 
 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016 humanitiesNerd <catonano@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 David Thompson <davet@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1795,3 +1796,24 @@  work on lists, strings and vectors.")
 Emacs default configuration in uncontroversial ways that nearly everyone can
 agree upon.")
     (license license:gpl3+)))
+
+(define-public emacs-smex
+  (package
+    (name "emacs-smex")
+    (version "3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://raw.githubusercontent.com"
+                                  "/nonsequitur/smex/" version "/smex.el"))
+              (file-name (string-append "smex-" version ".el"))
+              (sha256
+               (base32
+                "0ar310zx9k5y4i1vl2rawvi712xj9gx77160860jbs691p77cxqp"))))
+    (build-system emacs-build-system)
+    (home-page "http://github.com/nonsequitur/smex/")
+    (synopsis "M-x interface with Ido-style fuzzy matching")
+    (description
+     "Smex is a M-x enhancement for Emacs.  Built on top of Ido, it provides a
+convenient interface to your recently and most frequently used commands.  And
+to all the other commands, too.")
+    (license license:gpl3+)))