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 76E47431FC2 for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 2z7sO9jMDB2b for ; Tue, 24 Nov 2009 14:10:34 -0800 (PST) Received: from mail-fx0-f214.google.com (mail-fx0-f214.google.com [209.85.220.214]) by olra.theworths.org (Postfix) with ESMTP id E5B08431FBC for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by fxm6 with SMTP id 6so7397324fxm.0 for ; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: by 10.102.181.16 with SMTP id d16mr290156muf.120.1259100633217; Tue, 24 Nov 2009 14:10:33 -0800 (PST) Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34]) by mx.google.com with ESMTPS id s10sm20059762mue.21.2009.11.24.14.10.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 14:10:32 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id A5E4D440656; Tue, 24 Nov 2009 23:10:30 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Tue, 24 Nov 2009 23:10:27 +0100 Message-Id: <1259100630-13673-2-git-send-email-jan@ryngle.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259100630-13673-1-git-send-email-jan@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> Subject: [notmuch] [PATCH 1/4] notmuch-new: Remove tag_add_inbox_unread in favor of a generic solution. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Tue, 24 Nov 2009 22:10:34 -0000 Instead of adding 'inbox' and 'unread' tags directly in the code of 'notmuch-new', we can specify a list of tags to be added to newly created messages with a configuration file option or a command line option. That's more flexible, it allows the user to select which tags should be added. Signed-off-by: Jan Janak --- notmuch-new.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index e32b92a..9970407 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -41,13 +41,6 @@ handle_sigint (unused (int sig)) } static void -tag_inbox_and_unread (notmuch_message_t *message) -{ - notmuch_message_add_tag (message, "inbox"); - notmuch_message_add_tag (message, "unread"); -} - -static void add_files_print_progress (add_files_state_t *state) { struct timeval tv_now; @@ -198,7 +191,6 @@ add_files_recursive (notmuch_database_t *notmuch, /* success */ case NOTMUCH_STATUS_SUCCESS: state->added_messages++; - tag_inbox_and_unread (message); break; /* Non-fatal issues (go on to next file) */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: -- 1.6.3.3