Re: [PATCH] contrib: pick: bugfix when trying to show a non-message

Subject: Re: [PATCH] contrib: pick: bugfix when trying to show a non-message

Date: Fri, 09 Nov 2012 10:55:54 +0200

To: David Bremner, Mark Walters, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Fri, Nov 09 2012, David Bremner <david@tethera.net> wrote:

> Mark Walters <markwalters1009@gmail.com> writes:
>
>> -  (concat "id:\"" (notmuch-pick-get-prop :id) "\""))
>> +  (let ((id (notmuch-pick-get-prop :id)))
>> +    (when id
>> +      (concat "id:\"" id "\""))))
>
> I don't know how other people feel, but I'd rather have an `if' in a
> context where I care about the return value.

Does (when COND BODY) connotate to the thought that the return value
is generally not used ? That expands to (if COND (progn BODY)) so both
returns exactly same values.

(not that I wouldn't prefer if there :)

But instead of this the function in question could use
recently introduced (notmuch-id-to-query id) instead.

Tomi

Thread: