unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: add support for stashing the thread id in show view
@ 2012-12-06 20:57 Jani Nikula
  2012-12-06 22:35 ` Mark Walters
  0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2012-12-06 20:57 UTC (permalink / raw)
  To: notmuch

Add a prefix argument to notmuch-show-stash-message-id to stash thread
id instead of message id.
---
 emacs/notmuch-show.el |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 4d6c014..2245b4f 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1901,10 +1901,15 @@ thread from search."
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-from)))
 
-(defun notmuch-show-stash-message-id ()
-  "Copy id: query matching the current message to kill-ring."
-  (interactive)
-  (notmuch-common-do-stash (notmuch-show-get-message-id)))
+(defun notmuch-show-stash-message-id (&optional thread-id)
+  "Copy id: query matching the current message to kill-ring.
+
+If invoked with a prefix argument (or THREAD-ID is non-nil), copy
+thread: query matching the current thread to kill-ring."
+  (interactive "P")
+  (if thread-id
+      (notmuch-common-do-stash notmuch-show-thread-id)
+    (notmuch-common-do-stash (notmuch-show-get-message-id))))
 
 (defun notmuch-show-stash-message-id-stripped ()
   "Copy message ID of current message (sans `id:' prefix) to kill-ring."
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] emacs: add support for stashing the thread id in show view
  2012-12-06 20:57 [PATCH] emacs: add support for stashing the thread id in show view Jani Nikula
@ 2012-12-06 22:35 ` Mark Walters
  2012-12-06 22:48   ` [PATCH v2] " Jani Nikula
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Walters @ 2012-12-06 22:35 UTC (permalink / raw)
  To: Jani Nikula, notmuch


On Thu, 06 Dec 2012, Jani Nikula <jani@nikula.org> wrote:
> Add a prefix argument to notmuch-show-stash-message-id to stash thread
> id instead of message id.
> ---
>  emacs/notmuch-show.el |   13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 4d6c014..2245b4f 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1901,10 +1901,15 @@ thread from search."
>    (interactive)
>    (notmuch-common-do-stash (notmuch-show-get-from)))
>  
> -(defun notmuch-show-stash-message-id ()
> -  "Copy id: query matching the current message to kill-ring."
> -  (interactive)
> -  (notmuch-common-do-stash (notmuch-show-get-message-id)))
> +(defun notmuch-show-stash-message-id (&optional thread-id)
> +  "Copy id: query matching the current message to kill-ring.
> +
> +If invoked with a prefix argument (or THREAD-ID is non-nil), copy
> +thread: query matching the current thread to kill-ring."
> +  (interactive "P")
> +  (if thread-id
> +      (notmuch-common-do-stash notmuch-show-thread-id)
> +    (notmuch-common-do-stash (notmuch-show-get-message-id))))
>  

Basically this looks good to me. My one criticism is the name of the
argument: thread-id looks like it should be umm, a thread-id. Maybe
thread-id-wanted or something?

Best wishes

Mark


>  (defun notmuch-show-stash-message-id-stripped ()
>    "Copy message ID of current message (sans `id:' prefix) to kill-ring."
> -- 
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] emacs: add support for stashing the thread id in show view
  2012-12-06 22:35 ` Mark Walters
@ 2012-12-06 22:48   ` Jani Nikula
  2012-12-07  7:53     ` Mark Walters
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jani Nikula @ 2012-12-06 22:48 UTC (permalink / raw)
  To: notmuch, Mark Walters

Add a prefix argument to notmuch-show-stash-message-id to stash thread
id instead of message id.
---
 emacs/notmuch-show.el |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 4d6c014..658a2be 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1901,10 +1901,16 @@ thread from search."
   (interactive)
   (notmuch-common-do-stash (notmuch-show-get-from)))
 
-(defun notmuch-show-stash-message-id ()
-  "Copy id: query matching the current message to kill-ring."
-  (interactive)
-  (notmuch-common-do-stash (notmuch-show-get-message-id)))
+(defun notmuch-show-stash-message-id (&optional stash-thread-id)
+  "Copy id: query matching the current message to kill-ring.
+
+If invoked with a prefix argument (or STASH-THREAD-ID is
+non-nil), copy thread: query matching the current thread to
+kill-ring."
+  (interactive "P")
+  (if stash-thread-id
+      (notmuch-common-do-stash notmuch-show-thread-id)
+    (notmuch-common-do-stash (notmuch-show-get-message-id))))
 
 (defun notmuch-show-stash-message-id-stripped ()
   "Copy message ID of current message (sans `id:' prefix) to kill-ring."
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] emacs: add support for stashing the thread id in show view
  2012-12-06 22:48   ` [PATCH v2] " Jani Nikula
@ 2012-12-07  7:53     ` Mark Walters
  2012-12-07 22:25     ` Tomi Ollila
  2012-12-09 23:12     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Walters @ 2012-12-07  7:53 UTC (permalink / raw)
  To: Jani Nikula, notmuch

Jani Nikula <jani@nikula.org> writes:

> Add a prefix argument to notmuch-show-stash-message-id to stash thread
> id instead of message id.


LGTM +1

Mark


> ---
>  emacs/notmuch-show.el |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 4d6c014..658a2be 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1901,10 +1901,16 @@ thread from search."
>    (interactive)
>    (notmuch-common-do-stash (notmuch-show-get-from)))
>  
> -(defun notmuch-show-stash-message-id ()
> -  "Copy id: query matching the current message to kill-ring."
> -  (interactive)
> -  (notmuch-common-do-stash (notmuch-show-get-message-id)))
> +(defun notmuch-show-stash-message-id (&optional stash-thread-id)
> +  "Copy id: query matching the current message to kill-ring.
> +
> +If invoked with a prefix argument (or STASH-THREAD-ID is
> +non-nil), copy thread: query matching the current thread to
> +kill-ring."
> +  (interactive "P")
> +  (if stash-thread-id
> +      (notmuch-common-do-stash notmuch-show-thread-id)
> +    (notmuch-common-do-stash (notmuch-show-get-message-id))))
>  
>  (defun notmuch-show-stash-message-id-stripped ()
>    "Copy message ID of current message (sans `id:' prefix) to kill-ring."
> -- 
> 1.7.10.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] emacs: add support for stashing the thread id in show view
  2012-12-06 22:48   ` [PATCH v2] " Jani Nikula
  2012-12-07  7:53     ` Mark Walters
@ 2012-12-07 22:25     ` Tomi Ollila
  2012-12-09 23:12     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2012-12-07 22:25 UTC (permalink / raw)
  To: Jani Nikula, notmuch, Mark Walters

On Fri, Dec 07 2012, Jani Nikula wrote:

> Add a prefix argument to notmuch-show-stash-message-id to stash thread
> id instead of message id.
> ---

LTGM.

Tomi

>  emacs/notmuch-show.el |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 4d6c014..658a2be 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -1901,10 +1901,16 @@ thread from search."
>    (interactive)
>    (notmuch-common-do-stash (notmuch-show-get-from)))
>  
> -(defun notmuch-show-stash-message-id ()
> -  "Copy id: query matching the current message to kill-ring."
> -  (interactive)
> -  (notmuch-common-do-stash (notmuch-show-get-message-id)))
> +(defun notmuch-show-stash-message-id (&optional stash-thread-id)
> +  "Copy id: query matching the current message to kill-ring.
> +
> +If invoked with a prefix argument (or STASH-THREAD-ID is
> +non-nil), copy thread: query matching the current thread to
> +kill-ring."
> +  (interactive "P")
> +  (if stash-thread-id
> +      (notmuch-common-do-stash notmuch-show-thread-id)
> +    (notmuch-common-do-stash (notmuch-show-get-message-id))))
>  
>  (defun notmuch-show-stash-message-id-stripped ()
>    "Copy message ID of current message (sans `id:' prefix) to kill-ring."
> -- 
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] emacs: add support for stashing the thread id in show view
  2012-12-06 22:48   ` [PATCH v2] " Jani Nikula
  2012-12-07  7:53     ` Mark Walters
  2012-12-07 22:25     ` Tomi Ollila
@ 2012-12-09 23:12     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2012-12-09 23:12 UTC (permalink / raw)
  To: Jani Nikula, notmuch, Mark Walters

Jani Nikula <jani@nikula.org> writes:

> Add a prefix argument to notmuch-show-stash-message-id to stash thread
> id instead of message id.

pushed.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-09 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 20:57 [PATCH] emacs: add support for stashing the thread id in show view Jani Nikula
2012-12-06 22:35 ` Mark Walters
2012-12-06 22:48   ` [PATCH v2] " Jani Nikula
2012-12-07  7:53     ` Mark Walters
2012-12-07 22:25     ` Tomi Ollila
2012-12-09 23:12     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).