From: Mark Walters Date: Mon, 26 Aug 2013 21:09:03 +0000 (+0100) Subject: [Patch v2 1/3] contrib: pick: remove unneeded variable notmuch-pick-buffer-name X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=351db130b15774471d34077895c06b348acbcbb4;p=notmuch-archives.git [Patch v2 1/3] contrib: pick: remove unneeded variable notmuch-pick-buffer-name --- diff --git a/c0/3a91e9819b9fb63b481f960c9e0b14695b581d b/c0/3a91e9819b9fb63b481f960c9e0b14695b581d new file mode 100644 index 000000000..17b5e6dc5 --- /dev/null +++ b/c0/3a91e9819b9fb63b481f960c9e0b14695b581d @@ -0,0 +1,148 @@ +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 3C12A431FD8 + for ; Mon, 26 Aug 2013 14:09:22 -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 mAwtSCfFLTLY for ; + Mon, 26 Aug 2013 14:09:16 -0700 (PDT) +Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com + [209.85.212.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6AB80431FD4 + for ; Mon, 26 Aug 2013 14:09:16 -0700 (PDT) +Received: by mail-wi0-f180.google.com with SMTP id l12so3066081wiv.1 + for ; Mon, 26 Aug 2013 14:09:14 -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=4/KVWjghkP1o4+H62pV4xwv+tUq25NfJuJcFF3dBPrk=; + b=xx04wwwC9WNON0QBvD2gikUdu+Ssrjb85HE1DKWHcY++mN+1ILPLgJylXu0dQAc5GE + VFXatEOKpG6ZVQ8a+tCHdUOcUZN73ombN7/R8We7VAojp3SDZ5CHxVafeWUz+IIGpIjq + IRnF+nSc4Kc2eqiLaspWET4jkWfYNzlSlEvo1guI6/XxceVUbPYjkBQpK7OBSRnANZBw + ubQhp6Q/sxWqPIOBXLwIAFElz3S890/khP4UgsEjyrxx0CXwCevj70C1Z3YnCT92sYeh + 5DBzzpt4g4MqdK/t8r5O32+Ty3fm/cCvmzoAwTfx2BAu/LWIIazHSC6VwQcZaPSm1TjX + NUCA== +X-Received: by 10.194.170.227 with SMTP id ap3mr3161358wjc.40.1377551354002; + Mon, 26 Aug 2013 14:09:14 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id z2sm21384090wiv.11.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Mon, 26 Aug 2013 14:09:13 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [Patch v2 1/3] contrib: pick: remove unneeded variable + notmuch-pick-buffer-name +Date: Mon, 26 Aug 2013 22:09:03 +0100 +Message-Id: <1377551345-27147-2-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1377551345-27147-1-git-send-email-markwalters1009@gmail.com> +References: <1377551345-27147-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 21:09:22 -0000 + +This variable is essentially unused: it was only used for making sure +it itself got reset after a refresh of the buffer. + +It did this by passing an unnecessary argument to notmuch-pick-worker +so remove that too. +--- + contrib/notmuch-pick/notmuch-pick.el | 25 +++++++++---------------- + 1 files changed, 9 insertions(+), 16 deletions(-) + +diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el +index 8c499b0..5943ac2 100644 +--- a/contrib/notmuch-pick/notmuch-pick.el ++++ b/contrib/notmuch-pick/notmuch-pick.el +@@ -161,10 +161,6 @@ + "A buffer local copy of argument open-target to the function notmuch-pick") + (make-variable-buffer-local 'notmuch-pick-open-target) + +-(defvar notmuch-pick-buffer-name nil +- "A buffer local copy of argument buffer-name to the function notmuch-pick") +-(make-variable-buffer-local 'notmuch-pick-buffer-name) +- + (defvar notmuch-pick-message-window nil + "The window of the message pane. + +@@ -586,13 +582,11 @@ message will be \"unarchived\", i.e. the tag changes in + (let ((inhibit-read-only t) + (basic-query notmuch-pick-basic-query) + (query-context notmuch-pick-query-context) +- (target (notmuch-pick-get-message-id)) +- (buffer-name notmuch-pick-buffer-name)) ++ (target (notmuch-pick-get-message-id))) + (erase-buffer) + (notmuch-pick-worker basic-query + query-context +- target +- (get-buffer buffer-name)))) ++ target))) + + (defun notmuch-pick-clean-address (address) + "Try to clean a single email ADDRESS for display. Return +@@ -795,12 +789,11 @@ Complete list of currently available key bindings: + (notmuch-sexp-parse-partial-list 'notmuch-pick-insert-forest-thread + results-buf))))) + +-(defun notmuch-pick-worker (basic-query &optional query-context target buffer open-target) ++(defun notmuch-pick-worker (basic-query &optional query-context target open-target) + (interactive) + (notmuch-pick-mode) + (setq notmuch-pick-basic-query basic-query) + (setq notmuch-pick-query-context query-context) +- (setq notmuch-pick-buffer-name (buffer-name buffer)) + (setq notmuch-pick-target-msg target) + (setq notmuch-pick-open-target open-target) + +@@ -813,7 +806,7 @@ Complete list of currently available key bindings: + (if (equal (car (process-lines notmuch-command "count" search-args)) "0") + (setq search-args basic-query)) + (let ((proc (notmuch-start-notmuch +- "notmuch-pick" buffer #'notmuch-pick-process-sentinel ++ "notmuch-pick" (current-buffer) #'notmuch-pick-process-sentinel + "show" "--body=false" "--format=sexp" + message-arg search-args)) + ;; Use a scratch buffer to accumulate partial output. +@@ -846,13 +839,13 @@ The arguments are: + (concat "*notmuch-pick-" query "*"))))) + (inhibit-read-only t)) + +- (switch-to-buffer buffer) +- ;; Don't track undo information for this buffer +- (set 'buffer-undo-list t) ++ (switch-to-buffer buffer)) ++ ;; Don't track undo information for this buffer ++ (set 'buffer-undo-list t) + +- (notmuch-pick-worker query query-context target buffer open-target) ++ (notmuch-pick-worker query query-context target open-target) + +- (setq truncate-lines t))) ++ (setq truncate-lines t)) + + + ;; Set up key bindings from the rest of notmuch. +-- +1.7.9.1 +