From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4F1176DE0318 for ; Sat, 14 Oct 2017 13:21:51 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.019 X-Spam-Level: X-Spam-Status: No, score=0.019 tagged_above=-999 required=5 tests=[AWL=0.039, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled 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 1PZ6MV5vVD_K for ; Sat, 14 Oct 2017 13:21:50 -0700 (PDT) Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by arlo.cworth.org (Postfix) with ESMTPS id 51B9D6DE01C2 for ; Sat, 14 Oct 2017 13:21:50 -0700 (PDT) Received: by mail-lf0-f65.google.com with SMTP id b190so13004232lfg.9 for ; Sat, 14 Oct 2017 13:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=2JBnbrQYXnId/NLPdQJwOQteYcu8JOzMwlWCAREp9ww=; b=H5pnCGMhZsFYJtXawtlHpd6rr0/rbJ9jFj1t+v0H7XgIH2wjop7/RGpM36gp76FVp2 r7aNCn476QNRA+2N+OQaY1ET4auhoRPI7kjPTqbX3UuWSZO9XIHc9A6MIiA4W2/gBQ6A a60370wXrXnhOJrWn8qIwxr6u70LcUZY0mdpPfATxe8SsbngrJfqwgCdxMNjJop52omg 0w8G8caLP9PoqBqxajb98zjwn14SpBPZZPRb3r4RLJVPcNOYBpfaWIe7TJb+AMLvqLj0 FP4JeRUjqek0rx06VE4zWfNYbdyECOoY9DwvG7DUvv02Dt3egTk4vnrk3DmTB4bjOsed o8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=2JBnbrQYXnId/NLPdQJwOQteYcu8JOzMwlWCAREp9ww=; b=q5PhQa50CnsLBzWIxBNi3bgrcbl4A98vSDmQtRIrmgbsWkPLefIj+TAmfxHhZt+rLA sFskhbgZooOJKgmsg4xmoMJnd9N7XxxhiaYEvFVgV3nSgHJ0bfm/9vdE7gsoBXmg7PaK eYJ2ESrXuJMDI2biwq/QEOt7RASf/7hL611JJEixP/2s8iLFqtrPMg6mXC1XccUpFfc0 t+0LkrZuU696LTifCjY8QNEXOBz119P0nzUzkf2V6anHcuPkLqTqk6Jsm1ZgkcqVfcml nHsfXqSVrW309oTDBkDxMKNvkx+6bMtNXI2WvIOVlKnmHW3FnYepyaoHlHA3rppyhyk3 mPug== X-Gm-Message-State: AMCzsaUGN7IGb6bYRhPAkGxCStCzcG9Xogk7A687rzCtqdsTHrBRe3JV pwVNy9Nh6CgoWENf8C1fsJt9kl90q6s= X-Google-Smtp-Source: AOwi7QDqHSx1bzxYh9Ls/fyQRJ67hkj4tvIoxVkVsNt8ORkoGa56IhKsQMpdXNMZ0Qc2eaUZWLxm2w== X-Received: by 10.46.43.78 with SMTP id q75mr2031493lje.25.1508012508793; Sat, 14 Oct 2017 13:21:48 -0700 (PDT) Received: from localhost (mobile-access-5d6a0c-19.dhcp.inet.fi. [93.106.12.19]) by smtp.gmail.com with ESMTPSA id r22sm949236ljr.16.2017.10.14.13.21.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 14 Oct 2017 13:21:48 -0700 (PDT) From: Jani Nikula To: William Casarin , notmuch@notmuchmail.org Subject: Re: [PATCH 1/3] cli: add support for --no- prefixed boolean and keyword flag arguments In-Reply-To: <877evx34e5.fsf@jb55.com> References: <20171014131608.17587-1-jani@nikula.org> <877evx34e5.fsf@jb55.com> Date: Sat, 14 Oct 2017 23:21:47 +0300 Message-ID: <87k1zx8opw.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2017 20:21:51 -0000 On Sat, 14 Oct 2017, William Casarin wrote: > Hey Jani, > > Patches look good so far, concept ack for sure. > > > Jani Nikula writes: > >> For example, you can use --no-exclude instead of --exclude=false in >> notmuch show. If we had keyword flag arguments with some flags >> defaulting to on, say --include=tags in notmuch dump/restore, this >> would allow --no-include=tags to switch that off while not affecting >> other flags. > > I've been testing it a bit, I can't seem to make this work in this example: > > ./notmuch count --no-exclude > > After some brief investigation it might be because count is using > EXCLUDE_true(1) and EXCLUDE_false(0) which are not equal to > NOTMUCH_EXCLUDE_TRUE(1) and NOTMUCH_EXCLUDE_FALSE(2), but I'm not sure. *blush* I screwed those enums up. Here's a patch that takes care of both issues id:20171014201836.4486-1-jani@nikula.org. It's independent of this series. BR, Jani.