From: Mark Walters Date: Sun, 30 Jun 2013 08:55:10 +0000 (+0100) Subject: [PATCH v2 1/3] contrib: pick: if no target specified go to first matching message X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=52867c79a976b0d3ab5a62bc505e1d4c56aa2d02;p=notmuch-archives.git [PATCH v2 1/3] contrib: pick: if no target specified go to first matching message --- diff --git a/8a/5a80a723a29c2d3fa99c3cb01e8f3b3baca0ac b/8a/5a80a723a29c2d3fa99c3cb01e8f3b3baca0ac new file mode 100644 index 000000000..b09574665 --- /dev/null +++ b/8a/5a80a723a29c2d3fa99c3cb01e8f3b3baca0ac @@ -0,0 +1,88 @@ +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 7B918431FC3 + for ; Sun, 30 Jun 2013 01:55:24 -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 XjyGZFac9LAN for ; + Sun, 30 Jun 2013 01:55:19 -0700 (PDT) +Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com + [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id CDDB5431FBC + for ; Sun, 30 Jun 2013 01:55:18 -0700 (PDT) +Received: by mail-wi0-f182.google.com with SMTP id m6so2168020wiv.3 + for ; Sun, 30 Jun 2013 01:55:17 -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:in-reply-to:references; + bh=tTqcIokYWX/fYUnZqpxywMkr5prbznIczVolEpGuCfM=; + b=ZVpHgyi9zo2zety35HTlh4CmoQVM06FRYzKnDMma082esfE+LRx/WsJ261Ql+EytJT + oP5G0aLCN54uPkKSyRTrATjvma2jWDmfiq++SEb7Mncn9FDl/jyJHFEmywiDqOmn9K6B + kLGVO43r6uGnt+3++xoL36fZtYcFPpQaf4CPobE/zfqIOw8oCd2A5QHgXVSvegrSK63M + MK4Jyvh70nvVFG9gd6HpnPCOSGf5PvF2O/X8vidNrjVYAzm2nW+BTfKmi6iurRZRfnhc + 7zR0146Nxlvna8brV5MaH1oPeN7pXtEpZagZQEc6WHW5Lag8UlSpkDAdkXcMPV3oXBUp + yb2g== +X-Received: by 10.180.106.72 with SMTP id gs8mr9160916wib.51.1372582517738; + Sun, 30 Jun 2013 01:55:17 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id i1sm8551903wiz.6.2013.06.30.01.55.16 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 30 Jun 2013 01:55:17 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 1/3] contrib: pick: if no target specified go to first + matching message +Date: Sun, 30 Jun 2013 09:55:10 +0100 +Message-Id: <1372582512-10777-2-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1372582512-10777-1-git-send-email-markwalters1009@gmail.com> +References: <1372582512-10777-1-git-send-email-markwalters1009@gmail.com> +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: Sun, 30 Jun 2013 08:55:24 -0000 + +--- + contrib/notmuch-pick/notmuch-pick.el | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 16f8d15..ef16ca7 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -652,8 +652,10 @@ unchanged ADDRESS if parsing fails." + (save-excursion + (goto-char (point-max)) + (notmuch-pick-insert-msg msg)) +- (let ((msg-id (notmuch-id-to-query (plist-get msg :id)))) +- (when (string= msg-id notmuch-pick-target-msg) ++ (let ((msg-id (notmuch-id-to-query (plist-get msg :id))) ++ (target notmuch-pick-target-msg)) ++ (when (or (and (not target) (plist-get msg :match)) ++ (string= msg-id target)) + (setq notmuch-pick-target-msg "found") + (goto-char (point-max)) + (forward-line -1)))) +-- +1.7.9.1 +