[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-30 Thread Pieter Praet
On Fri, 27 Jan 2012 20:36:40 +0400, Dmitry Kurochkin  wrote:
> On Fri, 27 Jan 2012 09:42:23 +0100, Pieter Praet  wrote:
> > On Thu, 26 Jan 2012 14:40:26 +, David Edmondson  wrote:
> > > In general, I like this.
> > > 
> > > - I think that the stash function(s) should take an optional argument
> > >   specifying the archive to use. That will make testing simpler and also
> > >   allow people to produce preferred bindings more easily.
> > > 
> > 
> > Agreed.  In fact, apparently that last patch [1] of mine made the test
> > suite hang @ emacs:"Stashing in notmuch-show" due to it waiting for
> > `completing-read' to finish...  Sorry for that.
> > 
> > > - "Message archive: " feels better than "ML Archive: ", but I don't
> > >   really care.
> > > 
> > 
> > Agreed.
> > 
> 
> FWIW I believe "Mailing list archive" would be better.
> 

Agreed.


> Regards,
>   Dmitry
> 
> > > - Don't base the patch on the thing that I posted, just on master from
> > >   the repository - no need to make David's life harder.
> > 
> > Seeing as how it was only a minor improvement to your idea (and further
> > discussion/correction was probably appropriate), I intended for you to
> > squash it into your original patch.
> > 
> > Anyways, patch (relative to master) follows...
> > 
> > 
> > Peace
> > 
> > -- 
> > Pieter
> > 
> > [1] id:"1327583610-30085-1-git-send-email-pieter at praet.org"
> > ___
> > notmuch mailing list
> > notmuch at notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch


Peace

-- 
Pieter


Re: [RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-29 Thread Pieter Praet
On Fri, 27 Jan 2012 20:36:40 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 On Fri, 27 Jan 2012 09:42:23 +0100, Pieter Praet pie...@praet.org wrote:
  On Thu, 26 Jan 2012 14:40:26 +, David Edmondson d...@dme.org wrote:
   In general, I like this.
   
   - I think that the stash function(s) should take an optional argument
 specifying the archive to use. That will make testing simpler and also
 allow people to produce preferred bindings more easily.
   
  
  Agreed.  In fact, apparently that last patch [1] of mine made the test
  suite hang @ emacs:Stashing in notmuch-show due to it waiting for
  `completing-read' to finish...  Sorry for that.
  
   - Message archive:  feels better than ML Archive: , but I don't
 really care.
   
  
  Agreed.
  
 
 FWIW I believe Mailing list archive would be better.
 

Agreed.


 Regards,
   Dmitry
 
   - Don't base the patch on the thing that I posted, just on master from
 the repository - no need to make David's life harder.
  
  Seeing as how it was only a minor improvement to your idea (and further
  discussion/correction was probably appropriate), I intended for you to
  squash it into your original patch.
  
  Anyways, patch (relative to master) follows...
  
  
  Peace
  
  -- 
  Pieter
  
  [1] id:1327583610-30085-1-git-send-email-pie...@praet.org
  ___
  notmuch mailing list
  notmuch@notmuchmail.org
  http://notmuchmail.org/mailman/listinfo/notmuch


Peace

-- 
Pieter
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-27 Thread Dmitry Kurochkin
On Fri, 27 Jan 2012 09:42:23 +0100, Pieter Praet  wrote:
> On Thu, 26 Jan 2012 14:40:26 +, David Edmondson  wrote:
> > In general, I like this.
> > 
> > - I think that the stash function(s) should take an optional argument
> >   specifying the archive to use. That will make testing simpler and also
> >   allow people to produce preferred bindings more easily.
> > 
> 
> Agreed.  In fact, apparently that last patch [1] of mine made the test
> suite hang @ emacs:"Stashing in notmuch-show" due to it waiting for
> `completing-read' to finish...  Sorry for that.
> 
> > - "Message archive: " feels better than "ML Archive: ", but I don't
> >   really care.
> > 
> 
> Agreed.
> 

FWIW I believe "Mailing list archive" would be better.

Regards,
  Dmitry

> > - Don't base the patch on the thing that I posted, just on master from
> >   the repository - no need to make David's life harder.
> 
> Seeing as how it was only a minor improvement to your idea (and further
> discussion/correction was probably appropriate), I intended for you to
> squash it into your original patch.
> 
> Anyways, patch (relative to master) follows...
> 
> 
> Peace
> 
> -- 
> Pieter
> 
> [1] id:"1327583610-30085-1-git-send-email-pieter at praet.org"
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-27 Thread Pieter Praet
On Thu, 26 Jan 2012 14:40:26 +, David Edmondson  wrote:
> In general, I like this.
> 
> - I think that the stash function(s) should take an optional argument
>   specifying the archive to use. That will make testing simpler and also
>   allow people to produce preferred bindings more easily.
> 

Agreed.  In fact, apparently that last patch [1] of mine made the test
suite hang @ emacs:"Stashing in notmuch-show" due to it waiting for
`completing-read' to finish...  Sorry for that.

> - "Message archive: " feels better than "ML Archive: ", but I don't
>   really care.
> 

Agreed.

> - Don't base the patch on the thing that I posted, just on master from
>   the repository - no need to make David's life harder.

Seeing as how it was only a minor improvement to your idea (and further
discussion/correction was probably appropriate), I intended for you to
squash it into your original patch.

Anyways, patch (relative to master) follows...


Peace

-- 
Pieter

[1] id:"1327583610-30085-1-git-send-email-pieter at praet.org"


Re: [RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-27 Thread Pieter Praet
On Thu, 26 Jan 2012 14:40:26 +, David Edmondson d...@dme.org wrote:
 In general, I like this.
 
 - I think that the stash function(s) should take an optional argument
   specifying the archive to use. That will make testing simpler and also
   allow people to produce preferred bindings more easily.
 

Agreed.  In fact, apparently that last patch [1] of mine made the test
suite hang @ emacs:Stashing in notmuch-show due to it waiting for
`completing-read' to finish...  Sorry for that.

 - Message archive:  feels better than ML Archive: , but I don't
   really care.
 

Agreed.

 - Don't base the patch on the thing that I posted, just on master from
   the repository - no need to make David's life harder.

Seeing as how it was only a minor improvement to your idea (and further
discussion/correction was probably appropriate), I intended for you to
squash it into your original patch.

Anyways, patch (relative to master) follows...


Peace

-- 
Pieter

[1] id:1327583610-30085-1-git-send-email-pie...@praet.org
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-26 Thread David Edmondson
In general, I like this.

- I think that the stash function(s) should take an optional argument
  specifying the archive to use. That will make testing simpler and also
  allow people to produce preferred bindings more easily.

- "Message archive: " feels better than "ML Archive: ", but I don't
  really care.

- Don't base the patch on the thing that I posted, just on master from
  the repository - no need to make David's life harder.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-26 Thread Pieter Praet
---

Depends on id:"1327397873-20596-1-git-send-email-dme at dme.org"

 emacs/notmuch-show.el |   55 ++--
 test/emacs|2 +-
 2 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c4d45e7..0acc4cf 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -123,6 +123,20 @@ indentation."
 (const :tag "View interactively"
notmuch-show-interactively-view-part)))

+(defcustom notmuch-show-stash-mlarchive-link-alist
+  '(("Gmane" . "http://mid.gmane.org/;)
+("MARC" . "http://marc.info/?i=;)
+("Mail Archive, The" . "http://www.mail-archive.com/search?l=mid=;)
+;; FIXME: can these services be searched by `Message-Id' ?
+;; ("MarkMail" . "http://markmail.org/;)
+;; ("Nabble" . "http://nabble.com/;)
+;; ("opensubscriber" . "http://opensubscriber.com/;)
+)
+  "Default Mailing List Archive to use when stashing links."
+  :type '(alist :key-type (string :tag "Name")
+   :value-type (string :tag "URL"))
+  :group 'notmuch-show)
+
 (defmacro with-current-notmuch-show-message ( body)
   "Evaluate body with current buffer set to the text of current message"
   `(save-excursion
@@ -1016,8 +1030,8 @@ thread id.  If a prefix is given, crypto processing is 
toggled."
 (define-key map "s" 'notmuch-show-stash-subject)
 (define-key map "T" 'notmuch-show-stash-tags)
 (define-key map "t" 'notmuch-show-stash-to)
-(define-key map "g" 'notmuch-show-stash-gmane)
-(define-key map "G" 'notmuch-show-stash-gmane-and-go)
+(define-key map "l" 'notmuch-show-stash-mlarchive-link)
+(define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go)
 map)
   "Submap for stash commands")
 (fset 'notmuch-show-stash-map notmuch-show-stash-map)
@@ -1605,23 +1619,32 @@ buffer."
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-to)))

-(defun notmuch-show-stash-gmane ()
-  "Copy a Gmane URI for the current message to the kill-ring.
+(defun notmuch-show-stash-mlarchive-link ()
+  "Copy an ML Archive URI for the current message to the kill-ring.

-This presumes that the message is available at Gmane."
-  (interactive)
-  (notmuch-common-do-stash (concat "http://mid.gmane.org/;
-  (substring (notmuch-show-get-message-id) 4 
-1
+This presumes that the message is available at the selected Mailing List 
Archive.

-(defun notmuch-show-stash-gmane-and-go ()
-  "Copy a Gmane URI for the current message to the kill-ring and visit it.
-
-This presumes that the message is available at Gmane."
+Also see `notmuch-show-stash-mlarchive-link-alist'."
+  (interactive)
+  (notmuch-common-do-stash
+   (concat (cdr (assoc
+(let ((completion-ignore-case t))
+  (completing-read
+   "ML Archive: "
+   notmuch-show-stash-mlarchive-link-alist
+   nil t nil nil "Gmane"))
+notmuch-show-stash-mlarchive-link-alist))
+  (substring (notmuch-show-get-message-id) 4 -1
+
+(defun notmuch-show-stash-mlarchive-link-and-go ()
+  "Copy an ML Archive URI for the current message to the kill-ring and visit 
it.
+
+This presumes that the message is available at the selected Mailing List 
Archive.
+
+Also see `notmuch-show-stash-mlarchive-link-alist'."
   (interactive)
-  (let ((uri (concat "http://mid.gmane.org/;
-(substring (notmuch-show-get-message-id) 4 -1
-(notmuch-common-do-stash uri)
-(browse-url uri)))
+  (notmuch-show-stash-mlarchive-link)
+  (browse-url (current-kill 0 t)))

 ;; Commands typically bound to buttons.

diff --git a/test/emacs b/test/emacs
index 5f7467d..4e08726 100755
--- a/test/emacs
+++ b/test/emacs
@@ -382,7 +382,7 @@ test_emacs '(notmuch-show "id:\"bought\"")
(notmuch-show-stash-message-id-stripped)
(notmuch-show-stash-tags)
(notmuch-show-stash-filename)
-   (notmuch-show-stash-gmane)
+   (notmuch-show-stash-mlarchive-link)
(switch-to-buffer
  (generate-new-buffer "*test-stashing*"))
(dotimes (i 10)
-- 
1.7.8.1



[RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-26 Thread Pieter Praet
---

Depends on id:1327397873-20596-1-git-send-email-...@dme.org

 emacs/notmuch-show.el |   55 ++--
 test/emacs|2 +-
 2 files changed, 40 insertions(+), 17 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c4d45e7..0acc4cf 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -123,6 +123,20 @@ indentation.
 (const :tag View interactively
notmuch-show-interactively-view-part)))
 
+(defcustom notmuch-show-stash-mlarchive-link-alist
+  '((Gmane . http://mid.gmane.org/;)
+(MARC . http://marc.info/?i=;)
+(Mail Archive, The . http://www.mail-archive.com/search?l=midq=;)
+;; FIXME: can these services be searched by `Message-Id' ?
+;; (MarkMail . http://markmail.org/;)
+;; (Nabble . http://nabble.com/;)
+;; (opensubscriber . http://opensubscriber.com/;)
+)
+  Default Mailing List Archive to use when stashing links.
+  :type '(alist :key-type (string :tag Name)
+   :value-type (string :tag URL))
+  :group 'notmuch-show)
+
 (defmacro with-current-notmuch-show-message (rest body)
   Evaluate body with current buffer set to the text of current message
   `(save-excursion
@@ -1016,8 +1030,8 @@ thread id.  If a prefix is given, crypto processing is 
toggled.
 (define-key map s 'notmuch-show-stash-subject)
 (define-key map T 'notmuch-show-stash-tags)
 (define-key map t 'notmuch-show-stash-to)
-(define-key map g 'notmuch-show-stash-gmane)
-(define-key map G 'notmuch-show-stash-gmane-and-go)
+(define-key map l 'notmuch-show-stash-mlarchive-link)
+(define-key map L 'notmuch-show-stash-mlarchive-link-and-go)
 map)
   Submap for stash commands)
 (fset 'notmuch-show-stash-map notmuch-show-stash-map)
@@ -1605,23 +1619,32 @@ buffer.
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-to)))
 
-(defun notmuch-show-stash-gmane ()
-  Copy a Gmane URI for the current message to the kill-ring.
+(defun notmuch-show-stash-mlarchive-link ()
+  Copy an ML Archive URI for the current message to the kill-ring.
 
-This presumes that the message is available at Gmane.
-  (interactive)
-  (notmuch-common-do-stash (concat http://mid.gmane.org/;
-  (substring (notmuch-show-get-message-id) 4 
-1
+This presumes that the message is available at the selected Mailing List 
Archive.
 
-(defun notmuch-show-stash-gmane-and-go ()
-  Copy a Gmane URI for the current message to the kill-ring and visit it.
-
-This presumes that the message is available at Gmane.
+Also see `notmuch-show-stash-mlarchive-link-alist'.
+  (interactive)
+  (notmuch-common-do-stash
+   (concat (cdr (assoc
+(let ((completion-ignore-case t))
+  (completing-read
+   ML Archive: 
+   notmuch-show-stash-mlarchive-link-alist
+   nil t nil nil Gmane))
+notmuch-show-stash-mlarchive-link-alist))
+  (substring (notmuch-show-get-message-id) 4 -1
+
+(defun notmuch-show-stash-mlarchive-link-and-go ()
+  Copy an ML Archive URI for the current message to the kill-ring and visit 
it.
+
+This presumes that the message is available at the selected Mailing List 
Archive.
+
+Also see `notmuch-show-stash-mlarchive-link-alist'.
   (interactive)
-  (let ((uri (concat http://mid.gmane.org/;
-(substring (notmuch-show-get-message-id) 4 -1
-(notmuch-common-do-stash uri)
-(browse-url uri)))
+  (notmuch-show-stash-mlarchive-link)
+  (browse-url (current-kill 0 t)))
 
 ;; Commands typically bound to buttons.
 
diff --git a/test/emacs b/test/emacs
index 5f7467d..4e08726 100755
--- a/test/emacs
+++ b/test/emacs
@@ -382,7 +382,7 @@ test_emacs '(notmuch-show id:\bought\)
(notmuch-show-stash-message-id-stripped)
(notmuch-show-stash-tags)
(notmuch-show-stash-filename)
-   (notmuch-show-stash-gmane)
+   (notmuch-show-stash-mlarchive-link)
(switch-to-buffer
  (generate-new-buffer *test-stashing*))
(dotimes (i 10)
-- 
1.7.8.1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [RFC] Re: [PATCH] emacs: Add `notmuch-show-stash-gmane' and `notmuch-show-stash-gmane-and-go'.

2012-01-26 Thread David Edmondson
In general, I like this.

- I think that the stash function(s) should take an optional argument
  specifying the archive to use. That will make testing simpler and also
  allow people to produce preferred bindings more easily.

- Message archive:  feels better than ML Archive: , but I don't
  really care.

- Don't base the patch on the thing that I posted, just on master from
  the repository - no need to make David's life harder.


pgpTvAwM48KcB.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch