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 iLxoJZ9OG2FxLQEAgWs5BA (envelope-from ) for ; Tue, 17 Aug 2021 07:52:31 +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 aMYeIZ9OG2E/SgAA1q6Kng (envelope-from ) for ; Tue, 17 Aug 2021 05:52: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) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 57F6E21652 for ; Tue, 17 Aug 2021 07:52:31 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 76A621FE78; Tue, 17 Aug 2021 01:52:26 -0400 (EDT) Received: from lahtoruutu.iki.fi (unknown [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 644F71FE5C for ; Tue, 17 Aug 2021 01:52:23 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 40D7E1B00273; Tue, 17 Aug 2021 08:52:11 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1629179531; 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; bh=60f7SD++7zkJR4UUuIL/OzAS5aMRjjqpekRgmtGFafU=; b=TlVnBcHsLYNkjtEWXuNYRM9n/QtS9wYPZH7CSWx/iMhHEXHlws4F4BGXA+d4TgJi1X2VfJ Fw/dKs9tFUmuW692GGTGZlIB6f4pGD1BqVdJoqO6/FDNRzHRzTgh5+5QLaDOEOORJ6WCxD s6NV57M9sob+sGScYng79e6PEYd/3/4Z/ywPyeqNFklgvVd1RqyM4MsWluXS1syKVz31po gWy6gXPHurqKdOTIXh/9zPyLIClp7IOzhcn9gEuFQwu0AuJ0vrpg8g5oPv6imMfJr5zykt alhvKbsdlqKLVKW5Lj6CnTQU1adC2oV2BmDywH6z+0478XsHK8M9Q3e8DRG4zQ== From: Tomi Ollila To: David Edmondson , David Bremner , Alan Schmitt , notmuch Subject: Re: notmuch-tag failing on trailing space In-Reply-To: References: <87im0w6u5r.fsf@m4x.org> <87sfz9iwwo.fsf@m4x.org> <87a6lh8lln.fsf@tethera.net> User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1629179531; 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; bh=60f7SD++7zkJR4UUuIL/OzAS5aMRjjqpekRgmtGFafU=; b=vpJ8OU1Z7M7fV0GKB5PUQvu8g3crXUixUJRtG8z6Qdiy0IggjYRAMrQqytYyjjYigXhBaj i+jOxqe0K0Ag1wsNzs4Ucrmx5vhf/C0hyd75SdyKOGZ27ezVvek3DhwL2/C6qSUoZuu23z Q34UaOMikqdVYtmXxGMa6XfD243ts7tFbPH+kWWEuZTu5/bxx//nX3C3e9b4djX/Qi5n7a 8NEQhNluYE11SIVTjlqTb1MB2WZr0hd503I66LwrnKuJxvg/28dwNpRisIsmgcqtXPb4dy jSM26Kyv8zJL81rNQgE2MoeaSigbSn9MRtQTPb238ozzi0ZRXR7/EAUYJn5UwQ== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1629179531; a=rsa-sha256; cv=none; b=CxIznnHdQJoAf9BaQv1KYnnvB1Dg54/xHI+RQnMD1NrcZuT3FMXpiGFeFmm0CgPPbTo9Pc xwANmAY/6X/AaiOCCA0X5x9iJxGdS5uBEjb/TG2Bez/Oe7YmILaXQkZEGkCPhmc+Cs5P76 QTTHe8efy15xSnZ5R1ZPGvH8wJUMGuJmnr5uoRtg6KpTmr1Y13Vu3X6qwVs7hxtEhGP6e8 yY8wNV+YhQPWLegi4uH6I/ZZYQbOtB99RXX582dWh9WR5mvYMeiNOyFxF47EBmuQ7Pt4VA EfLqExuThFbYbDnNpuLdzwqEqnoFPvcEqo95c7ePiLDy2nJOxS49R/mdo2nmLg== Message-ID-Hash: GVD3KIT54DLFJQPNABF4W6PBFTC7Q2IB X-Message-ID-Hash: GVD3KIT54DLFJQPNABF4W6PBFTC7Q2IB X-MailFrom: tomi.ollila@iki.fi 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 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629179551; 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=j5br/ROKtcUK3BLXrJbh+Xyq/YV6SqP7afSIatgevy0=; b=fqk2FfrK7BcWbyWYllooe1/FviH7ViAqF5pr260/k41OwkB37vIWhhzTrhDZNDXjU58/n6 LG4rN4psD97m6yllb6Y+W4pVWzfgPXLc9lxy63vpj1nolCa5MjtYsc9wU68DmD3dL63O8s uz6zr6dX9EySlShNAOP0wkQ9UtjRkvKi9Q+/j0RtvKDG4rzF4+M1HnTOF6gStbQ2BEEBmX R9QHFTfJMtQAbNFbu9knivUmW8EissOAandqL1FE2RviYfdhOjgy2O4xVfzqaS2At8ESsL GKFnklF3BXnpoXdxdO2PLwLEUBlnJsU426J6n7CWXa+j2d9rEoUQjPL/EovhJw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1629179551; a=rsa-sha256; cv=fail; b=ZRJeeyuJfgNjfOPMRT1RC0+OWzapem0LDd1hmaURHE6ZCCCQziVjJ3fxdrvNLjHRwR6bYS 5cU7/85Nk95ZjHxis2qt0+fAm+7OWA/V9v6Fs/8EOHX6mCPmyOKf+BsWqk4sft80qQsE++ Qd4Ka02gIQGQWpKYv8o32tTyncSZ1ypTm7QzGAbeKVsYBJipb4/KNUTE7RIfYboear/mIL 33majoAi/jHBXPOOB+LYPGN41wX2rk0T1NRM8yyQq3cGW+MyhDVBK8USjsXa5vh1KTOa4g 1qConqo/5jvNM/yQQqn0Wg2AC3gbX5RMnF7TekUtgqjvYwcm2q8Q0CgWE8lmlQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=TlVnBcHs; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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.47 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=TlVnBcHs; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: 57F6E21652 X-Spam-Score: 2.47 X-Migadu-Scanner: scn0.migadu.com X-TUID: bgKq9xMIcyIb On Mon, Aug 16 2021, David Edmondson wrote: > 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. I'd also fix the source of the problem rather than the outcome... Tomi