unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] doc: Use the recommended Scheme format.
@ 2015-09-13 20:57 Mathieu Lirzin
  2015-09-13 21:37 ` Cyril Roelandt
  2015-09-13 21:41 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Lirzin @ 2015-09-13 20:57 UTC (permalink / raw)
  To: guix-devel

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


Apply the recommended formatting rules from '.dir-locals.el' to the
examples in the manual in order to fulfill it's purpose of being a
reference.

* doc/package-hello.scm: Indent it.
* doc/guix.texi (Defining Packages, Version Numbers): Likewise.
* gnu/packages/base.scm (hello): Be consistent with the manual.
---
 doc/guix.texi         | 31 ++++++++++++++++---------------
 doc/package-hello.scm |  5 +++--
 gnu/packages/base.scm | 29 +++++++++++++++--------------
 3 files changed, 34 insertions(+), 31 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Use-the-recommended-Scheme-format.patch --]
[-- Type: text/x-patch; name="0001-doc-Use-the-recommended-Scheme-format.patch", Size: 3973 bytes --]

diff --git a/doc/guix.texi b/doc/guix.texi
index 9ae91a8..64c4a55 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1963,13 +1963,14 @@ package looks like this:
 (define-public hello
   (package
     (name "hello")
-    (version "2.8")
+    (version "2.10")
     (source (origin
-             (method url-fetch)
-             (uri (string-append "mirror://gnu/hello/hello-" version
-                                 ".tar.gz"))
-             (sha256
-              (base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/hello/hello-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
     (build-system gnu-build-system)
     (arguments `(#:configure-flags '("--enable-silent-rules")))
     (inputs `(("gawk" ,gawk)))
@@ -7231,22 +7232,22 @@ For instance, the versions 2.24.20 and 3.9.12 of GTK+ may be packaged as follows
 @example
 (define-public gtk+
   (package
-   (name "gtk+")
-   (version "3.9.12")
-   ...))
+    (name "gtk+")
+    (version "3.9.12")
+    ...))
 (define-public gtk+-2
   (package
-   (name "gtk+")
-   (version "2.24.20")
-   ...))
+    (name "gtk+")
+    (version "2.24.20")
+    ...))
 @end example
 If we also wanted GTK+ 3.8.2, this would be packaged as
 @example
 (define-public gtk+-3.8
   (package
-   (name "gtk+")
-   (version "3.8.2")
-   ...))
+    (name "gtk+")
+    (version "3.8.2")
+    ...))
 @end example
 
 
diff --git a/doc/package-hello.scm b/doc/package-hello.scm
index b3fcd4f..c57eb89 100644
--- a/doc/package-hello.scm
+++ b/doc/package-hello.scm
@@ -4,13 +4,14 @@
 
 (package
   (name "hello")
-  (version "2.8")
+  (version "2.10")
   (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/hello/hello-" version
                                 ".tar.gz"))
             (sha256
-             (base32 "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))))
+             (base32
+              "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
   (build-system gnu-build-system)
   (synopsis "Hello, GNU world: An example GNU package")
   (description "Guess what GNU Hello prints!")
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f35f619..c5f4477 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -49,22 +49,23 @@
 
 (define-public hello
   (package
-   (name "hello")
-   (version "2.10")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://gnu/hello/hello-" version
-                                ".tar.gz"))
-            (sha256
-             (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
-   (build-system gnu-build-system)
-   (synopsis "Hello, GNU world: An example GNU package")
-   (description
-    "GNU Hello prints the message \"Hello, world!\" and then exits.  It
+    (name "hello")
+    (version "2.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/hello/hello-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
+    (build-system gnu-build-system)
+    (synopsis "Hello, GNU world: An example GNU package")
+    (description
+     "GNU Hello prints the message \"Hello, world!\" and then exits.  It
 serves as an example of standard GNU coding practices.  As such, it supports
 command-line arguments, multiple languages, and so on.")
-   (home-page "http://www.gnu.org/software/hello/")
-   (license gpl3+)))
+    (home-page "http://www.gnu.org/software/hello/")
+    (license gpl3+)))
 
 (define-public grep
   (package

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

* Re: [PATCH] doc: Use the recommended Scheme format.
  2015-09-13 20:57 [PATCH] doc: Use the recommended Scheme format Mathieu Lirzin
@ 2015-09-13 21:37 ` Cyril Roelandt
  2015-09-14  8:02   ` Ludovic Courtès
  2015-09-13 21:41 ` Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Cyril Roelandt @ 2015-09-13 21:37 UTC (permalink / raw)
  To: guix-devel

On 09/13/2015 10:57 PM, Mathieu Lirzin wrote:
> Apply the recommended formatting rules from '.dir-locals.el' to the
> examples in the manual in order to fulfill it's purpose of being a
> reference.

Isn't there a tool that can reformat the Guile code according to this
file? Kind of like "indent" for C code.


Cyril.

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

* Re: [PATCH] doc: Use the recommended Scheme format.
  2015-09-13 20:57 [PATCH] doc: Use the recommended Scheme format Mathieu Lirzin
  2015-09-13 21:37 ` Cyril Roelandt
@ 2015-09-13 21:41 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-09-13 21:41 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@openmailbox.org> skribis:

> Apply the recommended formatting rules from '.dir-locals.el' to the
> examples in the manual in order to fulfill it's purpose of being a
> reference.

:-)

> * doc/package-hello.scm: Indent it.
> * doc/guix.texi (Defining Packages, Version Numbers): Likewise.
> * gnu/packages/base.scm (hello): Be consistent with the manual.

OK, thanks.

Ludo’.

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

* Re: [PATCH] doc: Use the recommended Scheme format.
  2015-09-13 21:37 ` Cyril Roelandt
@ 2015-09-14  8:02   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2015-09-14  8:02 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 09/13/2015 10:57 PM, Mathieu Lirzin wrote:
>> Apply the recommended formatting rules from '.dir-locals.el' to the
>> examples in the manual in order to fulfill it's purpose of being a
>> reference.
>
> Isn't there a tool that can reformat the Guile code according to this
> file? Kind of like "indent" for C code.

This file is understood by Emacs.  Unfortunately we have no other tool
that understands that.

But again, as discussed at
<https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00280.html>,
some effort to get a consistent style is needed (for instance, the
output of importers clearly needs manual tweaks or Emacs ‘M-q’
aka. ‘paredit-reindent-defun’, which is really a tiny fraction of the
time it takes to prepare a package), but it’s OK if some packages don’t
perfectly follow the fine rules in .dir-locals.el.

Now, if Vim users post a configuration file equivalent to
.dir-locals.el, that’s even better, and I’d happily commit it!

Ludo’.

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

end of thread, other threads:[~2015-09-14  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-13 20:57 [PATCH] doc: Use the recommended Scheme format Mathieu Lirzin
2015-09-13 21:37 ` Cyril Roelandt
2015-09-14  8:02   ` Ludovic Courtès
2015-09-13 21:41 ` Ludovic Courtès

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