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 IDyXEUZXGF/vCAAA0tVLHw (envelope-from ) for ; Wed, 22 Jul 2020 15:12:06 +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 SFJJDUZXGF+yfAAAbx9fmQ (envelope-from ) for ; Wed, 22 Jul 2020 15:12:06 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 BA6AB9400BB for ; Wed, 22 Jul 2020 15:12:04 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DBF2526BD4; Wed, 22 Jul 2020 11:11:54 -0400 (EDT) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mail.notmuchmail.org (Postfix) with ESMTPS id 71AA71FA22 for ; Wed, 22 Jul 2020 11:11:52 -0400 (EDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 909E05C004F; Wed, 22 Jul 2020 11:11:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 22 Jul 2020 11:11:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=uAjJS5YxlQLDN bQxVVTipdAYjgQzU41cye462XYED9s=; b=RRB98BlYUijs9EYS+15jqbbBTMLNG DZ/fQQKg11xi2Dx9LiXfqkTaxai2Cv7Z5Z7MlDEvMoB10xJhp5Sow9+UMKJXIFXo CIUF6ZYJW4xfjSTUnNS6Gx4WgeSYxVfzpMqg65qgGTBeCVuMPRVOJlcaIeeCxBKp ttYCG1Y8BtAU52T0wbSkuWfFqJsEsulQ0OtppW5PWcmu2H358ZgVr05HfbN0g45Y yprq9G2G38lNwDMS82zwkT2oBOukbqnjGyiIGgvEPoaoOpVL9gGv3F7GNE/isK8D hTgU3MJ4nusenNVhzjZXutpngCCoa53eQ/ppKAxEUtYLHJC7mmVs07tdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=uAjJS5YxlQLDNbQxVVTipdAYjgQzU41cye462XYED9s=; b=P4CJlF5V NS96dQbdFUUmudoJ25kcZNVdCmOXfg7ovIt4UyiO5gUVBGZ/45mHjw0VthEbXpE+ tGpZh79IuFkPewyv8ndmG8/M4Qht8zr8zsfmu0J7+ddKhyNq3uFoJQynx8YjPaXB 5ctc+fV43YEMMuloRMwFXQxLezvZYn1QF6Eg5SEANJltOHP0ufQdJl5o8DvRuOLk XCVHF6MbK2Y4EjrpxMAJikTTDGU0BZnNchIbmoiVcJUuxazuZkuDR2hjFeVUkLo6 xKVVPn1g9ot8U111PcTYGJPPMkmU5s/omvXMLXgtQt4VvAvbhhghB4Tap5Pp6wBE FRfmkllgD25GIg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeelgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfestdekredttd dttdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhp fihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeeuvdevvdehhfegudeigf dvgfevffekfeegudeutefgjeduffevlefffeeuteffveenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhith htohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton To: notmuch@notmuchmail.org Cc: Sean Whitton Subject: [PATCH] emacs: notmuch-search: avoid wiping out buffer-local variables Date: Wed, 22 Jul 2020 08:11:32 -0700 Message-Id: <20200722151132.28299-1-spwhitton@spwhitton.name> In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: Z4UBNJAKQUDJHK7VJKIGW2BEOGCBYHZZ X-Message-ID-Hash: Z4UBNJAKQUDJHK7VJKIGW2BEOGCBYHZZ X-MailFrom: spwhitton@spwhitton.name 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=spwhitton.name header.s=fm3 header.b=RRB98BlY; dkim=fail (body hash did not verify) header.d=messagingengine.com header.s=fm3 header.b=P4CJlF5V; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 1.03 X-TUID: /TIxS9RvU2hI --- emacs/notmuch.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index dd18f2e1..c97997fe 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -987,7 +987,11 @@ the configured default sort order." (if no-display (set-buffer buffer) (switch-to-buffer buffer)) - (notmuch-search-mode) + ;; avoid wiping out third party buffer-local variables in the case + ;; where we're just refreshing or changing the sort order of an + ;; existing search results buffer + (unless (eq major-mode 'notmuch-search-mode) + (notmuch-search-mode)) ;; Don't track undo information for this buffer (set 'buffer-undo-list t) (set 'notmuch-search-query-string query) -- 2.27.0