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 gPvvB3TBol7fTQAA0tVLHw (envelope-from ) for ; Fri, 24 Apr 2020 10:37:40 +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 uKAxDHvBol7cMAAAbx9fmQ (envelope-from ) for ; Fri, 24 Apr 2020 10:37:47 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DCBDC9408FA for ; Fri, 24 Apr 2020 10:37:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id EA60A6DE1394; Fri, 24 Apr 2020 03:37:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3sSJTkZ06L4L; Fri, 24 Apr 2020 03:37:43 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id D72496DE136D; Fri, 24 Apr 2020 03:37:42 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 05ACA6DE136D for ; Fri, 24 Apr 2020 03:37:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lDrhtxl4RJ3w for ; Fri, 24 Apr 2020 03:37:36 -0700 (PDT) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by arlo.cworth.org (Postfix) with ESMTPS id 11A0C6DE10D2 for ; Fri, 24 Apr 2020 03:37:36 -0700 (PDT) Received: by mail-qt1-f173.google.com with SMTP id s30so7475997qth.2 for ; Fri, 24 Apr 2020 03:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=uAZSqArY2wHU3YdcTtaNfYeXFKDxx7hvDhaVScUhx8Y=; b=jBEhd3XNp5Vq3vOPK+jj4qQBI+o+TlsIf98I50PUB5ULMR1vNZ15rKV5M9b1YQbH9S mIWUrF66mpig/IiR2NTf9t4gvHBhzWcQ0Ju/36z3f8Mwyt8y9k6F6DLBEn6c6J8bXwF4 liO39ubio0wwk3vbHTj4k7yvxDK5/Pkk/C4cDe4vn4Sp7O+j3v6TGXtv8v31Kf+eZBhm gfntH9eZPbtUXw5jxtnJSfYcOWFkGWBtYI4kObBAxXSHPwG3y6js5Lk/E5ufUHDBGxOR M+iNYzQ0ejIFRGUYW+tB0lwZJEGCBTrX+dBOxLPh+gkKAkdohSBmESyN4j2gUU1pJMqA gb7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uAZSqArY2wHU3YdcTtaNfYeXFKDxx7hvDhaVScUhx8Y=; b=a2rayCqNtOOAupGnN4P6/TcRW48va0s3xcTd6NbN1JFX7hAD/M8udM1cHkAW86hob8 v2e9JyD0wHWQ7Zvsetqax47jEzOhry81wrRaO2CzW/RaIPJ4Yfwy4zw07lcbhT2f14JY jCsBdG0vP0Zs9M0Vcu2+7/KkpgB53nzDwptPaM71jZKJzbHa7ufbM2j3lX236FcJflfk AuYVRysQrQNrnTH8yB9XYhWbR+1sD8RB+0uEBZrxXIljl2OudqgSc2ivFE0BAu7aA5YX 5Z0Oh7sTZQzB3f9yqRUuf+dHm8mh48INLITIUQLpkkmklblLhxIqGZJo6aQwAZnfNmFa BEWw== X-Gm-Message-State: AGi0PubPG8zHGe4KuWrN+nG4ALP3dbwIY+mhssfxeKsz4UGTk53kV7jf yMZXSX7w2e66w3mbhc6YLaAchs67wTLrx6QYWSDmIw== X-Google-Smtp-Source: APiQypJmXgmnQw1j7ruB5cLFUSoJMXqGRTx+Xrx+c4LR25XN7FMBeYmUv5/ws7tsn39ym9BhbZga4LZrb6spulDdn2k= X-Received: by 2002:ac8:6741:: with SMTP id n1mr8701062qtp.344.1587724654756; Fri, 24 Apr 2020 03:37:34 -0700 (PDT) MIME-Version: 1.0 From: Ciprian Dorin Craciun Date: Fri, 24 Apr 2020 13:36:58 +0300 Message-ID: Subject: Strip spaces in `tags` in `~/.notmuch-config` (and other fields) To: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: -0.11 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=jBEhd3XN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [-0.11 / 13.00]; GENERIC_REPUTATION(0.00)[-0.46224441194962]; R_SPF_ALLOW(-0.20)[+a:c]; R_DKIM_REJECT(1.00)[gmail.com:s=20161025]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; DKIM_TRACE(0.00)[gmail.com:-]; RCVD_IN_DNSWL_MED(-0.20)[50.126.95.6:from]; MX_GOOD(-0.50)[cached: notmuchmail.org]; MAILLIST(-0.20)[mailman]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cipriancraciun@gmail.com,notmuch-bounces@notmuchmail.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[notmuchmail.org:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed),none] X-TUID: CTiO4WoIVja7 [Sorry if I'm double reporting this. I've tried my best to search for previous discussions.] I've tried to manually edit my `~/.notmuch-config`, and I've seen that the field `tags` was written as `tags=unread;inbox;`. In order to increase readability I've decided to update my configuration file by adding spaces around `=` and `;` as in `tags = unread ; inbox ;`. Everything worked without a warning, until it didn't... :) What happened: all my emails are now tagged with `unread ` and ` inbox `; (i.e. whitespace in tags). 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. Hope it helps, Ciprian.