From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gKJ7OYIrGmFhlwAAgWs5BA (envelope-from ) for ; Mon, 16 Aug 2021 11:10:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yJOXNIIrGmHtZwAA1q6Kng (envelope-from ) for ; Mon, 16 Aug 2021 09:10:26 +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) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4196C186CA for ; Mon, 16 Aug 2021 11:10:26 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 305DB1FB94; Mon, 16 Aug 2021 05:10:21 -0400 (EDT) X-Greylist: delayed 393 seconds by postgrey-1.36 at nmbug; Mon, 16 Aug 2021 05:10:16 EDT Received: from mx1.polytechnique.org (mx1.polytechnique.org [129.104.30.34]) by mail.notmuchmail.org (Postfix) with ESMTPS id ED1801FB1A for ; Mon, 16 Aug 2021 05:10:16 -0400 (EDT) Received: from set (unknown [109.190.253.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id A9B8B564696 for ; Mon, 16 Aug 2021 11:03:39 +0200 (CEST) From: Alan Schmitt To: notmuch Subject: Re: notmuch-tag failing on trailing space In-Reply-To: <87im0w6u5r.fsf@m4x.org> References: <87im0w6u5r.fsf@m4x.org> Date: Mon, 16 Aug 2021 11:03:35 +0200 Message-ID: <87sfz9iwwo.fsf@m4x.org> MIME-Version: 1.0 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Mon Aug 16 11:03:40 2021 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000014, queueID=1C67F56469A X-Org-Mail: alan.schmitt.1995@polytechnique.org Message-ID-Hash: NPWON6CRAJGVK4KKSDNDNW3USXAMYXVD X-Message-ID-Hash: NPWON6CRAJGVK4KKSDNDNW3USXAMYXVD X-MailFrom: SRS0=bfKz=NH=polytechnique.org=alan.schmitt@bounces.m4x.org 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: multipart/mixed; boundary="===============5833057117966593650==" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629105026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=36bfeubAM07je+NFHqMWZppXsrCKJZ7P49skgkZQXBo=; b=mDT3A6NN4SHjS5gZeLelqFAst3IOkgY/7EJvoXYnznA4M8YrrwJrCuMoQwSUwcmkJ8EhgT evx/Cds2rhxYTd3ml2VXaIxjs+IweHeXtjEve9LKl6OUuRlIO1OWNRDwyp9qm9w2q07rFa /49pgPre6NOUoqWOissRc3rC+ogQclUrpAuQmx23kfDR+un3VjweiWfxbQVm6UpNRBFqPz cE/HwPKZG4lmD7mVxuyGxrZlayuIZjzeP1RBSawFgkc1S1pBeCWhDnmoIC4SRvmho2N6P/ ezovYxQ/csPj+ekMapFou6EzH0Aj1u2pf3GlMZytfjZfG1WhRwqZthlYtWBCKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629105026; a=rsa-sha256; cv=none; b=GSAJy5iJ8HsEOvG4X5zMpUkZFECm7d3J3bBOUg6Vf23Svz03fa+ssQa9osLH3qXZoUY276 RAVIpDSip14E2ShXkoLkRcYWAt85gJ8ZRLmnhxPdCvD2kcbW6eIHmnli9QoIftbH/fZBR+ V/6hRSN8Qp+ETYjo09SSeV1qLAEiSg9Vcz6Sd2lJZuz4wJdI9ISvOrP2yRT2EiKWrXovVl wx15P6F9al2+HksjzT2xtqtHt2fH7k2Cb8Tif5l+OL6bxiOYxE6wcumpS7iWRKfz7lUuyg GqdtMtrlquq2LWoOVz44wFdY+WPOvlubvZRlpE9/GC/9xusT1qtzactfXkNgaA== ARC-Authentication-Results: i=1; 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-Spam-Score: -2.63 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: 4196C186CA X-Spam-Score: -2.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: eL8ouUs/qegb --===============5833057117966593650== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Hello, On 2021-07-27 10:24, alan.schmitt@polytechnique.org writes: > I have an issue when using the vertico completion system to add tags to > messages that boils down to the following: the notmuch-tag function is > called like this: > notmuch-tag("id:CA+b3G33ad9PX5SuOwqaWS8TWBTtZcdguKtcQ3XmPvzSCsU..." ("+cwn ")) > and it fails because of the extra space at the end. > > Could notmuch-tag be modified to accept trailing spaces? Someone on the doom discord suggested the following workaround. #+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? Best, Alan --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAmEaKecfHGFsYW4uc2No bWl0dEBwb2x5dGVjaG5pcXVlLm9yZwAKCRAEDQo7TtLlx/r0B/91fK3sRsFizk7w mYM7UNYKKvvW0UsuZYabS1Se88cA1YymSXGywEgLGPEVXr2wagdVjs1GZ20Z9IcW 5LBfjWJAH6ExZ6PuhWEtlh5+KnwxwgVU1Iq1Jo7Vd9UU3sk0P7PNrLKKA6XfUJYC MorcuRPgFgiKER891nWXTDSkMmorDq+FCVMp0BRF7K1bTpdKKUH4xzksFfY6+gf6 acb43hJIGbGqhJfC5ngf3JObId0rEbOrxatIi4fiAPHhEO6722hgOsXkBoPGfk+i 47udjEIKWsZ7VL+z7bNtSMZ9nNJlPIAcVn+pNTdB9a+nsffDQfxj6KdUShB9RdMZ TxZrma3r =UL/8 -----END PGP SIGNATURE----- --=-=-=-- --===============5833057117966593650== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5833057117966593650==--