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 6O0CDssmGGDrVgAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 16:05:31 +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 iJeuCcsmGGBgHwAAbx9fmQ (envelope-from ) for ; Mon, 01 Feb 2021 16:05:31 +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 84E48940105 for ; Mon, 1 Feb 2021 16:05:30 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AB2F128CD9; Mon, 1 Feb 2021 10:49:41 -0500 (EST) Received: from fethera.tethera.net (unknown [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id DCD4828CBD for ; Mon, 1 Feb 2021 10:49:38 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 3A897607F4; Mon, 1 Feb 2021 10:49:37 -0500 (EST) Received: (nullmailer pid 214964 invoked by uid 1000); Mon, 01 Feb 2021 15:49:36 -0000 From: David Bremner To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: When completing tags, offer each tag once In-Reply-To: <20210201145402.561245-1-dme@dme.org> References: <20210201145402.561245-1-dme@dme.org> Date: Mon, 01 Feb 2021 11:49:36 -0400 Message-ID: <87im7byei7.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: NNBK6F5YMFNGZVAZSEWFQJJVEBRQPTBT X-Message-ID-Hash: NNBK6F5YMFNGZVAZSEWFQJJVEBRQPTBT X-MailFrom: david@tethera.net 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 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: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 84E48940105 X-Spam-Score: -2.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1NHk3CAk22mo David Edmondson writes: > > +(defun notmuch-search-uniq-tags (tags) > + (let (result) > + (mapc (lambda (tag) > + (unless (member tag result) > + (push tag result))) > + tags) > + result)) I leave elisp style to others... Is there some bound on the length of tags? Otherwise this seems like it's potentially a bit slow? d