From 20c080b4b8aab4f5a4d72a018be97dc394905909 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 3 Mar 2013 23:55:04 +0200 Subject: [PATCH] [PATCH v2 0/6] notmuch cli config changes --- ee/f90814209f7d361f1637933a84bede5cdd6f8e | 98 +++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 ee/f90814209f7d361f1637933a84bede5cdd6f8e diff --git a/ee/f90814209f7d361f1637933a84bede5cdd6f8e b/ee/f90814209f7d361f1637933a84bede5cdd6f8e new file mode 100644 index 000000000..7734772ea --- /dev/null +++ b/ee/f90814209f7d361f1637933a84bede5cdd6f8e @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 8C3B8431FBF + for ; Sun, 3 Mar 2013 13:55:20 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id UXq7Vh4BDhoM for ; + Sun, 3 Mar 2013 13:55:16 -0800 (PST) +Received: from mail-la0-f51.google.com (mail-la0-f51.google.com + [209.85.215.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4BD5A431FAE + for ; Sun, 3 Mar 2013 13:55:16 -0800 (PST) +Received: by mail-la0-f51.google.com with SMTP id fo13so4445290lab.10 + for ; Sun, 03 Mar 2013 13:55:13 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-received:from:to:cc:subject:date:message-id:x-mailer + :x-gm-message-state; + bh=iCEM80rkTgI2CTDznL38dsVWuJWXZudAdBnD84RseB8=; + b=Abs4vPBdCzD9UVDfGcHlIralOAdLZCJZRB/IiPdfihICQlyzx+DJmRMn5P3G381s9I + MZgBO07bTkVXfoh8QG3Em++TuVBbK1I7eGl31iJQzT8auETTJfhoRSMAADYRHmZktOV5 + k3LfU8kxCqemyn9yUm4/4BOYLaBTky9xZPsXS/hN0P4VkTTpZn69i1QtGUaCVQ2Nx9KW + +Lb0woj7OQFE+NtV8uW5mR7BYT8vrZtgXxby3//fU0VXyRWd0I18CkxYHQs3PgG0DqOT + 2N2rZrGxd0T49LvFmGSbWUXA17Q3fqfJEwAIIcl5jlFusu3zZiB2RgUf0knz03sdzqr3 + ewmA== +X-Received: by 10.152.105.38 with SMTP id gj6mr15715754lab.25.1362347713258; + Sun, 03 Mar 2013 13:55:13 -0800 (PST) +Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id mq7sm10733980lab.1.2013.03.03.13.55.11 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 03 Mar 2013 13:55:12 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 0/6] notmuch cli config changes +Date: Sun, 3 Mar 2013 23:55:04 +0200 +Message-Id: +X-Mailer: git-send-email 1.7.10.4 +X-Gm-Message-State: + ALoCoQlaXG+LWgp2XGHw3zWm69v3UM8apPRIIMiV4th118uzQCRlTb8OLZtMT9ASSxppeVZ+ZkNl +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sun, 03 Mar 2013 21:55:20 -0000 + +This is v2 of id:cover.1359495450.git.jani@nikula.org, being mostly just +rebase and commit message amendments, and a slight reordering of a few +patches. The only functional change is to allow notmuch help to be run +without a config file which was broken in v1. + +BR, +Jani. + + +Jani Nikula (6): + cli: abstract subcommand finding into a new function + cli: plug main notmuch command into subcommand machinery + cli: config: keep track of whether the config is newly created + cli: config: make notmuch_config_open() "is new" parameter input only + cli: move config open/close to main() from subcommands + cli: add top level --config=FILE option + + notmuch-client.h | 35 ++++++------ + notmuch-config.c | 73 +++++++++---------------- + notmuch-count.c | 11 ++-- + notmuch-dump.c | 7 +-- + notmuch-new.c | 17 +++--- + notmuch-reply.c | 15 ++---- + notmuch-restore.c | 11 ++-- + notmuch-search.c | 15 ++---- + notmuch-setup.c | 22 ++++---- + notmuch-show.c | 15 ++---- + notmuch-tag.c | 15 ++---- + notmuch.c | 144 +++++++++++++++++++++++++++----------------------- + test/random-corpus.c | 2 +- + 13 files changed, 162 insertions(+), 220 deletions(-) + +-- +1.7.10.4 + -- 2.26.2