From: Tomi Ollila Date: Fri, 9 Nov 2012 08:55:54 +0000 (+0200) Subject: Re: [PATCH] contrib: pick: bugfix when trying to show a non-message X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4333fad24a189ed37f2229f7a5cdd05869c623a5;p=notmuch-archives.git Re: [PATCH] contrib: pick: bugfix when trying to show a non-message --- diff --git a/45/11c6a86eaaf8434320b0255d086c5a3f6bfeda b/45/11c6a86eaaf8434320b0255d086c5a3f6bfeda new file mode 100644 index 000000000..40a82392a --- /dev/null +++ b/45/11c6a86eaaf8434320b0255d086c5a3f6bfeda @@ -0,0 +1,74 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id B9C4F431FB6 + for ; Fri, 9 Nov 2012 00:55:58 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id JMmUxet-W6UF for ; + Fri, 9 Nov 2012 00:55:56 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id E576E431FAE + for ; Fri, 9 Nov 2012 00:55:55 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 98B89100094; + Fri, 9 Nov 2012 10:55:54 +0200 (EET) +From: Tomi Ollila +To: David Bremner , + Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH] contrib: pick: bugfix when trying to show a non-message +In-Reply-To: <87ehk332la.fsf@zancas.localnet> +References: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com> + <87ehk332la.fsf@zancas.localnet> +User-Agent: Notmuch/0.14+84~g8a199bf (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 09 Nov 2012 08:55:58 -0000 + +On Fri, Nov 09 2012, David Bremner wrote: + +> Mark Walters 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