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 aNk9A41oGmA+MgAA0tVLHw (envelope-from ) for ; Wed, 03 Feb 2021 09:10:37 +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 UOeSOoxoGmBpHwAAB5/wlQ (envelope-from ) for ; Wed, 03 Feb 2021 09:10:36 +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 A4BEA940366 for ; Wed, 3 Feb 2021 09:10:36 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6663A28CE2; Wed, 3 Feb 2021 04:10:28 -0500 (EST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by mail.notmuchmail.org (Postfix) with ESMTPS id D880628CA2 for ; Wed, 3 Feb 2021 04:10:25 -0500 (EST) Received: by mail-ed1-x533.google.com with SMTP id y8so10801522ede.6 for ; Wed, 03 Feb 2021 01:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cIq+p9X54b1MR2WabdPupmTyZZbRXoGsa1M/nHnX99Q=; b=NF0aFtox7+/iZO6brZZhWHHmhMNx2C4OiSCot8pjtREV04rw1l8A295gvpkvqKzgv5 MSfrkQMjYg7veZO6mcTg1T0m/PilSfjVGM7DseSm8rkSielxAUPpulLJgUPd631CGIM1 4UX+f/ZniTUw1O4Z5a5nzjhrrWPx7U7DqRCSjaVKyMV5Fmb92bBLlbpBH8hF/jEhNsHm LiYTHyVW95tXBbv5QucPYrq6LRJqjmsumSMi+T4tz6v0ebvsvIJwaVF37xXmA4VcY1UO QYm4pT/ZM9LBDPoz2YDwIZKsFr5K4znp7qNUn602Wx0r9uDnujzNYOoTAJ7kbgHI4RcO rLfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cIq+p9X54b1MR2WabdPupmTyZZbRXoGsa1M/nHnX99Q=; b=D8WsZLj/nE1uIHoKHX+VubCRFY8XSqhD9TfR/qINbSiODSnpJcPrnR9Vx9y8i/mlUP c9PkjOYy1eBXRfq0nxA6XUFxPEfkYUy64B+VdO7X1Sd+eJnJsvgVXB87c0WYQ7yEWsw4 2vuUIols92QyIdufviGbiRgX6cXxPCP6VFzqJDI8DmcIIGEfe5hLyILH16GBfh/sv+B3 hQEIKnBicTJ9w/rrCMaS5z2mfjzSc1wgGZDE2Rsk6MXym/o2Sx8MXsgewnCAk3HbF6Za lVcyJRZkjp1Lsce5QQFcu1x8+rldDcze91D3KQNAxsOvk7lIo51kmck1gbgOxeyelRgW k8RA== X-Gm-Message-State: AOAM531oGGJlhB1CTLj5uluzf3yXgxCndowUtnra1n8iilbIkn9csCTX VlJ6TQ9vup9APqEO7GM0/Uvk2fLVqCDnYfu4JGc= X-Google-Smtp-Source: ABdhPJzlQALiFm3D5knJzVmJEYL9M4q6g5QLZfXweGf5s7UaXzCsQR6dKvLWYW3lnsfizksCVCqQqQ== X-Received: by 2002:a05:6402:1341:: with SMTP id y1mr1958547edw.273.1612343421771; Wed, 03 Feb 2021 01:10:21 -0800 (PST) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [2001:8b0:bb71:7140:64::1]) by smtp.gmail.com with ESMTPSA id w3sm706075eja.52.2021.02.03.01.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 01:10:21 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id f367fa2b; Wed, 3 Feb 2021 09:10:20 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v2] emacs: When completing tags, offer each tag once Date: Wed, 3 Feb 2021 09:10:20 +0000 Message-Id: <20210203091020.34546-1-dme@dme.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Message-ID-Hash: 34H4WKR336VDFAFU2QLG3HXEDKYPMRRQ X-Message-ID-Hash: 34H4WKR336VDFAFU2QLG3HXEDKYPMRRQ X-MailFrom: dme@dme.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 CC: David Edmondson 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: -0.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=dme-org.20150623.gappssmtp.com header.s=20150623 header.b=NF0aFtox; 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: A4BEA940366 X-Spam-Score: -0.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: j65+cwJPHnZ2 When prompting for one or more tags to add or remove to/from one or more threads, ensure that the set of tags offered for completion contains no duplicates. Some completion packages (e.g. selectrum) will include every member of the offered list, resulting in the same tag being indicated as a possibility several times. --- Use `delete-dups' rather than hand-coding similar. emacs/notmuch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 26efcccd..6d37c623 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -577,7 +577,7 @@ thread." (notmuch-search-foreach-result beg end (lambda (pos) (setq output (append output (notmuch-search-get-tags pos))))) - output)) + (delete-dups output))) (defun notmuch-search-interactive-tag-changes (&optional initial-input) "Prompt for tag changes for the current thread or region. -- 2.30.0