unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
@ 2012-03-27  1:40 Austin Clements
  2012-03-27  6:19 ` Tomi Ollila
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Austin Clements @ 2012-03-27  1:40 UTC (permalink / raw)
  To: notmuch

Previously, this function took an argument called "message-id", even
though it was a general query, rather than a message ID.  This changes
it to "query".
---
 emacs/notmuch-lib.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 2e367b5..4b17ecc 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -219,13 +219,13 @@ the given type."
 
 ;; Helper for parts which are generally not included in the default
 ;; JSON output.
-(defun notmuch-get-bodypart-internal (message-id part-number process-crypto)
+(defun notmuch-get-bodypart-internal (query part-number process-crypto)
   (let ((args '("show" "--format=raw"))
 	(part-arg (format "--part=%s" part-number)))
     (setq args (append args (list part-arg)))
     (if process-crypto
 	(setq args (append args '("--decrypt"))))
-    (setq args (append args (list message-id)))
+    (setq args (append args (list query)))
     (with-temp-buffer
       (let ((coding-system-for-read 'no-conversion))
 	(progn
-- 
1.7.7.2

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-27  1:40 [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal Austin Clements
@ 2012-03-27  6:19 ` Tomi Ollila
  2012-03-29  1:46 ` Jameson Graef Rollins
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2012-03-27  6:19 UTC (permalink / raw)
  To: Austin Clements, notmuch

On Tue, Mar 27 2012, Austin Clements <amdragon@MIT.EDU> wrote:

> Previously, this function took an argument called "message-id", even
> though it was a general query, rather than a message ID.  This changes
> it to "query".
> ---

+1 

Tomi


>  emacs/notmuch-lib.el |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
> index 2e367b5..4b17ecc 100644
> --- a/emacs/notmuch-lib.el
> +++ b/emacs/notmuch-lib.el
> @@ -219,13 +219,13 @@ the given type."
>  
>  ;; Helper for parts which are generally not included in the default
>  ;; JSON output.
> -(defun notmuch-get-bodypart-internal (message-id part-number process-crypto)
> +(defun notmuch-get-bodypart-internal (query part-number process-crypto)
>    (let ((args '("show" "--format=raw"))
>  	(part-arg (format "--part=%s" part-number)))
>      (setq args (append args (list part-arg)))
>      (if process-crypto
>  	(setq args (append args '("--decrypt"))))
> -    (setq args (append args (list message-id)))
> +    (setq args (append args (list query)))
>      (with-temp-buffer
>        (let ((coding-system-for-read 'no-conversion))
>  	(progn
> -- 
> 1.7.7.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-27  1:40 [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal Austin Clements
  2012-03-27  6:19 ` Tomi Ollila
@ 2012-03-29  1:46 ` Jameson Graef Rollins
  2012-03-29  2:08   ` Austin Clements
  2012-03-31 11:32 ` David Bremner
  2012-03-31 11:33 ` David Bremner
  3 siblings, 1 reply; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-03-29  1:46 UTC (permalink / raw)
  To: Austin Clements, notmuch

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On Mon, Mar 26 2012, Austin Clements <amdragon@MIT.EDU> wrote:
> Previously, this function took an argument called "message-id", even
> though it was a general query, rather than a message ID.  This changes
> it to "query".

I'm sure the argument was named such because: the function is retrieving
a message part so the query has to match just a single message, and it's
only ever given a message id by anything that calls it.  And it's an
unexposed internal function.  All of this to say that I think it doesn't
really matter that the argument was named as it was.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-29  1:46 ` Jameson Graef Rollins
@ 2012-03-29  2:08   ` Austin Clements
  2012-03-29  2:23     ` Jameson Graef Rollins
  0 siblings, 1 reply; 7+ messages in thread
From: Austin Clements @ 2012-03-29  2:08 UTC (permalink / raw)
  To: Jameson Graef Rollins; +Cc: notmuch

Quoth Jameson Graef Rollins on Mar 28 at  6:46 pm:
> On Mon, Mar 26 2012, Austin Clements <amdragon@MIT.EDU> wrote:
> > Previously, this function took an argument called "message-id", even
> > though it was a general query, rather than a message ID.  This changes
> > it to "query".
> 
> I'm sure the argument was named such because: the function is retrieving
> a message part so the query has to match just a single message, and it's
> only ever given a message id by anything that calls it.  And it's an
> unexposed internal function.  All of this to say that I think it doesn't
> really matter that the argument was named as it was.

All true.  But there's a difference between a message ID and an id:
query and the argument name threw me off for a moment when I was
writing the id: query quoting patch.  It could be `id-query', I
suppose, but really it could be any query that matches a single
message.

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-29  2:08   ` Austin Clements
@ 2012-03-29  2:23     ` Jameson Graef Rollins
  0 siblings, 0 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2012-03-29  2:23 UTC (permalink / raw)
  To: Austin Clements; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

On Wed, Mar 28 2012, Austin Clements <amdragon@MIT.EDU> wrote:
> All true.  But there's a difference between a message ID and an id:
> query and the argument name threw me off for a moment when I was
> writing the id: query quoting patch.  It could be `id-query', I
> suppose, but really it could be any query that matches a single
> message.

Fair enough.  And it's good to have things named correctly and
consistently, so LGTM.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-27  1:40 [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal Austin Clements
  2012-03-27  6:19 ` Tomi Ollila
  2012-03-29  1:46 ` Jameson Graef Rollins
@ 2012-03-31 11:32 ` David Bremner
  2012-03-31 11:33 ` David Bremner
  3 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-03-31 11:32 UTC (permalink / raw)
  To: Austin Clements, notmuch

Austin Clements <amdragon@MIT.EDU> writes:

> Previously, this function took an argument called "message-id", even
> though it was a general query, rather than a message ID.  This changes
> it to "query".

pushed, 

d

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

* Re: [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal
  2012-03-27  1:40 [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal Austin Clements
                   ` (2 preceding siblings ...)
  2012-03-31 11:32 ` David Bremner
@ 2012-03-31 11:33 ` David Bremner
  3 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2012-03-31 11:33 UTC (permalink / raw)
  To: Austin Clements, notmuch

Austin Clements <amdragon@MIT.EDU> writes:

> Previously, this function took an argument called "message-id", even
> though it was a general query, rather than a message ID.  This changes
> it to "query".

Pushed,

d

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

end of thread, other threads:[~2012-03-31 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27  1:40 [PATCH] emacs: Fix mis-named argument to notmuch-get-bodypart-internal Austin Clements
2012-03-27  6:19 ` Tomi Ollila
2012-03-29  1:46 ` Jameson Graef Rollins
2012-03-29  2:08   ` Austin Clements
2012-03-29  2:23     ` Jameson Graef Rollins
2012-03-31 11:32 ` David Bremner
2012-03-31 11:33 ` 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).