unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest.
@ 2020-01-29  0:10 Amin Bandali
  2020-02-02 13:48 ` Nicolas Goaziou
  2020-02-06 18:22 ` bug#39336: " Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Amin Bandali @ 2020-01-29  0:10 UTC (permalink / raw)
  To: 39336; +Cc: Amin Bandali

* gnu/packages/emacs-xyz.scm (emacs-gnus-harvest): New variable.
---
 gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e834dfffb3..8a955f06bc 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -21237,3 +21237,31 @@ mode-line text (lighter) of major and minor modes.")
       (description "@code{unkillable-scratch} helps prevent killing buffers
 matching a given regexp.")
       (license license:gpl2+))))
+
+(define-public emacs-gnus-harvest
+  ;; Use the latest commit, as there are no tagged releases.
+  (let ((commit "feda071a87b799bd5d23cacde3ee71f0b166e75d")
+        (revision "0"))
+    (package
+      (name "emacs-gnus-harvest")
+      (version (git-version "1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/jwiegley/gnus-harvest.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "08zb7vc3v3wdxkzgi902vlc5ybfvm8fxrvm5drnwfsjj9873pbcb"))))
+      (build-system emacs-build-system)
+      (propagated-inputs
+       `(("sqlite" ,sqlite)))
+      (home-page "https://github.com/jwiegley/gnus-harvest")
+      (synopsis
+       "Harvest email addresses from read/written Gnus articles")
+      (description "@code{gnus-harvest} notices email address in every
+message or post you read or write, and collects them in a SQLite
+database, which can be easily and quickly queried to determine the
+completion list.  Optionally uses @code{bbdb} and @code{message-x}.")
+      (license license:gpl3+))))
-- 
2.25.0

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

* [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest.
  2020-01-29  0:10 [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest Amin Bandali
@ 2020-02-02 13:48 ` Nicolas Goaziou
  2020-02-02 18:06   ` Amin Bandali
  2020-02-06 18:22 ` bug#39336: " Nicolas Goaziou
  1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2020-02-02 13:48 UTC (permalink / raw)
  To: Amin Bandali; +Cc: 39336

Hello,

Amin Bandali <mab@gnu.org> writes:

> * gnu/packages/emacs-xyz.scm (emacs-gnus-harvest): New variable.

Thank you.

> +      (propagated-inputs
> +       `(("sqlite" ,sqlite)))

Must "sqlite" be a propagated input? IOW, could you patch source so it
can be an input instead?

> +      (description "@code{gnus-harvest} notices email address in every
> +message or post you read or write, and collects them in a SQLite
> +database, which can be easily and quickly queried to determine the
> +completion list.  Optionally uses @code{bbdb} and @code{message-x}.")

Would it make sense to add "emacs-message-x" as a propagated input too?

Regards,

-- 
Nicolas Goaziou

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

* [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest.
  2020-02-02 13:48 ` Nicolas Goaziou
@ 2020-02-02 18:06   ` Amin Bandali
  0 siblings, 0 replies; 4+ messages in thread
From: Amin Bandali @ 2020-02-02 18:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 39336


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

Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

[...]
>
> Must "sqlite" be a propagated input? IOW, could you patch source so it
> can be an input instead?
>

Indeed, I see no particular preason to have it as a propagated input.
The v2 attached below implements your suggestion of making it an input
and patching gnus-harvest.el to use it.

>
>> +      (description "@code{gnus-harvest} notices email address in every
>> +message or post you read or write, and collects them in a SQLite
>> +database, which can be easily and quickly queried to determine the
>> +completion list.  Optionally uses @code{bbdb} and @code{message-x}.")
>
> Would it make sense to add "emacs-message-x" as a propagated input too?
>

Summarizing our short chat in #guix, I'm a bit torn on this.  I would
personally probably add message-x to my profile whenever I wanted to use
gnus-harvest, but I'm not sure if I'd want to impose that onto others.
Especially since message-x, like bbdb, is an optional dependency and is
mentioned in the package description.  Of course, if it turns out that
people really always want message-x automatically pulled in along with
gnus-harvest, we could then add it as a propagated input.

-amin

                                 * * *


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-emacs-gnus-harvest.patch --]
[-- Type: text/x-patch, Size: 2524 bytes --]

From 6e56509fca510da3a07107d9ebf00c52de0a39b5 Mon Sep 17 00:00:00 2001
From: Amin Bandali <mab@gnu.org>
Date: Sun, 2 Feb 2020 12:52:54 -0500
Subject: [PATCH v2] gnu: Add emacs-gnus-harvest.

* gnu/packages/emacs-xyz.scm (emacs-gnus-harvest): New variable.
---
 gnu/packages/emacs-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8265b44d88..d302067216 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -21357,3 +21357,42 @@ sense on the @samp{Newsgroups} header, whereas mail alias expansion makes
 sense in the @samp{To} and @samp{Cc} headers).  When in the message body, this
 executes a different function (default: @code{indent-relative}).")
       (license license:gpl2+))))
+
+(define-public emacs-gnus-harvest
+  (let ((commit "feda071a87b799bd5d23cacde3ee71f0b166e75d")
+        (revision "0"))
+    (package
+      (name "emacs-gnus-harvest")
+      (version (git-version "1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/jwiegley/gnus-harvest.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "08zb7vc3v3wdxkzgi902vlc5ybfvm8fxrvm5drnwfsjj9873pbcb"))))
+      (build-system emacs-build-system)
+      (inputs
+       `(("sqlite" ,sqlite)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-before 'build 'patch-exec-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((sqlite (assoc-ref inputs "sqlite"))
+                     (file "gnus-harvest.el"))
+                 (make-file-writable file)
+                 (emacs-substitute-variables file
+                   ("gnus-harvest-sqlite-program"
+                    (string-append sqlite "/bin/sqlite3"))))
+               #t)))))
+      (home-page "https://github.com/jwiegley/gnus-harvest")
+      (synopsis
+       "Harvest email addresses from read/written Gnus articles")
+      (description "@code{gnus-harvest} notices email address in every
+message or post you read or write, and collects them in a SQLite
+database, which can be easily and quickly queried to determine the
+completion list.  Optionally uses @code{bbdb} and @code{message-x}.")
+      (license license:gpl3+))))
-- 
2.25.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* bug#39336: [PATCH] gnu: Add emacs-gnus-harvest.
  2020-01-29  0:10 [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest Amin Bandali
  2020-02-02 13:48 ` Nicolas Goaziou
@ 2020-02-06 18:22 ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2020-02-06 18:22 UTC (permalink / raw)
  To: 39336-done

Applied as 57f06234c7cb64a1d9c6d3fd1a9837b43b20a7eb.

Closing.

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

end of thread, other threads:[~2020-02-06 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-29  0:10 [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest Amin Bandali
2020-02-02 13:48 ` Nicolas Goaziou
2020-02-02 18:06   ` Amin Bandali
2020-02-06 18:22 ` bug#39336: " Nicolas Goaziou

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