From: Mark Walters Date: Mon, 26 Aug 2013 19:57:22 +0000 (+0100) Subject: [PATCH 1/2] contrib: pick: remove sync parser X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c5112f4036019afedbef6a65e8f256b486a19218;p=notmuch-archives.git [PATCH 1/2] contrib: pick: remove sync parser --- diff --git a/9e/ae6faf31afd851b5e7c859520bd5d0676f642c b/9e/ae6faf31afd851b5e7c859520bd5d0676f642c new file mode 100644 index 000000000..403989ee1 --- /dev/null +++ b/9e/ae6faf31afd851b5e7c859520bd5d0676f642c @@ -0,0 +1,127 @@ +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 07C90431FDC + for ; Mon, 26 Aug 2013 12:57:37 -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 T8MRLgXCK1K7 for ; + Mon, 26 Aug 2013 12:57:31 -0700 (PDT) +Received: from mail-we0-f172.google.com (mail-we0-f172.google.com + [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5D663431FD4 + for ; Mon, 26 Aug 2013 12:57:31 -0700 (PDT) +Received: by mail-we0-f172.google.com with SMTP id t60so3106632wes.17 + for ; Mon, 26 Aug 2013 12:57:30 -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:in-reply-to:references; + bh=CmHzUJdg5ZBIo+pOnnddlDrDdHXzrhG74ixLgfTxc78=; + b=t22fnuf1EgkZ3AN5OV6NhyHFPCaQIGke95KtuJXYc3yPV6NKooI6VOFWNZ9nOrobyF + dWdDQDvydie7uh5F4egeEfC5Gi1DWJl+Edr0wKpu8WvELiLnb0JQFpd9l2YFeuZaqwxq + J+szpJS6rKg1tHXaz2tFanstUR3KUiuiDMBlyx+4zejy+w3RtKM1RmqFY5r+vp0h1Jp6 + eWyDGULPnfam2Jbwrn8qoLsZyQZk1SVVe/zYAZi+IGPnt/aeVWvcSYXzD3Cw1X8P7eQ/ + p6uc08JBrGIT12K5zI+3FLK19Q8hCBsMMe5P2HN1EyB3xavXJil5IKFbR4q9PkT8Q0yP + 1zNg== +X-Received: by 10.180.91.82 with SMTP id cc18mr8639363wib.7.1377547050235; + Mon, 26 Aug 2013 12:57:30 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id li9sm20986335wic.4.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 26 Aug 2013 12:57:29 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] contrib: pick: remove sync parser +Date: Mon, 26 Aug 2013 20:57:22 +0100 +Message-Id: <1377547043-17584-2-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1377547043-17584-1-git-send-email-markwalters1009@gmail.com> +References: <1377547043-17584-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: Mon, 26 Aug 2013 19:57:37 -0000 + +Previously pick had the option of using an async parser like search or +a sync parser like show. The async parser has always been the default +and it seems fine so we can remove the sync one and the corresponding +defcustom. +--- + contrib/notmuch-pick/notmuch-pick.el | 36 ++++++++++----------------------- + 1 files changed, 11 insertions(+), 25 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 37dc161..8c499b0 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -77,11 +77,6 @@ + :type '(alist :key-type (string) :value-type (string)) + :group 'notmuch-pick) + +-(defcustom notmuch-pick-asynchronous-parser t +- "Use the asynchronous parser." +- :type 'boolean +- :group 'notmuch-pick) +- + ;; Faces for messages that match the query. + (defface notmuch-pick-match-date-face + '((t :inherit default)) +@@ -817,26 +812,17 @@ Complete list of currently available key bindings: + (message-arg "--entire-thread")) + (if (equal (car (process-lines notmuch-command "count" search-args)) "0") + (setq search-args basic-query)) +- (if notmuch-pick-asynchronous-parser +- (let ((proc (notmuch-start-notmuch +- "notmuch-pick" buffer #'notmuch-pick-process-sentinel +- "show" "--body=false" "--format=sexp" +- message-arg search-args)) +- ;; Use a scratch buffer to accumulate partial output. +- ;; This buffer will be killed by the sentinel, which +- ;; should be called no matter how the process dies. +- (parse-buf (generate-new-buffer " *notmuch pick parse*"))) +- (process-put proc 'parse-buf parse-buf) +- (set-process-filter proc 'notmuch-pick-process-filter) +- (set-process-query-on-exit-flag proc nil)) +- (progn +- (notmuch-pick-insert-forest +- (notmuch-query-get-threads +- (list "--body=false" message-arg search-args))) +- (save-excursion +- (goto-char (point-max)) +- (insert "End of search results.\n")))))) +- ++ (let ((proc (notmuch-start-notmuch ++ "notmuch-pick" buffer #'notmuch-pick-process-sentinel ++ "show" "--body=false" "--format=sexp" ++ message-arg search-args)) ++ ;; Use a scratch buffer to accumulate partial output. ++ ;; This buffer will be killed by the sentinel, which ++ ;; should be called no matter how the process dies. ++ (parse-buf (generate-new-buffer " *notmuch pick parse*"))) ++ (process-put proc 'parse-buf parse-buf) ++ (set-process-filter proc 'notmuch-pick-process-filter) ++ (set-process-query-on-exit-flag proc nil)))) + + (defun notmuch-pick (&optional query query-context target buffer-name open-target) + "Run notmuch pick with the given `query' and display the results. +-- +1.7.9.1 +