From 72ce08ea6372b07b052a97b92bc3e694d1b0a163 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Thu, 1 Nov 2012 19:26:23 +0000 Subject: [PATCH] [PATCH] contrib: pick: bugfix when trying to show a non-message --- 14/927109279a54b086af7e1c48993f89179b0da1 | 85 +++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 14/927109279a54b086af7e1c48993f89179b0da1 diff --git a/14/927109279a54b086af7e1c48993f89179b0da1 b/14/927109279a54b086af7e1c48993f89179b0da1 new file mode 100644 index 000000000..2dcc15186 --- /dev/null +++ b/14/927109279a54b086af7e1c48993f89179b0da1 @@ -0,0 +1,85 @@ +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 C8A04431FBC + for ; Thu, 1 Nov 2012 12:26:28 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] 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 qwl9iSN3qh6J for ; + Thu, 1 Nov 2012 12:26:28 -0700 (PDT) +Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com + [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 4AE1C431FAE for ; Thu, 1 Nov 2012 12:26:28 -0700 + (PDT) +Received: by mail-wg0-f45.google.com with SMTP id dq12so1608411wgb.2 + for ; Thu, 01 Nov 2012 12:26:27 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer; + bh=S72DjZVV8OqlGfDBIIohPxBbPxn//Vib74eMLrD1KMs=; + b=jso4LBqSs86tGvzuzlBDHtMfq67eg+3zdcbsaE27ltrjaI3WBWBMio3R79zXFwNhyX + OscL/+3LAbXPTDXBmRQLg2JAffH+3dmnT3N2SFgDuk73Ne+0yV/gqnsdHlxioKAFE+Wn + 5t9+f5WN+sTP+2RPCtv67r4CV0eFIo21Ft+pCsNRDJRYpBWLCXwy43iZtyPzQ6MlXtuX + wPuoNS7L0zS1N7riugIJsLDL2ge2xU2oz9RNl/e1VjHLicm4TWYBOQwCKHQ99QOj6YVg + jedhyzt2PBVZwqJx9O8Pc394FUSgbjNsQy31j9BKpXZoHj2bvJ3MA0yOpEDVhQmIOVjB + FA7w== +Received: by 10.180.99.99 with SMTP id ep3mr3312303wib.15.1351797987059; + Thu, 01 Nov 2012 12:26:27 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPS id m14sm117878wie.8.2012.11.01.12.26.25 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 01 Nov 2012 12:26:26 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH] contrib: pick: bugfix when trying to show a non-message +Date: Thu, 1 Nov 2012 19:26:23 +0000 +Message-Id: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +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: Thu, 01 Nov 2012 19:26:28 -0000 + +If the user pressed return on the end result status line it gave a +blank message. Modify the function notmuch-pick-get-message-id to +return nil rather than an empty message-id in this case to fix this. +--- + contrib/notmuch-pick/notmuch-pick.el | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 15ac5e8..1886469 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -241,7 +241,9 @@ Some useful entries are: + + (defun notmuch-pick-get-message-id () + "Return the message id of the current message." +- (concat "id:\"" (notmuch-pick-get-prop :id) "\"")) ++ (let ((id (notmuch-pick-get-prop :id))) ++ (when id ++ (concat "id:\"" id "\"")))) + + (defun notmuch-pick-get-match () + "Return whether the current message is a match." +-- +1.7.9.1 + -- 2.26.2