From patchwork Sun Feb 2 18:06:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amin Bandali X-Patchwork-Id: 20064 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 83D3B168B0; Sun, 2 Feb 2020 18:08:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id CF856168AF for ; Sun, 2 Feb 2020 18:08:09 +0000 (GMT) Received: from localhost ([::1]:58512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyJfF-000544-EG for patchwork@mira.cbaines.net; Sun, 02 Feb 2020 13:08:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyJfA-00053y-2I for guix-patches@gnu.org; Sun, 02 Feb 2020 13:08:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyJf8-0006b0-FF for guix-patches@gnu.org; Sun, 02 Feb 2020 13:08:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyJf8-0006as-CK for guix-patches@gnu.org; Sun, 02 Feb 2020 13:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyJf8-0004UV-87 for guix-patches@gnu.org; Sun, 02 Feb 2020 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39336] [PATCH] gnu: Add emacs-gnus-harvest. Resent-From: Amin Bandali Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Feb 2020 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39336 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 39336@debbugs.gnu.org Received: via spool by 39336-submit@debbugs.gnu.org id=B39336.158066682817185 (code B ref 39336); Sun, 02 Feb 2020 18:08:02 +0000 Received: (at 39336) by debbugs.gnu.org; 2 Feb 2020 18:07:08 +0000 Received: from localhost ([127.0.0.1]:40515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyJeG-0004T6-Em for submit@debbugs.gnu.org; Sun, 02 Feb 2020 13:07:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyJeF-0004Sc-0d for 39336@debbugs.gnu.org; Sun, 02 Feb 2020 13:07:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iyJe9-0006FB-EP; Sun, 02 Feb 2020 13:07:01 -0500 Received: from cpe00fc8d518353-cm00fc8d518350.cpe.net.cable.rogers.com ([99.228.8.225]:35300 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iyJde-0002Ll-U7; Sun, 02 Feb 2020 13:06:33 -0500 From: Amin Bandali Organization: GNU References: <20200129001044.11421-1-mab@gnu.org> <87blqhayml.fsf@nicolasgoaziou.fr> Date: Sun, 02 Feb 2020 13:06:26 -0500 In-Reply-To: <87blqhayml.fsf@nicolasgoaziou.fr> Message-ID: <87h808rhi5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Nicolas Goaziou 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 * * * From 6e56509fca510da3a07107d9ebf00c52de0a39b5 Mon Sep 17 00:00:00 2001 From: Amin Bandali 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