[PATCH v3 4/8] emacs: add message archiving functions

2012-01-25 Thread David Edmondson
On Tue, 24 Jan 2012 16:06:19 -0800, Jameson Graef Rollins  wrote:
> This adds two new message archiving functions that parallel the thread
> archiving functions: notmuch-show-archive-message{,-then-next}.  The
> former also takes a prefix argument to unarchive the message (ie. put
> back in inbox).
> ---
>  emacs/notmuch-show.el |   17 +
>  1 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 071e662..0dc594b 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1590,6 +1590,23 @@ buffer."
>(notmuch-show-archive-thread)
>(notmuch-show-next-thread))
>  
> +(defun notmuch-show-archive-message ( unarchive)
> +  "Archive the current message.
> +
> +If a prefix argument is given, the message will be
> +\"unarchived\" (ie. the \"inbox\" tag will be added instead of
> +removed)."

Same comments as for the previous patch - just reference "inbox"
directly.

> +  (interactive "P")
> +  (if unarchive
> +  (notmuch-show-add-tag "inbox")
> +(notmuch-show-remove-tag "inbox")))
> +
> +(defun notmuch-show-archive-message-then-next ()
> +  "Archive the current message, then show the next open message in the 
> current thread."
> +  (interactive)
> +  (notmuch-show-archive-message)
> +  (notmuch-show-next-open-message))
> +
>  (defun notmuch-show-stash-cc ()
>"Copy CC field of current message to kill-ring."
>(interactive)
> -- 
> 1.7.8.3
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: [PATCH v3 4/8] emacs: add message archiving functions

2012-01-25 Thread David Edmondson
On Tue, 24 Jan 2012 16:06:19 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 This adds two new message archiving functions that parallel the thread
 archiving functions: notmuch-show-archive-message{,-then-next}.  The
 former also takes a prefix argument to unarchive the message (ie. put
 back in inbox).
 ---
  emacs/notmuch-show.el |   17 +
  1 files changed, 17 insertions(+), 0 deletions(-)
 
 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
 index 071e662..0dc594b 100644
 --- a/emacs/notmuch-show.el
 +++ b/emacs/notmuch-show.el
 @@ -1590,6 +1590,23 @@ buffer.
(notmuch-show-archive-thread)
(notmuch-show-next-thread))
  
 +(defun notmuch-show-archive-message (optional unarchive)
 +  Archive the current message.
 +
 +If a prefix argument is given, the message will be
 +\unarchived\ (ie. the \inbox\ tag will be added instead of
 +removed).

Same comments as for the previous patch - just reference inbox
directly.

 +  (interactive P)
 +  (if unarchive
 +  (notmuch-show-add-tag inbox)
 +(notmuch-show-remove-tag inbox)))
 +
 +(defun notmuch-show-archive-message-then-next ()
 +  Archive the current message, then show the next open message in the 
 current thread.
 +  (interactive)
 +  (notmuch-show-archive-message)
 +  (notmuch-show-next-open-message))
 +
  (defun notmuch-show-stash-cc ()
Copy CC field of current message to kill-ring.
(interactive)
 -- 
 1.7.8.3
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch


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


[PATCH v3 4/8] emacs: add message archiving functions

2012-01-24 Thread Jameson Graef Rollins
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}.  The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
---
 emacs/notmuch-show.el |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 071e662..0dc594b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1590,6 +1590,23 @@ buffer."
   (notmuch-show-archive-thread)
   (notmuch-show-next-thread))

+(defun notmuch-show-archive-message ( unarchive)
+  "Archive the current message.
+
+If a prefix argument is given, the message will be
+\"unarchived\" (ie. the \"inbox\" tag will be added instead of
+removed)."
+  (interactive "P")
+  (if unarchive
+  (notmuch-show-add-tag "inbox")
+(notmuch-show-remove-tag "inbox")))
+
+(defun notmuch-show-archive-message-then-next ()
+  "Archive the current message, then show the next open message in the current 
thread."
+  (interactive)
+  (notmuch-show-archive-message)
+  (notmuch-show-next-open-message))
+
 (defun notmuch-show-stash-cc ()
   "Copy CC field of current message to kill-ring."
   (interactive)
-- 
1.7.8.3



[PATCH v3 4/8] emacs: add message archiving functions

2012-01-24 Thread Jameson Graef Rollins
This adds two new message archiving functions that parallel the thread
archiving functions: notmuch-show-archive-message{,-then-next}.  The
former also takes a prefix argument to unarchive the message (ie. put
back in inbox).
---
 emacs/notmuch-show.el |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 071e662..0dc594b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1590,6 +1590,23 @@ buffer.
   (notmuch-show-archive-thread)
   (notmuch-show-next-thread))
 
+(defun notmuch-show-archive-message (optional unarchive)
+  Archive the current message.
+
+If a prefix argument is given, the message will be
+\unarchived\ (ie. the \inbox\ tag will be added instead of
+removed).
+  (interactive P)
+  (if unarchive
+  (notmuch-show-add-tag inbox)
+(notmuch-show-remove-tag inbox)))
+
+(defun notmuch-show-archive-message-then-next ()
+  Archive the current message, then show the next open message in the current 
thread.
+  (interactive)
+  (notmuch-show-archive-message)
+  (notmuch-show-next-open-message))
+
 (defun notmuch-show-stash-cc ()
   Copy CC field of current message to kill-ring.
   (interactive)
-- 
1.7.8.3

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