GNU bug report logs - #28805
[PATCH] gnu: Add emacs-org-plus-contrib.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Fri, 13 Oct 2017 05:46:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28805 in the body.
You can then email your comments to 28805 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Fri, 13 Oct 2017 05:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 13 Oct 2017 05:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Fri, 13 Oct 2017 06:45:42 +0100
* gnu/packages/emacs.scm (emacs-org-plus-contrib): 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 b29436154..de2b89370 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4005,6 +4005,30 @@ also is an authoring system with unique support for literate programming and
 reproducible research.")
     (license license:gpl3+)))
 
+(define-public emacs-org-plus-contrib
+  (package
+    (name "emacs-org-plus-contrib")
+    (version "20170917")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://orgmode.org/elpa/org-plus-contrib-"
+                                  version ".tar"))
+              (sha256
+               (base32
+                "1ya4kah8kg13ka3gpsw8hn6y8358843g986p1bgw5w77n9bgbwsl"))))
+    (build-system emacs-build-system)
+    (home-page "http://orgmode.org/")
+    (synopsis "Outline-based notes management and organizer (with contrib files)")
+    (description "Org is an Emacs mode for keeping notes, maintaining TODO
+lists, and project planning with a fast and effective plain-text system.  It
+also is an authoring system with unique support for literate programming and
+reproducible research.
+
+This package includes all the functionality of the @code{emacs-org} package,
+plus all files that you would find in @file{contrib/} from the git
+repository.")
+    (license license:gpl3+)))
+
 (define-public emacs-flx
   (package
     (name "emacs-flx")
-- 
2.14.2





Added blocking bug(s) 28787 Request was from Christopher Baines <mail <at> cbaines.net> to control <at> debbugs.gnu.org. (Fri, 13 Oct 2017 05:47:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Fri, 13 Oct 2017 21:43:02 GMT) Full text and rfc822 format available.

Message #10 received at 28805 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28805 <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Fri, 13 Oct 2017 23:42:34 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> * gnu/packages/emacs.scm (emacs-org-plus-contrib): New variable.

[...]

> +This package includes all the functionality of the @code{emacs-org} package,
> +plus all files that you would find in @file{contrib/} from the git
> +repository.")

I’m sorry to ask ;-), but would it be an option to have a separate
‘emacs-contrib’ package instead?  That way people could install
emacs-org, and optionally emacs-contrib on top of it.

If not, this package if perfectly fine.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Sun, 15 Oct 2017 19:06:01 GMT) Full text and rfc822 format available.

Message #13 received at 28805 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28805 <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Sun, 15 Oct 2017 20:05:17 +0100
[Message part 1 (text/plain, inline)]
On Fri, 13 Oct 2017 23:42:34 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Christopher Baines <mail <at> cbaines.net> skribis:
> 
> > * gnu/packages/emacs.scm (emacs-org-plus-contrib): New variable.  
> 
> [...]
> 
> > +This package includes all the functionality of the @code{emacs-org} package,
> > +plus all files that you would find in @file{contrib/} from the git
> > +repository.")  
> 
> I’m sorry to ask ;-), but would it be an option to have a separate
> ‘emacs-contrib’ package instead?  That way people could install
> emacs-org, and optionally emacs-contrib on top of it.

No problem, I had a similar thought when I was first figuring out what
this contrib thing was.

I've attached my attempt at making an emacs-org-contrib package. Which
binds it to the emacs-org package, propagates emacs-org, as well as
deleting all the files included within the emacs-org package.

Thanks for taking a look,

Chris
[0001-gnu-Add-emacs-org-contrib.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Sun, 15 Oct 2017 19:45:02 GMT) Full text and rfc822 format available.

Message #16 received at 28805 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28805 <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Sun, 15 Oct 2017 21:44:29 +0200
Hi!

Christopher Baines <mail <at> cbaines.net> skribis:

> On Fri, 13 Oct 2017 23:42:34 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:

[...]

>> I’m sorry to ask ;-), but would it be an option to have a separate
>> ‘emacs-contrib’ package instead?  That way people could install
>> emacs-org, and optionally emacs-contrib on top of it.
>
> No problem, I had a similar thought when I was first figuring out what
> this contrib thing was.
>
> I've attached my attempt at making an emacs-org-contrib package. Which
> binds it to the emacs-org package, propagates emacs-org, as well as
> deleting all the files included within the emacs-org package.

[...]

> From 2c5b66bf198ae77047e7c3d4e5631b10e90981eb Mon Sep 17 00:00:00 2001
> From: Christopher Baines <mail <at> cbaines.net>
> Date: Wed, 11 Oct 2017 14:46:47 +0100
> Subject: [PATCH] gnu: Add emacs-org-contrib.
>
> * gnu/packages/emacs.scm (emacs-org-contrib): 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 7661855a8..7a97a5471 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -4099,6 +4099,49 @@ also is an authoring system with unique support for literate programming and
>  reproducible research.")
>      (license license:gpl3+)))
>  
> +(define-public emacs-org-contrib
> +  (package
> +    (inherit emacs-org)
> +    (name "emacs-org-contrib")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "http://orgmode.org/elpa/org-plus-contrib-"
> +                                  (package-version emacs-org) ".tar"))
> +              (sha256
> +               (base32
> +                "1ya4kah8kg13ka3gpsw8hn6y8358843g986p1bgw5w77n9bgbwsl"))))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'delete-org-files
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (use-modules (ice-9 ftw))

Please use #:modules instead of this inner ‘use-modules’ form (it has
wacky semantic and could be deprecated in the future.)

> +             (let ((out (assoc-ref outputs "out")))
> +               (for-each
> +                (lambda (file)
> +                  (if (and (not (string-prefix? "." file))
> +                           (file-exists? file))
> +                      (delete-file
> +                       (string-append
> +                        out
> +                        "/share/emacs/site-lisp/guix.d/org-contrib-"
> +                        ,(package-version emacs-org)
> +                        "/"
> +                        file))))
> +                (scandir
> +                 (string-append
> +                  (assoc-ref inputs "emacs-org")
> +                  "/share/emacs/site-lisp/guix.d/org-"
> +                  ,(package-version emacs-org))))))))))

For clarity, what about first buildign up the list of files to delete,
and then actually deleting them?

  (let* (…
         (org+contrib (map basename (find-files out)))
         (org         (map basename (find-files org)))
         (duplicates  (lset-intersection string=? org+contrib org)))
    (with-directory-excursion (string-append out …)
      (for-each delete-file duplicates))
    #t)

WDYT?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Sun, 15 Oct 2017 20:12:02 GMT) Full text and rfc822 format available.

Message #19 received at 28805 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28805 <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Sun, 15 Oct 2017 21:11:23 +0100
[Message part 1 (text/plain, inline)]
On Sun, 15 Oct 2017 21:44:29 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> > +(define-public emacs-org-contrib
> > +  (package
> > +    (inherit emacs-org)
> > +    (name "emacs-org-contrib")
> > +    (source (origin
> > +              (method url-fetch)
> > +              (uri (string-append "http://orgmode.org/elpa/org-plus-contrib-"
> > +                                  (package-version emacs-org) ".tar"))
> > +              (sha256
> > +               (base32
> > +                "1ya4kah8kg13ka3gpsw8hn6y8358843g986p1bgw5w77n9bgbwsl"))))
> > +    (arguments
> > +     `(#:phases
> > +       (modify-phases %standard-phases
> > +         (add-after 'install 'delete-org-files
> > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > +             (use-modules (ice-9 ftw))  
> 
> Please use #:modules instead of this inner ‘use-modules’ form (it has
> wacky semantic and could be deprecated in the future.)
> 
> > +             (let ((out (assoc-ref outputs "out")))
> > +               (for-each
> > +                (lambda (file)
> > +                  (if (and (not (string-prefix? "." file))
> > +                           (file-exists? file))
> > +                      (delete-file
> > +                       (string-append
> > +                        out
> > +                        "/share/emacs/site-lisp/guix.d/org-contrib-"
> > +                        ,(package-version emacs-org)
> > +                        "/"
> > +                        file))))
> > +                (scandir
> > +                 (string-append
> > +                  (assoc-ref inputs "emacs-org")
> > +                  "/share/emacs/site-lisp/guix.d/org-"
> > +                  ,(package-version emacs-org))))))))))  
> 
> For clarity, what about first buildign up the list of files to delete,
> and then actually deleting them?
> 
>   (let* (…
>          (org+contrib (map basename (find-files out)))
>          (org         (map basename (find-files org)))
>          (duplicates  (lset-intersection string=? org+contrib org)))
>     (with-directory-excursion (string-append out …)
>       (for-each delete-file duplicates))
>     #t)
> 
> WDYT?

That is nice :) I've attached an updated patch.
[0001-gnu-Add-emacs-org-contrib.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28805; Package guix-patches. (Mon, 16 Oct 2017 07:29:02 GMT) Full text and rfc822 format available.

Message #22 received at 28805 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28805 <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Mon, 16 Oct 2017 09:27:57 +0200
Hi!

Christopher Baines <mail <at> cbaines.net> skribis:

> From 43ad9a4e6db6f4f94d2b2f63cbd9b729f5d4e607 Mon Sep 17 00:00:00 2001
> From: Christopher Baines <mail <at> cbaines.net>
> Date: Wed, 11 Oct 2017 14:46:47 +0100
> Subject: [PATCH] gnu: Add emacs-org-contrib.
>
> * gnu/packages/emacs.scm (emacs-org-contrib): New variable.

[...]

> +       (modify-phases %standard-phases
> +         (add-after 'install 'delete-org-files
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (org (assoc-ref inputs "emacs-org"))
> +                    (contrib-files
> +                     (map basename (find-files out)))
> +                    (org+contrib-files
> +                     (map basename (find-files org)))
> +                    (duplicates (lset-intersection
> +                                 string=? contrib-files org+contrib-files)))
> +               (with-directory-excursion
> +                   (string-append
> +                    out "/share/emacs/site-lisp/guix.d/org-contrib-"
> +                    ,(package-version emacs-org))
> +                 (for-each delete-file duplicates))))))))

Awesome.  Just return #t and we’re done.  :-)

Thank you!

Ludo’.




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 16 Oct 2017 07:41:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 16 Oct 2017 07:41:02 GMT) Full text and rfc822 format available.

Message #27 received at 28805-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28805-done <at> debbugs.gnu.org
Subject: Re: [bug#28805] [PATCH] gnu: Add emacs-org-plus-contrib.
Date: Mon, 16 Oct 2017 08:40:55 +0100
[Message part 1 (text/plain, inline)]
On Mon, 16 Oct 2017 09:27:57 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Hi!
> 
> Christopher Baines <mail <at> cbaines.net> skribis:
> 
> > From 43ad9a4e6db6f4f94d2b2f63cbd9b729f5d4e607 Mon Sep 17 00:00:00 2001
> > From: Christopher Baines <mail <at> cbaines.net>
> > Date: Wed, 11 Oct 2017 14:46:47 +0100
> > Subject: [PATCH] gnu: Add emacs-org-contrib.
> >
> > * gnu/packages/emacs.scm (emacs-org-contrib): New variable.  
> 
> [...]
> 
> > +       (modify-phases %standard-phases
> > +         (add-after 'install 'delete-org-files
> > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > +             (let* ((out (assoc-ref outputs "out"))
> > +                    (org (assoc-ref inputs "emacs-org"))
> > +                    (contrib-files
> > +                     (map basename (find-files out)))
> > +                    (org+contrib-files
> > +                     (map basename (find-files org)))
> > +                    (duplicates (lset-intersection
> > +                                 string=? contrib-files org+contrib-files)))
> > +               (with-directory-excursion
> > +                   (string-append
> > +                    out "/share/emacs/site-lisp/guix.d/org-contrib-"
> > +                    ,(package-version emacs-org))
> > +                 (for-each delete-file duplicates))))))))  
> 
> Awesome.  Just return #t and we’re done.  :-)
> 
> Thank you!

Great, I've now added #t, and pushed this. Thanks for reviewing :)
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 Nov 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.