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

Tomi Ollila tomi.ollila at iki.fi
Fri Nov 9 00:55:54 PST 2012


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

> Mark Walters <markwalters1009 at 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


More information about the notmuch mailing list