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 oKpfGYGzrGFvNgAAgWs5BA (envelope-from ) for ; Sun, 05 Dec 2021 13:41:37 +0100 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 WG0bFYGzrGExUQAA1q6Kng (envelope-from ) for ; Sun, 05 Dec 2021 12:41:37 +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 1DCBEB02E for ; Sun, 5 Dec 2021 13:41:37 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6E8F626B0D; Sun, 5 Dec 2021 07:41:32 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id CDA8826993 for ; Sun, 5 Dec 2021 07:41:29 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id BC1EE5FC42; Sun, 5 Dec 2021 07:41:29 -0500 (EST) Received: (nullmailer pid 687589 invoked by uid 1000); Sun, 05 Dec 2021 12:41:28 -0000 From: David Bremner To: Ciprian Dorin Craciun , notmuch@notmuchmail.org Subject: Re: Strip spaces in `tags` in `~/.notmuch-config` (and other fields) In-Reply-To: References: Date: Sun, 05 Dec 2021 08:41:28 -0400 Message-ID: <87lf0zql53.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: GDX3E2BRLWCCHJSKP4O3V2O7ONJESYLC X-Message-ID-Hash: GDX3E2BRLWCCHJSKP4O3V2O7ONJESYLC 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: FR ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638708097; 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-owner:list-unsubscribe:list-subscribe:list-post; bh=QEgDI8TkLsol69L3IEsmpRWGjuSEKjhYQs2/vRXd0Wo=; b=RmTDmjl4+YuOEJBwktUzxey9WPs8OiHK8Scvs3lEfyLjzJvXWo7Ge5A96QdZmK/0+lUxQb jRL9CUSYqfEFL7ggT7vOWF+gWW0bKl7b3jKZxt7D0YqHu9UIMcu40//SZtGSiUr9iyWV+n Sn1Kk7QCCGsAumEKgyWVgS/ZuciQNZkutt4F1Owc5SFUmC/gzhiQGfCgXmV8ewrFNC6EL3 1xOoMj6qc1HceVfSiuUuKsnhAOxDnH+XYIxBxH8GSjr1C8l/1nPuzLfjmwSgOFsjikWTtS cDLQcZaI7eBX6MhIU2u9YTLwiQ9kuc+xCU5NoI6SsfemOvZgY5eYvtT7gLrFQg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638708097; a=rsa-sha256; cv=none; b=W2Ps16HZJcdJPW3VRgSGTw9YMctFC6f6iHoSudbxXDq2ern9XHlCOj/wcounxlPyOzyJj2 hY4nrWIkrJY1LfX0/tJ5Ub67mDtlD04vtj8Qaud63umu4UJ/u2cPcMSzN4xL1gSb8cvMed WuTRKotuhda3p+NR0Z4h/L3RWOyEHerZUjERLgMwoG5mM89+tfnfgNyOg0tpqd5XZXd2QK 8XfKvq5xk63VLij00Aaqz8g30D1+H8TvO5SWZMBcYQmb9RP78UCwXfXa+S8VqEur0tTQBV 8WlqLCZK64XBXjMG3GSCJjUhTU46OPRZhrUU/Il3e8PU1SrtPzTKg55phpVJ1w== 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: -1.93 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: 1DCBEB02E X-Spam-Score: -1.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: mi7iFkt0VrLH Ciprian Dorin Craciun writes: > > Given that the `~/.notmuch-config` resembles an INI file, and given > how lax the actual syntax is in general, I would suggest the > following: > > * allow white-spaces around `[ section ]`, and `field = value`; > * strip white-spaces (left and right) from values like `tags = unread > ; inbox ;`; (but not infix like `tag = some tag ; some other tag;`;) > * allow skipping the last `;` separator from `tags` and similar; > > Failing that, perhaps add a warning when parsing the configuration file. > This should be fixed in 0.34.1-37-gc0115288, to be part of 0.35 There are one or two remaining corner cases involving escaped spaces and tabs, but that goes above and beyond this request. d