1 Return-Path: <pieter@praet.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 33AC5431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:09:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id WgtjOqDPAYw4 for <notmuch@notmuchmail.org>;
\r
16 Thu, 26 Jan 2012 05:09:42 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 23367431FAE for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:09:42 -0800
\r
22 Received: by wgbdt12 with SMTP id dt12so499056wgb.2
\r
23 for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:09:41 -0800 (PST)
\r
24 Received: by 10.180.80.8 with SMTP id n8mr3392346wix.14.1327583380892;
\r
25 Thu, 26 Jan 2012 05:09:40 -0800 (PST)
\r
26 Received: from localhost ([109.131.116.159])
\r
27 by mx.google.com with ESMTPS id fr8sm12394010wib.10.2012.01.26.05.09.40
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Thu, 26 Jan 2012 05:09:40 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: David Edmondson <dme@dme.org>
\r
32 Subject: Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and
\r
33 `notmuch-show-stash-gmane-and-go'.
\r
34 In-Reply-To: <cunliownvhs.fsf@hotblack-desiato.hh.sledj.net>
\r
35 References: <1327397873-20596-1-git-send-email-dme@dme.org>
\r
36 <1327452608-8247-1-git-send-email-pieter@praet.org>
\r
37 <cunliownvhs.fsf@hotblack-desiato.hh.sledj.net>
\r
38 User-Agent: Notmuch/0.11+132~ga81001f (http://notmuchmail.org) Emacs/23.3.1
\r
39 (x86_64-unknown-linux-gnu)
\r
40 Date: Thu, 26 Jan 2012 14:07:44 +0100
\r
41 Message-ID: <87pqe6vcgv.fsf@praet.org>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Thu, 26 Jan 2012 13:09:43 -0000
\r
59 On Wed, 25 Jan 2012 06:31:43 +0000, David Edmondson <dme@dme.org> wrote:
\r
60 > On Wed, 25 Jan 2012 01:50:08 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
61 > > In a perfect world, everyone would be using Notmuch and have a local
\r
62 > > copy of every message ever sent to any ML. While we're waiting for
\r
63 > > Atlantis to resurface, we'll need an interim solution.
\r
65 > > +1 for the idea, but Gmane doesn't archive *all* MLs, so we should leave
\r
66 > > the user some legroom. Since I've already made the necessary changes,
\r
67 > > I'll just send the patch instead of wasting your time with suggestions.
\r
68 > > Feel free to merge it into yours.
\r
70 > This is definitely a good idea, but...
\r
75 > > emacs/notmuch-show.el | 40 ++++++++++++++++++++++++++++++----------
\r
76 > > test/emacs | 2 +-
\r
77 > > 2 files changed, 31 insertions(+), 11 deletions(-)
\r
79 > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
80 > > index c4d45e7..7f209cd 100644
\r
81 > > --- a/emacs/notmuch-show.el
\r
82 > > +++ b/emacs/notmuch-show.el
\r
83 > > @@ -123,6 +123,24 @@ indentation."
\r
84 > > (const :tag "View interactively"
\r
85 > > notmuch-show-interactively-view-part)))
\r
87 > > +(defcustom notmuch-show-stash-mlarchive-link-pref "http://mid.gmane.org/"
\r
88 > > + "Default Mailing List Archive to use when stashing links."
\r
89 > > + :group 'notmuch-show
\r
90 > > + ;; TODO: find a working `Message-Id' search arg for all options.
\r
91 > > + :type '(choice (const :tag "Gmane"
\r
92 > > + "http://mid.gmane.org/")
\r
93 > > + ;; (const :tag "MARC"
\r
94 > > + ;; "http://marc.info/")
\r
95 > > + (const :tag "Mail Archive, The"
\r
96 > > + "http://www.mail-archive.com/search?l=mid&q=")
\r
97 > > + ;; (const :tag "MarkMail"
\r
98 > > + ;; "http://markmail.org/")
\r
99 > > + ;; (const :tag "opensubscriber"
\r
100 > > + ;; "http://opensubscriber.com/")
\r
101 > > + ;; (const :tag "Nabble"
\r
102 > > + ;; "http://nabble.com/")
\r
103 > > + (string :tag "Custom URI")))
\r
105 > ...do we not now how to reference messages by message-id on these other
\r
109 I've found the missing Message-Id search URI for 'marc.info', but as
\r
110 for the remaining services: if they provide search by Message-Id,
\r
111 they're pretty damn good at hiding it...
\r
114 > Your point about Gmane not having everything applies equally to any
\r
115 > service, suggesting that perhaps the user should also have an option to
\r
116 > choose which service to use at stash time. Thoughts?
\r
125 > > (defmacro with-current-notmuch-show-message (&rest body)
\r
126 > > "Evaluate body with current buffer set to the text of current message"
\r
127 > > `(save-excursion
\r
128 > > @@ -1016,8 +1034,8 @@ thread id. If a prefix is given, crypto processing is toggled."
\r
129 > > (define-key map "s" 'notmuch-show-stash-subject)
\r
130 > > (define-key map "T" 'notmuch-show-stash-tags)
\r
131 > > (define-key map "t" 'notmuch-show-stash-to)
\r
132 > > - (define-key map "g" 'notmuch-show-stash-gmane)
\r
133 > > - (define-key map "G" 'notmuch-show-stash-gmane-and-go)
\r
134 > > + (define-key map "l" 'notmuch-show-stash-mlarchive-link)
\r
135 > > + (define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go)
\r
137 > > "Submap for stash commands")
\r
138 > > (fset 'notmuch-show-stash-map notmuch-show-stash-map)
\r
139 > > @@ -1605,20 +1623,22 @@ buffer."
\r
141 > > (notmuch-common-do-stash (notmuch-show-get-to)))
\r
143 > > -(defun notmuch-show-stash-gmane ()
\r
144 > > - "Copy a Gmane URI for the current message to the kill-ring.
\r
145 > > +(defun notmuch-show-stash-mlarchive-link ()
\r
146 > > + "Copy an ML Archive URI for the current message to the kill-ring.
\r
148 > > -This presumes that the message is available at Gmane."
\r
149 > > +This presumes that the message is available at the Mailing List Archive
\r
150 > > +configured in `notmuch-show-stash-mlarchive-link-pref'."
\r
152 > > - (notmuch-common-do-stash (concat "http://mid.gmane.org/"
\r
153 > > + (notmuch-common-do-stash (concat notmuch-show-stash-mlarchive-link-pref
\r
154 > > (substring (notmuch-show-get-message-id) 4 -1))))
\r
156 > > -(defun notmuch-show-stash-gmane-and-go ()
\r
157 > > - "Copy a Gmane URI for the current message to the kill-ring and visit it.
\r
158 > > +(defun notmuch-show-stash-mlarchive-link-and-go ()
\r
159 > > + "Copy an ML Archive URI for the current message to the kill-ring and visit it.
\r
161 > > -This presumes that the message is available at Gmane."
\r
162 > > +This presumes that the message is available at the Mailing List Archive
\r
163 > > +configured in `notmuch-show-stash-mlarchive-link-pref'."
\r
165 > > - (let ((uri (concat "http://mid.gmane.org/"
\r
166 > > + (let ((uri (concat notmuch-show-stash-mlarchive-link-pref
\r
167 > > (substring (notmuch-show-get-message-id) 4 -1))))
\r
168 > > (notmuch-common-do-stash uri)
\r
169 > > (browse-url uri)))
\r
170 > > diff --git a/test/emacs b/test/emacs
\r
171 > > index 5f7467d..4e08726 100755
\r
172 > > --- a/test/emacs
\r
173 > > +++ b/test/emacs
\r
174 > > @@ -382,7 +382,7 @@ test_emacs '(notmuch-show "id:\"bought\"")
\r
175 > > (notmuch-show-stash-message-id-stripped)
\r
176 > > (notmuch-show-stash-tags)
\r
177 > > (notmuch-show-stash-filename)
\r
178 > > - (notmuch-show-stash-gmane)
\r
179 > > + (notmuch-show-stash-mlarchive-link)
\r
180 > > (switch-to-buffer
\r
181 > > (generate-new-buffer "*test-stashing*"))
\r
182 > > (dotimes (i 10)
\r