unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Emacs Smartparens
@ 2016-05-16 13:32 Catonano
  2016-05-16 13:58 ` Catonano
  2016-05-16 14:35 ` Alex Kost
  0 siblings, 2 replies; 7+ messages in thread
From: Catonano @ 2016-05-16 13:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2517 bytes --]

Ok this is my second attempt

This time it's Smartparens

I used the emacs build system this time and I payied a bit more attention
to the propagated inputs. I'm not sure about the native input though

From 2e15843c941fc470cfe20275c4343c300b9dc8de Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Sun, 15 May 2016 20:40:14 +0200
Subject: [PATCH] package definition for Smartparens appended to
 gnu/packages/emacs.scm

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

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 11010b2..a311635 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1559,3 +1559,46 @@ to recognize a name like \"RFC 1234\".  This package
enhances ffap so
 that it correctly finds RFCs even when a space appears before the
 number.")
     (license license:gpl3+)))
+
+
+
+(define-public emacs-smartparens
+(package
+  (name "emacs-smartparens")
+  (version "1.7.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "http://stable.melpa.org/packages/smartparens-"
+             version
+             ".tar"))
+      (sha256
+        (base32
+          "04dvavsvmdf6fljv30csfkqkglvaw421irlq89v6zf93p0ak0vg6"))))
+  (build-system emacs-build-system)
+  (propagated-inputs `(("emacs-dash" ,emacs-dash))) ; what about cl-lib
0.3 ?
+  (native-inputs `(("emacs" ,emacs-no-x)))
+  (home-page "https://github.com/Fuco1/smartparens")
+  (synopsis
+    "Automatic insertion, wrapping and paredit-like navigation with user
defined pairs.")
+  (description
+    "Smartparens is minor mode for Emacs that deals with parens pairs
+and tries to be smart about it.  It started as a unification effort
+to combine functionality of several existing packages in a single,
+compatible and extensible way to deal with parentheses, delimiters,
+tags and the like.  Some of these packages include autopair,
+textmate, wrap-region, electric-pair-mode, paredit and others.  With
+the basic features found in other packages it also brings many
+improvements as well as completely new features
+
+For a basic overview, see github readme at
+https://github.com/Fuco1/smartparens
+
+For the complete documentation visit the documentation wiki located
+at https://github.com/Fuco1/smartparens/wiki
+
+If you like this project, you can donate here:
+
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEYP5YVHDRX8C
+")
+  (license license:gpl3+)))

[-- Attachment #2: Type: text/html, Size: 3449 bytes --]

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

* Re: [PATCH] Emacs Smartparens
  2016-05-16 13:32 [PATCH] Emacs Smartparens Catonano
@ 2016-05-16 13:58 ` Catonano
  2016-05-16 14:35 ` Alex Kost
  1 sibling, 0 replies; 7+ messages in thread
From: Catonano @ 2016-05-16 13:58 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2206 bytes --]

ahem

this is the same patch, only with a better log line



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

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 11010b2..a311635 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1559,3 +1559,46 @@ to recognize a name like \"RFC 1234\".  This package
enhances ffap so
 that it correctly finds RFCs even when a space appears before the
 number.")
     (license license:gpl3+)))
+
+
+
+(define-public emacs-smartparens
+(package
+  (name "emacs-smartparens")
+  (version "1.7.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "http://stable.melpa.org/packages/smartparens-"
+             version
+             ".tar"))
+      (sha256
+        (base32
+          "04dvavsvmdf6fljv30csfkqkglvaw421irlq89v6zf93p0ak0vg6"))))
+  (build-system emacs-build-system)
+  (propagated-inputs `(("emacs-dash" ,emacs-dash))) ; what about cl-lib
0.3 ?
+  (native-inputs `(("emacs" ,emacs-no-x)))
+  (home-page "https://github.com/Fuco1/smartparens")
+  (synopsis
+    "Automatic insertion, wrapping and paredit-like navigation with user
defined pairs.")
+  (description
+    "Smartparens is minor mode for Emacs that deals with parens pairs
+and tries to be smart about it.  It started as a unification effort
+to combine functionality of several existing packages in a single,
+compatible and extensible way to deal with parentheses, delimiters,
+tags and the like.  Some of these packages include autopair,
+textmate, wrap-region, electric-pair-mode, paredit and others.  With
+the basic features found in other packages it also brings many
+improvements as well as completely new features
+
+For a basic overview, see github readme at
+https://github.com/Fuco1/smartparens
+
+For the complete documentation visit the documentation wiki located
+at https://github.com/Fuco1/smartparens/wiki
+
+If you like this project, you can donate here:
+
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEYP5YVHDRX8C
+")
+  (license license:gpl3+)))
-- 
2.5.5

[-- Attachment #2: Type: text/html, Size: 2967 bytes --]

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

* Re: [PATCH] Emacs Smartparens
  2016-05-16 13:32 [PATCH] Emacs Smartparens Catonano
  2016-05-16 13:58 ` Catonano
@ 2016-05-16 14:35 ` Alex Kost
  2016-05-17 22:44   ` Catonano
  1 sibling, 1 reply; 7+ messages in thread
From: Alex Kost @ 2016-05-16 14:35 UTC (permalink / raw)
  To: Catonano; +Cc: guix-devel

Catonano (2016-05-16 16:32 +0300) wrote:

> Ok this is my second attempt
>
> This time it's Smartparens

Thanks!

> I used the emacs build system this time and I payied a bit more
> attention to the propagated inputs. I'm not sure about the native
> input though

There is no need to specify emacs in native-inputs if emacs-build-system
is used.

I have the same comments as for the zenburn patch (especially about the
way you attach it; I can't really do anything when it is attached like
this), so let's deal with that patch at first and then you can update
this patch accordingly, if you don't mind.

Sorry for the inconvenience :-)

> From 2e15843c941fc470cfe20275c4343c300b9dc8de Mon Sep 17 00:00:00
> 2001
> From: humanitiesNerd <catonano@gmail.com>
> Date: Sun, 15 May 2016 20:40:14 +0200
> Subject: [PATCH] package definition for Smartparens appended to
>  gnu/packages/emacs.scm
>
> ---
>  gnu/packages/emacs.scm | 43
> +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>
> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 11010b2..a311635 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -1559,3 +1559,46 @@ to recognize a name like \"RFC 1234\".  This
> package enhances ffap so
>  that it correctly finds RFCs even when a space appears before the
>  number.")
>      (license license:gpl3+)))
> +
> +
> +
> +(define-public emacs-smartparens
> +(package
> +  (name "emacs-smartparens")
> +  (version "1.7.1")
> +  (source
> +    (origin
> +      (method url-fetch)
> +      (uri (string-append
> +             "http://stable.melpa.org/packages/smartparens-"
> +             version
> +             ".tar"))
> +      (sha256
> +        (base32
> +          "04dvavsvmdf6fljv30csfkqkglvaw421irlq89v6zf93p0ak0vg6"))))
> +  (build-system emacs-build-system)
> +  (propagated-inputs `(("emacs-dash" ,emacs-dash))) ; what about
> cl-lib 0.3 ?

cl-lib is not needed as it is a part of Emacs now.  On MELPA, it is
specified as the package dependency because in the previous versions of
Emacs (< 24) there were no cl-lib library, so if a user have an old
emacs and installs a package that requires cl-lib, it should also be
installed.

> +  (native-inputs `(("emacs" ,emacs-no-x)))
> +  (home-page "https://github.com/Fuco1/smartparens")
> +  (synopsis
> +    "Automatic insertion, wrapping and paredit-like navigation with
> user defined pairs.")

Synopsis shouldn't end with ".".  Did you check your package with "guix
lint"?  It should report about such things.

> +  (description
> +    "Smartparens is minor mode for Emacs that deals with parens
> pairs
> +and tries to be smart about it.  It started as a unification effort
> +to combine functionality of several existing packages in a single,
> +compatible and extensible way to deal with parentheses, delimiters,
> +tags and the like.  Some of these packages include autopair,
> +textmate, wrap-region, electric-pair-mode, paredit and others.  With
> +the basic features found in other packages it also brings many
> +improvements as well as completely new features

I don't think we need the text below in the description.

> +For a basic overview, see github readme at
> +https://github.com/Fuco1/smartparens
> +
> +For the complete documentation visit the documentation wiki located
> +at https://github.com/Fuco1/smartparens/wiki
> +
> +If you like this project, you can donate here:
> +https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
> =CEYP5YVHDRX8C
> +")
> +  (license license:gpl3+)))
>
>

-- 
Alex

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

* Re: [PATCH] Emacs Smartparens
  2016-05-16 14:35 ` Alex Kost
@ 2016-05-17 22:44   ` Catonano
  2016-05-18  9:12     ` Alex Kost
  0 siblings, 1 reply; 7+ messages in thread
From: Catonano @ 2016-05-17 22:44 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel


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

2016-05-16 16:35 GMT+02:00 Alex Kost <alezost@gmail.com>

> Catonano (2016-05-16 16:32 +0300) wrote:
>
> > Ok this is my second attempt
> >
> > This time it's Smartparens
>
> Thanks!
>

;-)


> I have the same comments as for the zenburn patch (especially about the
> way you attach it; I can't really do anything when it is attached like
> this), so let's deal with that patch at first and then you can update
> this patch accordingly, if you don't mind.
>
> Sorry for the inconvenience :-)
>

it's ok ;-)

Now, a few notes about Smartparens.

Smartparens uses Cask. Cask is a language specific project management tool.

Exactly the kind of thing that Guix aims at (right ?)

As far as I understand, Cask provides, among other things, some unit tests
running facility

There's a target in a makefile piloting Cask to run the test. So I
understand. And there's a folder filled with .el files containing tests to
be run.

So, the makefile, the Cask file, Make, Cask and the tests folder are
dependencies ONLY in development.

So maybe there should be 2 outputs for this project, one vanilla output and
one for development.

It gets worse

There's a specific set of dependencies for every Smartparens submode (some
languages have their own submode) so there should be an output for each of
those

And finally there's also a .travis.yml file, an images folder with some gif
files in it, an org-mode file and some files ending with .feature

All this seems an excess to me. A developer will be able to set up an
environment with Make, Cask and other ad hoc dependencies and the files
will be present in the package anyway, even if not used.

It's a few kilobytes anyway.

I hope this is ok

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

[-- Attachment #2: 0001-gnu-Add-Smartparens.patch --]
[-- Type: text/x-patch, Size: 1882 bytes --]

From 141693a22e271afc8dc372c19fc57a4c2c83ba69 Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Tue, 17 May 2016 23:07:06 +0200
Subject: gnu: Add smartparens

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

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 32ed722..d5f3da2 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1612,3 +1612,33 @@ It is built on top of the custom theme support in Emacs 24 or later.")
     (license license:gpl3+)))
 
 
+(define-public emacs-smartparens
+(package
+  (name "emacs-smartparens")
+  (version "1.7.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "https://github.com/Fuco1/smartparens/archive/"
+             version
+             ".tar.gz"))
+      (file-name (string-append name "-" version ".tar.gz"))
+      (sha256
+        (base32
+          "1b47ppkzsj8j8a2p0bmvq05rhm2d2lsm3wlc0sg542r4zr6nji8s"))))
+  (build-system emacs-build-system)
+  (propagated-inputs `(("emacs-dash" ,emacs-dash)))
+  (home-page "https://github.com/Fuco1/smartparens")
+  (synopsis
+   "Paredit-like insertion, wrapping and navigation with user defined pairs")
+  (description
+   "Smartparens is a minor mode for Emacs that deals with parens pairs
+and tries to be smart about it.  It started as a unification effort
+to combine functionality of several existing packages in a single,
+compatible and extensible way to deal with parentheses, delimiters,
+tags and the like.  Some of these packages include autopair,
+textmate, wrap-region, electric-pair-mode, paredit and others.  With
+the basic features found in other packages it also brings many
+improvements as well as completely new features")
+  (license license:gpl3+)))
-- 
2.5.5


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

* Re: [PATCH] Emacs Smartparens
  2016-05-17 22:44   ` Catonano
@ 2016-05-18  9:12     ` Alex Kost
  2016-05-18  9:24       ` Catonano
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Kost @ 2016-05-18  9:12 UTC (permalink / raw)
  To: Catonano; +Cc: guix-devel

Catonano (2016-05-18 01:44 +0300) wrote:

[...]
> Smartparens uses Cask. Cask is a language specific project management
> tool.
>
> Exactly the kind of thing that Guix aims at (right ?)
>
> As far as I understand, Cask provides, among other things, some unit
> tests running facility
>
> There's a target in a makefile piloting Cask to run the test. So I
> understand. And there's a folder filled with .el files containing
> tests to be run.
>
> So, the makefile, the Cask file, Make, Cask and the tests folder are
> dependencies ONLY in development.
>
> So maybe there should be 2 outputs for this project, one vanilla
> output and one for development.

I think there is no need to do this.

> It gets worse
>
> There's a specific set of dependencies for every Smartparens submode
> (some languages have their own submode) so there should be an output
> for each of those

I think that a single output is absolutely OK: all these files (like
"smartparens-haskell.el") are a part of the whole smartparens package;
moreover there is no any "specific set of dependencies".  The only
dependency for smartparens is the "dash" library.

> And finally there's also a .travis.yml file, an images folder with
> some gif files in it, an org-mode file and some files ending with
> .feature
>
> All this seems an excess to me. A developer will be able to set up an
> environment with Make, Cask and other ad hoc dependencies and the
> files will be present in the package anyway, even if not used.
>
> It's a few kilobytes anyway.

I personally wouldn't care about cask, travis.yml and other files, and
would just create a plain package using emacs-build-system.  It will
provide the same functioning package as the one you would install with
Emacs (using "M-x list-packages").  I don't see a reason to deal with
all the additional complexity you mentioned.

-- 
Alex

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

* Re: [PATCH] Emacs Smartparens
  2016-05-18  9:12     ` Alex Kost
@ 2016-05-18  9:24       ` Catonano
  2016-05-19  8:54         ` Alex Kost
  0 siblings, 1 reply; 7+ messages in thread
From: Catonano @ 2016-05-18  9:24 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

2016-05-18 11:12 GMT+02:00 Alex Kost <alezost@gmail.com>:

> Catonano (2016-05-18 01:44 +0300) wrote:
>
> I think that a single output is absolutely OK: all these files (like
> "smartparens-haskell.el") are a part of the whole smartparens package;
> moreover there is no any "specific set of dependencies".  The only
> dependency for smartparens is the "dash" library.
>

I think I saw a file requiring the ruby mode.


> >>
> > > It's a few kilobytes anyway.
> >
> > I personally wouldn't care about cask, travis.yml and other files, and
> > would just create a plain package using emacs-build-system.  It will
> > provide the same functioning package as the one you would install with
> > Emacs (using "M-x list-packages").  I don't see a reason to deal with
> > all the additional complexity you mentioned.
>
>
That's what I thought too and the patch attached to the previous message
does exactly this.

It uses the emacs build system without caring for Cask, Travis or anything

The dash library is in the propagated inputs

[-- Attachment #2: Type: text/html, Size: 1669 bytes --]

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

* Re: [PATCH] Emacs Smartparens
  2016-05-18  9:24       ` Catonano
@ 2016-05-19  8:54         ` Alex Kost
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Kost @ 2016-05-19  8:54 UTC (permalink / raw)
  To: Catonano; +Cc: guix-devel

Catonano (2016-05-18 12:24 +0300) wrote:

> 2016-05-18 11:12 GMT+02:00 Alex Kost <alezost@gmail.com>:
>
>     Catonano (2016-05-18 01:44 +0300) wrote:
>
>     I think that a single output is absolutely OK: all these files
>     (like
>     "smartparens-haskell.el") are a part of the whole smartparens
>     package;
>     moreover there is no any "specific set of dependencies".  The
>     only
>     dependency for smartparens is the "dash" library.
>
> I think I saw a file requiring the ruby mode.

"I think I saw" is not a proof :-) If you mean
<https://github.com/Fuco1/smartparens/blob/master/smartparens-ruby.el>,
then it doesn't require any ruby mode.  Believe me, "dash" is the only
dependency.  Of course, if one wants to use smartparens with a haskell
mode, (s)he need to have this mode, but it is not required.

>     > I personally wouldn't care about cask, travis.yml and other
>     files, and
>     > would just create a plain package using emacs-build-system.  It
>     will
>     > provide the same functioning package as the one you would
>     install with
>     > Emacs (using "M-x list-packages").  I don't see a reason to
>     deal with
>     > all the additional complexity you mentioned.
>
> That's what I thought too and the patch attached to the previous
> message does exactly this.

Sorry, I overlooked it.  Applied as 5c447e2.  Thanks!

-- 
Alex

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

end of thread, other threads:[~2016-05-19  8:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 13:32 [PATCH] Emacs Smartparens Catonano
2016-05-16 13:58 ` Catonano
2016-05-16 14:35 ` Alex Kost
2016-05-17 22:44   ` Catonano
2016-05-18  9:12     ` Alex Kost
2016-05-18  9:24       ` Catonano
2016-05-19  8:54         ` Alex Kost

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).