From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8FdqERGS118ZcQAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 16:25:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uF42DRGS119iIAAAbx9fmQ (envelope-from ) for ; Mon, 14 Dec 2020 16:25:53 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D781194011A for ; Mon, 14 Dec 2020 16:25:52 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A557429CD4; Mon, 14 Dec 2020 11:24:49 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id BA08F28539 for ; Mon, 14 Dec 2020 11:24:07 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 53B311660A for ; Mon, 14 Dec 2020 17:24:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=sel2011a; t=1607963043; bh=7YtagbYAoeNVDEQ WX4Fx+n/zBT2iFFCulkvpf23DkUc=; b=YY4jVeMGPKtsrpBgaMmUSQqn4P5wkfH UH3hC7oFlEsVK+k5+4dWtJ7Pg56W3dWUWdAZ3PzHgWHHOq7BVt+Pv82vvr81R477 ZUyslez2BtYwLmAxNliDFzgmQPFzzyVUwMdENsA9vQ7RNx95ivFG/yCVrUAWICJo EtM7Vjma/OAA= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id He6gjxru-VXn for ; Mon, 14 Dec 2020 17:24:03 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 181B91665A for ; Mon, 14 Dec 2020 17:24:03 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 17/32] emacs: define notmuch-message-queued-tag-changes as buffer-local Date: Mon, 14 Dec 2020 17:23:46 +0100 Message-Id: <20201214162401.19569-18-jonas@bernoul.li> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201214162401.19569-1-jonas@bernoul.li> References: <20201214162401.19569-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: 4CYSIU3NW7EVSBXZWSX5AUHNWRJFK57I X-Message-ID-Hash: 4CYSIU3NW7EVSBXZWSX5AUHNWRJFK57I X-MailFrom: jonas@bernoul.li X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=bernoul.li header.s=sel2011a header.b=YY4jVeMG; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D781194011A X-Spam-Score: 1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: txgh0d7B+Wip Also improve the doc-string. --- emacs/notmuch-message.el | 14 +++++++------- emacs/notmuch-mua.el | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index f0e9ffcc..9dc8d056 100644 --- a/emacs/notmuch-message.el +++ b/emacs/notmuch-message.el @@ -50,14 +50,14 @@ (defcustom notmuch-message-forwarded-tags '("+forwarded") :type '(repeat string) :group 'notmuch-send) -(defconst notmuch-message-queued-tag-changes nil - "List of messages and corresponding tag-changes to be applied when sending a message. +(defvar-local notmuch-message-queued-tag-changes nil + "List of tag changes to be applied when sending a message. -This variable is overridden by buffer-local versions in message -buffers where tag changes should be triggered when sending off -the message. Each item in this list is a list of strings, where -the first is a notmuch query and the rest are the tag changes to -be applied to the matching messages.") +A list of queries and tag changes that are to be applied to them +when the message that was composed in the current buffer is being +send. Each item in this list is a list of strings, where the +first is a notmuch query and the rest are the tag changes to be +applied to the matching messages.") (defun notmuch-message-apply-queued-tag-changes () ;; Apply the tag changes queued in the buffer-local variable diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index b2930051..95d1965b 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -266,8 +266,8 @@ (defun notmuch-mua-reply (query-string &optional sender reply-all) ;; Create a buffer-local queue for tag changes triggered when ;; sending the reply. (when notmuch-message-replied-tags - (setq-local notmuch-message-queued-tag-changes - (list (cons query-string notmuch-message-replied-tags)))) + (setq notmuch-message-queued-tag-changes + (list (cons query-string notmuch-message-replied-tags)))) ;; Insert the message body - but put it in front of the signature ;; if one is present, and after any other content ;; message*setup-hooks may have added to the message body already. @@ -507,10 +507,10 @@ (defun notmuch-mua-new-forward-messages (messages &optional prompt-for-sender) ;; Create a buffer-local queue for tag changes triggered when ;; sending the message. (when notmuch-message-forwarded-tags - (setq-local notmuch-message-queued-tag-changes - (cl-loop for id in forward-queries - collect - (cons id notmuch-message-forwarded-tags)))) + (setq notmuch-message-queued-tag-changes + (cl-loop for id in forward-queries + collect + (cons id notmuch-message-forwarded-tags)))) ;; `message-forward-make-body' shows the User-agent header. Hide ;; it again. (message-hide-headers) -- 2.29.1