Re: [notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-28 Thread Keith Amidon
{-- Fri, 27 Nov 2009 21:22:36 -0800: Carl  wrote: --}


  Carl> On Fri, 27 Nov 2009 05:30:12 -0800, cama...@picnicpark.org wrote:
  >> From: Keith Amidon 
  >> 
  >> As an alternative to creating a reply from the current thread, this
  >> commit provides functions to create replies directly in emacs using
  >> the message library.
  >> 
  >> A future commit will provide keybindings so that they are easy to
  >> change if a different set is preferred.

  Carl> Can you fill me in a little bit here? The message-mode
  Carl> documentation is quite thin on what the distinctions are between
  Carl> "reply", "wide-reply", and "followup".

Roughly this is my understanding of the
differences:

   reply: reply only to the sender and no other recipients
   wide reply: reply to all recipients (removing self)
   followup: mainly intended for replying to news articles I believe is
the trigger for the Mail-Followup-To behavior.  See:


http://www.gnu.org/software/emacs/manual/html_node/message/Mailing-Lists.html#Mailing-Lists

  Carl> Meanwhile, I don't think we have any need to support different
  Carl> implementations of reply, (that is---I don't want one binding
  Carl> for a "notmuch-based reply" and another for a
  Carl> "message-mode-based reply" without any functional difference in
  Carl> the result).

I agree.  It wasn't clear to me when each type of behavior was useful
and so I erred on the side of making everything available with long
key bindings with the idea that as it became clear what was most useful
the common short key bindings could get those functions.

  Carl> Instead I'd like to define what the functionality is that we
  Carl> want here, and then provide that. I do like taking advantage of
  Carl> things like message-mode functionality wherever it exists, so
  Carl> I'm happy to have the default reply button do
  Carl> (with-current-notmuch-show-message (message-reply)) or whatever.

  Carl> But meanwhile, I'll *also* want to understand what the
  Carl> variations are here so that we can *also* implement them inside
  Carl> of "notmuch reply" so that non-emacs-based interfaces can easily
  Carl> get at similar functionality.

  Carl> So I'm holding off on pushing this patch until I understand it
  Carl> better, (and documentation strings for the new functions might
  Carl> help for that---provided they have more detail than the
  Carl> corresponding documentation strings for the message-mode
  Carl> functions being called).

I'll try to improve my docstings next time around.  Sorry about that!

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


[notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-28 Thread Keith Amidon
{-- Fri, 27 Nov 2009 21:22:36 -0800: Carl  wrote: --}


  Carl> On Fri, 27 Nov 2009 05:30:12 -0800, camalot at picnicpark.org wrote:
  >> From: Keith Amidon 
  >> 
  >> As an alternative to creating a reply from the current thread, this
  >> commit provides functions to create replies directly in emacs using
  >> the message library.
  >> 
  >> A future commit will provide keybindings so that they are easy to
  >> change if a different set is preferred.

  Carl> Can you fill me in a little bit here? The message-mode
  Carl> documentation is quite thin on what the distinctions are between
  Carl> "reply", "wide-reply", and "followup".

Roughly this is my understanding of the
differences:

   reply: reply only to the sender and no other recipients
   wide reply: reply to all recipients (removing self)
   followup: mainly intended for replying to news articles I believe is
the trigger for the Mail-Followup-To behavior.  See:


http://www.gnu.org/software/emacs/manual/html_node/message/Mailing-Lists.html#Mailing-Lists

  Carl> Meanwhile, I don't think we have any need to support different
  Carl> implementations of reply, (that is---I don't want one binding
  Carl> for a "notmuch-based reply" and another for a
  Carl> "message-mode-based reply" without any functional difference in
  Carl> the result).

I agree.  It wasn't clear to me when each type of behavior was useful
and so I erred on the side of making everything available with long
key bindings with the idea that as it became clear what was most useful
the common short key bindings could get those functions.

  Carl> Instead I'd like to define what the functionality is that we
  Carl> want here, and then provide that. I do like taking advantage of
  Carl> things like message-mode functionality wherever it exists, so
  Carl> I'm happy to have the default reply button do
  Carl> (with-current-notmuch-show-message (message-reply)) or whatever.

  Carl> But meanwhile, I'll *also* want to understand what the
  Carl> variations are here so that we can *also* implement them inside
  Carl> of "notmuch reply" so that non-emacs-based interfaces can easily
  Carl> get at similar functionality.

  Carl> So I'm holding off on pushing this patch until I understand it
  Carl> better, (and documentation strings for the new functions might
  Carl> help for that---provided they have more detail than the
  Carl> corresponding documentation strings for the message-mode
  Carl> functions being called).

I'll try to improve my docstings next time around.  Sorry about that!

--- Keith


Re: [notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread Carl Worth
On Fri, 27 Nov 2009 05:30:12 -0800, cama...@picnicpark.org wrote:
> From: Keith Amidon 
> 
> As an alternative to creating a reply from the current thread, this
> commit provides functions to create replies directly in emacs using
> the message library.
> 
> A future commit will provide keybindings so that they are easy to
> change if a different set is preferred.

Can you fill me in a little bit here? The message-mode documentation is
quite thin on what the distinctions are between "reply", "wide-reply",
and "followup".

Meanwhile, I don't think we have any need to support different
implementations of reply, (that is---I don't want one binding for a
"notmuch-based reply" and another for a "message-mode-based reply"
without any functional difference in the result).

Instead I'd like to define what the functionality is that we want here,
and then provide that. I do like taking advantage of things like
message-mode functionality wherever it exists, so I'm happy to have the
default reply button do (with-current-notmuch-show-message
(message-reply)) or whatever.

But meanwhile, I'll *also* want to understand what the variations are
here so that we can *also* implement them inside of "notmuch reply" so
that non-emacs-based interfaces can easily get at similar functionality.

So I'm holding off on pushing this patch until I understand it better,
(and documentation strings for the new functions might help for
that---provided they have more detail than the corresponding
documentation strings for the message-mode functions being called).

-Carl


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


[notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread Carl Worth
On Fri, 27 Nov 2009 05:30:12 -0800, camalot at picnicpark.org wrote:
> From: Keith Amidon 
> 
> As an alternative to creating a reply from the current thread, this
> commit provides functions to create replies directly in emacs using
> the message library.
> 
> A future commit will provide keybindings so that they are easy to
> change if a different set is preferred.

Can you fill me in a little bit here? The message-mode documentation is
quite thin on what the distinctions are between "reply", "wide-reply",
and "followup".

Meanwhile, I don't think we have any need to support different
implementations of reply, (that is---I don't want one binding for a
"notmuch-based reply" and another for a "message-mode-based reply"
without any functional difference in the result).

Instead I'd like to define what the functionality is that we want here,
and then provide that. I do like taking advantage of things like
message-mode functionality wherever it exists, so I'm happy to have the
default reply button do (with-current-notmuch-show-message
(message-reply)) or whatever.

But meanwhile, I'll *also* want to understand what the variations are
here so that we can *also* implement them inside of "notmuch reply" so
that non-emacs-based interfaces can easily get at similar functionality.

So I'm holding off on pushing this patch until I understand it better,
(and documentation strings for the new functions might help for
that---provided they have more detail than the corresponding
documentation strings for the message-mode functions being called).

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread Keith Amidon
{-- Fri, 27 Nov 2009 20:48:46 +0530: Aneesh  
wrote: --}

  Aneesh> Hi, Really good set of patches. I am right now testing with
  Aneesh> the set of changes and found that

Thanks!

  Aneesh> a) notmuch-show-reply-current and other helpers doesn't put
  Aneesh> the mail content i am replying in the reply buffer in quoted
  Aneesh> form. What i was expecting was something similar to
  Aneesh> notmuch-show-reply but one that doesn't add all the email
  Aneesh> address.

Well, the fact that I mainly cared about message forwarding and not the
reply functions is turning out to show rather badly...  There appear to
be a number of problems with the reply functions starting with the fact
that I kill the buffer that has the original message contents in it as
soon as the reply buffer is constructed, which message doesn't really
like.  I can think of some ways around the problems but I'm getting the
sense that enhancing the notmuch C program's ability to generate
different styles of replies would be preferred to what I have done.

Forwarding works fine though... :-)

  Aneesh> b) The key-binding MA is really difficult to type. How about
  Aneesh> (kbd "M-a") ?  c) I liked the mail forward feature

My main criteria in selecting key bindings was that they not conflict
with current ones.  If this were to become the preferred way to do this
I'd be happy to change them to whatever consensus emerges.

 --- Keith


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


[notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread Keith Amidon
{-- Fri, 27 Nov 2009 20:48:46 +0530: Aneesh  wrote: --}

  Aneesh> Hi, Really good set of patches. I am right now testing with
  Aneesh> the set of changes and found that

Thanks!

  Aneesh> a) notmuch-show-reply-current and other helpers doesn't put
  Aneesh> the mail content i am replying in the reply buffer in quoted
  Aneesh> form. What i was expecting was something similar to
  Aneesh> notmuch-show-reply but one that doesn't add all the email
  Aneesh> address.

Well, the fact that I mainly cared about message forwarding and not the
reply functions is turning out to show rather badly...  There appear to
be a number of problems with the reply functions starting with the fact
that I kill the buffer that has the original message contents in it as
soon as the reply buffer is constructed, which message doesn't really
like.  I can think of some ways around the problems but I'm getting the
sense that enhancing the notmuch C program's ability to generate
different styles of replies would be preferred to what I have done.

Forwarding works fine though... :-)

  Aneesh> b) The key-binding MA is really difficult to type. How about
  Aneesh> (kbd "M-a") ?  c) I liked the mail forward feature

My main criteria in selecting key bindings was that they not conflict
with current ones.  If this were to become the preferred way to do this
I'd be happy to change them to whatever consensus emerges.

 --- Keith




[notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread camalot
From: Keith Amidon 

As an alternative to creating a reply from the current thread, this
commit provides functions to create replies directly in emacs using
the message library.

A future commit will provide keybindings so that they are easy to
change if a different set is preferred.
---
 notmuch.el |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index d3d75f9..fe20b54 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -323,6 +323,21 @@ buffer."
   (with-current-notmuch-show-message
(message-forward)))
 
+(defun notmuch-show-reply-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-reply)))
+
+(defun notmuch-show-wide-reply-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-wide-reply)))
+
+(defun notmuch-show-followup-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-followup)))
+
 (defun notmuch-show-pipe-message (command)
   "Pipe the contents of the current message to the given command.
 
-- 
1.6.5.3

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


[notmuch] [PATCH 6/9] Reply to individual messages using message library

2009-11-27 Thread cama...@picnicpark.org
From: Keith Amidon 

As an alternative to creating a reply from the current thread, this
commit provides functions to create replies directly in emacs using
the message library.

A future commit will provide keybindings so that they are easy to
change if a different set is preferred.
---
 notmuch.el |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index d3d75f9..fe20b54 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -323,6 +323,21 @@ buffer."
   (with-current-notmuch-show-message
(message-forward)))

+(defun notmuch-show-reply-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-reply)))
+
+(defun notmuch-show-wide-reply-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-wide-reply)))
+
+(defun notmuch-show-followup-current ()
+  (interactive)
+  (with-current-notmuch-show-message
+   (message-followup)))
+
 (defun notmuch-show-pipe-message (command)
   "Pipe the contents of the current message to the given command.

-- 
1.6.5.3