From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IPeNCi+S118dcgAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 16:26:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GCE+Bi+S119TAwAAB5/wlQ (envelope-from ) for ; Mon, 14 Dec 2020 16:26:23 +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 C9E9F9403EB for ; Mon, 14 Dec 2020 16:26:22 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DBC3329CEC; Mon, 14 Dec 2020 11:25:02 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 03E7E29BE5 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 CB70116693 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=G3wT8BiHYY+Z7Ta Lqrbb8EXM+SKqBreanhbxamnOPiE=; b=m5ECsw5765drD1qvRDTn4xFttozvxVZ ra7Wm0YkhDpMHoyvIIYk9f/MlGV3sTtUqQoX/cfuSV/Z1secP7FzMGlpR1WnADip IbvphYhJdoFDLXrtvrLzKmMJhXwtUJN9KbFoKRGMMT7BgMQsWxhRGTIAgynRlpyq 6k/SbT+t6tl4= 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 bdBUlZeWOr_9 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 941AA165DD for ; Mon, 14 Dec 2020 17:24:03 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 26/32] emacs: remove variable notmuch-search-disjunctive-regexp Date: Mon, 14 Dec 2020 17:23:55 +0100 Message-Id: <20201214162401.19569-27-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: JNP42QT34F7MTLKGMROZVDOC2YAPODVB X-Message-ID-Hash: JNP42QT34F7MTLKGMROZVDOC2YAPODVB 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=m5ECsw57; 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: C9E9F9403EB X-Spam-Score: 1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2VcdCA27V+52 The value is the only possible value, it is only used in one place, and using a global variable serves no purpose but to make things more complicated. --- emacs/notmuch.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 20d2f095..35f825b9 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -232,8 +232,6 @@ (defvar notmuch-search-query-string) (defvar notmuch-search-target-thread) (defvar notmuch-search-target-line) -(defvar notmuch-search-disjunctive-regexp "\\<[oO][rR]\\>") - ;;; Movement (defun notmuch-search-scroll-up () @@ -1083,10 +1081,8 @@ (defun notmuch-search-toggle-order () (defun notmuch-group-disjunctive-query-string (query-string) "Group query if it contains a complex expression. - -Enclose QUERY-STRING in parentheses if it matches -`notmuch-search-disjunctive-regexp'." - (if (string-match-p notmuch-search-disjunctive-regexp query-string) +Enclose QUERY-STRING in parentheses if contains \"OR\" operators." + (if (string-match-p "\\<[oO][rR]\\>" query-string) (concat "( " query-string " )") query-string)) -- 2.29.1