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 410D8431FC2 for ; Tue, 23 Feb 2010 18:28:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.377 X-Spam-Level: X-Spam-Status: No, score=-1.377 tagged_above=-999 required=5 tests=[AWL=-0.637, BAYES_20=-0.74] autolearn=ham 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 eQas6irC9CAs for ; Tue, 23 Feb 2010 18:28:23 -0800 (PST) X-Greylist: delayed 301 seconds by postgrey-1.32 at olra; Tue, 23 Feb 2010 18:28:18 PST Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id 78B19431FCF for ; Tue, 23 Feb 2010 18:28:18 -0800 (PST) X-AuditID: 12074422-b7c71ae000000a1a-96-4b848d934667 Received: from mailhub-auth-2.mit.edu (MAILHUB-AUTH-2.MIT.EDU [18.7.62.36]) by dmz-mailsec-scanner-5.mit.edu (Symantec Brightmail Gateway) with SMTP id C4.07.02586.39D848B4; Tue, 23 Feb 2010 21:23:15 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id o1O2NF3u008878; Tue, 23 Feb 2010 21:23:15 -0500 Received: from localhost.localdomain (ET-NINETY-THREE.MIT.EDU [18.208.1.93]) (authenticated bits=0) (User authenticated as davidben@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o1O2NTiv021532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 23 Feb 2010 21:23:35 -0500 (EST) From: David Benjamin To: notmuch@notmuchmail.org Date: Tue, 23 Feb 2010 21:23:03 -0500 Message-Id: <1266978183-19698-5-git-send-email-davidben@mit.edu> X-Mailer: git-send-email 1.7.0.18.g39b3 In-Reply-To: <1266978183-19698-1-git-send-email-davidben@mit.edu> References: <1266978183-19698-1-git-send-email-davidben@mit.edu> X-Brightmail-Tracker: AAAAAA== Subject: [notmuch] [PATCH 4/4] Prompt for database location in notmuch setup 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: Wed, 24 Feb 2010 02:28:24 -0000 Signed-off-by: David Benjamin --- notmuch-setup.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/notmuch-setup.c b/notmuch-setup.c index 622bbaa..e3c8465 100644 --- a/notmuch-setup.c +++ b/notmuch-setup.c @@ -159,6 +159,15 @@ notmuch_setup_command (unused (void *ctx), notmuch_config_set_database_path (config, absolute_path); } + prompt ("Location for notmuch database [%s]: ", + notmuch_config_get_database_notmuch_path (config)); + if (strlen (response)) { + const char *absolute_path; + + absolute_path = make_path_absolute (ctx, response); + notmuch_config_set_database_notmuch_path (config, absolute_path); + } + if (! notmuch_config_save (config)) { if (is_new) welcome_message_post_setup (); -- 1.7.0.18.g39b3