--- /dev/null
+Return-Path: <pieter@praet.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0FA73431FB6\r
+ for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:15:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.677\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.677 tagged_above=-999 required=5\r
+ tests=[HS_INDEX_PARAM=0.023, RCVD_IN_DNSWL_LOW=-0.7]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id zXjSQkMJJ519 for <notmuch@notmuchmail.org>;\r
+ Thu, 26 Jan 2012 05:15:31 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+ [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 0A0EB431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:15:30 -0800 (PST)\r
+Received: by wibhi8 with SMTP id hi8so411116wib.26\r
+ for <notmuch@notmuchmail.org>; Thu, 26 Jan 2012 05:15:29 -0800 (PST)\r
+Received: by 10.180.88.169 with SMTP id bh9mr4022597wib.20.1327583729871;\r
+ Thu, 26 Jan 2012 05:15:29 -0800 (PST)\r
+Received: from localhost ([109.131.116.159])\r
+ by mx.google.com with ESMTPS id bu13sm12486538wib.6.2012.01.26.05.15.29\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Thu, 26 Jan 2012 05:15:29 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: [RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and\r
+ `notmuch-show-stash-gmane-and-go'.\r
+Date: Thu, 26 Jan 2012 14:13:30 +0100\r
+Message-Id: <1327583610-30085-1-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <87pqe6vcgv.fsf@praet.org>\r
+References: <87pqe6vcgv.fsf@praet.org>\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 26 Jan 2012 13:15:32 -0000\r
+\r
+---\r
+\r
+Depends on id:"1327397873-20596-1-git-send-email-dme@dme.org"\r
+\r
+ emacs/notmuch-show.el | 55 ++++++++++++++++++++++++++++++++++--------------\r
+ test/emacs | 2 +-\r
+ 2 files changed, 40 insertions(+), 17 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index c4d45e7..0acc4cf 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -123,6 +123,20 @@ indentation."\r
+ (const :tag "View interactively"\r
+ notmuch-show-interactively-view-part)))\r
+ \r
++(defcustom notmuch-show-stash-mlarchive-link-alist\r
++ '(("Gmane" . "http://mid.gmane.org/")\r
++ ("MARC" . "http://marc.info/?i=")\r
++ ("Mail Archive, The" . "http://www.mail-archive.com/search?l=mid&q=")\r
++ ;; FIXME: can these services be searched by `Message-Id' ?\r
++ ;; ("MarkMail" . "http://markmail.org/")\r
++ ;; ("Nabble" . "http://nabble.com/")\r
++ ;; ("opensubscriber" . "http://opensubscriber.com/")\r
++ )\r
++ "Default Mailing List Archive to use when stashing links."\r
++ :type '(alist :key-type (string :tag "Name")\r
++ :value-type (string :tag "URL"))\r
++ :group 'notmuch-show)\r
++\r
+ (defmacro with-current-notmuch-show-message (&rest body)\r
+ "Evaluate body with current buffer set to the text of current message"\r
+ `(save-excursion\r
+@@ -1016,8 +1030,8 @@ thread id. If a prefix is given, crypto processing is toggled."\r
+ (define-key map "s" 'notmuch-show-stash-subject)\r
+ (define-key map "T" 'notmuch-show-stash-tags)\r
+ (define-key map "t" 'notmuch-show-stash-to)\r
+- (define-key map "g" 'notmuch-show-stash-gmane)\r
+- (define-key map "G" 'notmuch-show-stash-gmane-and-go)\r
++ (define-key map "l" 'notmuch-show-stash-mlarchive-link)\r
++ (define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go)\r
+ map)\r
+ "Submap for stash commands")\r
+ (fset 'notmuch-show-stash-map notmuch-show-stash-map)\r
+@@ -1605,23 +1619,32 @@ buffer."\r
+ (interactive)\r
+ (notmuch-common-do-stash (notmuch-show-get-to)))\r
+ \r
+-(defun notmuch-show-stash-gmane ()\r
+- "Copy a Gmane URI for the current message to the kill-ring.\r
++(defun notmuch-show-stash-mlarchive-link ()\r
++ "Copy an ML Archive URI for the current message to the kill-ring.\r
+ \r
+-This presumes that the message is available at Gmane."\r
+- (interactive)\r
+- (notmuch-common-do-stash (concat "http://mid.gmane.org/"\r
+- (substring (notmuch-show-get-message-id) 4 -1))))\r
++This presumes that the message is available at the selected Mailing List Archive.\r
+ \r
+-(defun notmuch-show-stash-gmane-and-go ()\r
+- "Copy a Gmane URI for the current message to the kill-ring and visit it.\r
+-\r
+-This presumes that the message is available at Gmane."\r
++Also see `notmuch-show-stash-mlarchive-link-alist'."\r
++ (interactive)\r
++ (notmuch-common-do-stash\r
++ (concat (cdr (assoc\r
++ (let ((completion-ignore-case t))\r
++ (completing-read\r
++ "ML Archive: "\r
++ notmuch-show-stash-mlarchive-link-alist\r
++ nil t nil nil "Gmane"))\r
++ notmuch-show-stash-mlarchive-link-alist))\r
++ (substring (notmuch-show-get-message-id) 4 -1))))\r
++\r
++(defun notmuch-show-stash-mlarchive-link-and-go ()\r
++ "Copy an ML Archive URI for the current message to the kill-ring and visit it.\r
++\r
++This presumes that the message is available at the selected Mailing List Archive.\r
++\r
++Also see `notmuch-show-stash-mlarchive-link-alist'."\r
+ (interactive)\r
+- (let ((uri (concat "http://mid.gmane.org/"\r
+- (substring (notmuch-show-get-message-id) 4 -1))))\r
+- (notmuch-common-do-stash uri)\r
+- (browse-url uri)))\r
++ (notmuch-show-stash-mlarchive-link)\r
++ (browse-url (current-kill 0 t)))\r
+ \r
+ ;; Commands typically bound to buttons.\r
+ \r
+diff --git a/test/emacs b/test/emacs\r
+index 5f7467d..4e08726 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -382,7 +382,7 @@ test_emacs '(notmuch-show "id:\"bought\"")\r
+ (notmuch-show-stash-message-id-stripped)\r
+ (notmuch-show-stash-tags)\r
+ (notmuch-show-stash-filename)\r
+- (notmuch-show-stash-gmane)\r
++ (notmuch-show-stash-mlarchive-link)\r
+ (switch-to-buffer\r
+ (generate-new-buffer "*test-stashing*"))\r
+ (dotimes (i 10)\r
+-- \r
+1.7.8.1\r
+\r