From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CJGSGkSPGmHbYwEAgWs5BA (envelope-from ) for ; Mon, 16 Aug 2021 18:16:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6IJMFkSPGmGtCwAA1q6Kng (envelope-from ) for ; Mon, 16 Aug 2021 16:16:04 +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) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D29132F0F3 for ; Mon, 16 Aug 2021 18:16:01 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0FD4D1FCE6; Mon, 16 Aug 2021 12:15:58 -0400 (EDT) X-Greylist: delayed 570 seconds by postgrey-1.36 at nmbug; Mon, 16 Aug 2021 12:15:55 EDT Received: from forward2-smtp.messagingengine.com (forward2-smtp.messagingengine.com [66.111.4.226]) by mail.notmuchmail.org (Postfix) with ESMTPS id 6DE511FCAF for ; Mon, 16 Aug 2021 12:15:55 -0400 (EDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id A92C41940357; Mon, 16 Aug 2021 12:06:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 16 Aug 2021 12:06:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type: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=jWAHeb Z8za9lqN7qQ3XQ1h3IP3FtXRV8KH6kFx2Mbg4=; b=S9zcfpNnpxDBL9NRUFNOwD Nx8Q5iOXDMqa/t/y9wMNyxX/2timriqYI7wRsZKPoxyhH/URNzk4ndyEi9FaZxdT EyymhE1+gwC5VMXW8BYIB9DuLbPntKUqui2/prmU6g5inFAaohJgn4n56okr7s1q surNjaHlT5xXR1/bcTrAIoWtEdjHiBCdE0jtXtx53OWUb1YjgXFEZ6sCehMDBSbJ o467V5HeHOAVfjtlIqyB4rUFNIo53zLPTCYgOPwm7bvIxPdMaAf9PKivAbQRvq+S O+RxdgW2YilbJDz5M4/r2F1UguONmTVX7KtVIk4R0xXqrcNsz7htZ7IGlyBp8Gbw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrledugdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefvufgjfhfhfffkgggtsehttdertddttddtnecuhfhrohhmpeffrghvihguucfg ughmohhnughsohhnuceoughmvgesughmvgdrohhrgheqnecuggftrfgrthhtvghrnhephf ekgeeutddvgeffffetheejvdejieetgfefgfffudegffffgeduheegteegleeknecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmvgesughmvg drohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Aug 2021 12:06:21 -0400 (EDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 317d9504; Mon, 16 Aug 2021 16:06:20 +0000 (UTC) To: David Bremner , Alan Schmitt , notmuch Subject: Re: notmuch-tag failing on trailing space In-Reply-To: <87a6lh8lln.fsf@tethera.net> References: <87im0w6u5r.fsf@m4x.org> <87sfz9iwwo.fsf@m4x.org> <87a6lh8lln.fsf@tethera.net> From: David Edmondson Date: Mon, 16 Aug 2021 16:48:17 +0100 Message-ID: MIME-Version: 1.0 Message-ID-Hash: 7EYMHUDSSOHU5ULCLHWYRHVG2VL5B4WL X-Message-ID-Hash: 7EYMHUDSSOHU5ULCLHWYRHVG2VL5B4WL 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 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629130564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5BNW9E/r83sd3RiQfKAL4jcSri8iaqE5EWRmN0a9Wew=; b=T0yTNre+Ryi0aQecR9sJmRtR84zaTrRM8Ee1jJsJqwR8EfsqgY0BkjBkPr/OAHTpnMJtcE m4zKZ8hePkmOJcy+JaNOFjbrGgy4/oQlWpmTLXkdex36mEMHT5SDuQItjZwK5Aic9YGHR3 vMb8xH+gUfv8/aYr/KjclLmChQ/d6bLQC+16bOWRTrqvbrvBwOB2VOg/WDonFX1y+0clYt dEA3qDmMkIW6qk6kQZbnseOSBV1y/rHqqwPr7RQVPsPVrf+rx96yoGy/UrzUHMq/A06paW BlatJM/vjoyVaosM51j4ksXoDq9ntbuHl4XLl9Ktl5Xx8oJvA3MEZdtF8LPciw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629130564; a=rsa-sha256; cv=none; b=oFKbt9xAWvY/S/BOEQ6/v2xeEOsIYSEDVAxqn7ZIyTmC5e1Ck64/PQH2mwiBKvjyQEHkQP ygz8JX1uJLWvu7iRdIHmTwq3fo9BNX6iYyY9F6bigVAHn6XmzSC2Tj9ydlft9V8bOa4cSN DtE3pccMr6HFPamwsHhc1AuJh1IbqhAam8R98IwujyC9m42SN4sp2EdM/lnE+J05ebvUno uPc+PrjR/cN5rsDYJ0uwDcJhhYatFN2lY5KjMoN0CmTzdpfH8lJw1MLF5V584FaWmOCPGU TriTA1s4+6j4C8r8v4ouB9HvWRvPUcKTEk4ZAXDPLnMzvVec+Ca1Vckjv8F3vg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm3 header.b=S9zcfpNn; 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-Migadu-Spam-Score: 0.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm3 header.b=S9zcfpNn; 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-Migadu-Queue-Id: D29132F0F3 X-Spam-Score: 0.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: C1yjCJgv2CXw On Monday, 2021-08-16 at 08:17:56 -07, David Bremner wrote: > Alan Schmitt writes: > >> >> #+begin_src emacs-lisp >> (defun trim-tag-changes (args) >> (list (car args) (mapcar #'s-trim-right (cadr args)))) >> (advice-add 'notmuch-tag :filter-args #'trim-tag-changes) >> #+end_src >> >> Could it be integrated directly in the notmuch-tag function? >> > > That particular function won't work for us because it would introduce a > new dependency on s.el. But if someone wants to make an equivalent using > only core emacs functions and integrate it into notmuch-tag, that seems > likely OK to me. What if someone has trailing spaces on their tags deliberately? This seems like an oddity of the code in `notmuch-read-tag-changes' that appends a space to every possible completion. It would probably be a more annoying change to some users, but I'd be more inclined to remove that code than this change.