[PATCH 17/27] CLI/notmuch: switch notmuch_command to notmuch_config_get

Subject: [PATCH 17/27] CLI/notmuch: switch notmuch_command to notmuch_config_get

Date: Thu, 4 Mar 2021 09:01:29 -0400

To: notmuch@notmuchmail.org

Cc: David Bremner

From: David Bremner


The goal at this point is to remove the dependence on
notmuch_config_get_* without breaking any existing functionality. This
is a step towards removing notmuch_config_get_* in a future commit.
---
 notmuch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/notmuch.c b/notmuch.c
index 6ff6473e..093af0a5 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -380,7 +380,7 @@ notmuch_command (notmuch_config_t *config,
 
     /* Notmuch is already configured, but is there a database? */
     db_path = talloc_asprintf (config, "%s/%s",
-			       notmuch_config_get_database_path (config),
+			       notmuch_config_get (notmuch, NOTMUCH_CONFIG_DATABASE_PATH),
 			       ".notmuch");
     if (stat (db_path, &st)) {
 	if (errno != ENOENT) {
@@ -411,8 +411,8 @@ notmuch_command (notmuch_config_t *config,
 	    "or any other interface described at https://notmuchmail.org\n\n"
 	    "And don't forget to run \"notmuch new\" whenever new mail arrives.\n\n"
 	    "Have fun, and may your inbox never have much mail.\n\n",
-	    notmuch_config_get_user_name (config),
-	    notmuch_config_get_user_primary_email (config));
+	    notmuch_config_get (notmuch, NOTMUCH_CONFIG_USER_NAME),
+	    notmuch_config_get (notmuch, NOTMUCH_CONFIG_PRIMARY_EMAIL));
 
     return EXIT_SUCCESS;
 }
-- 
2.30.1
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: