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 467E1431FD2 for ; Wed, 25 Nov 2009 15:30:29 -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 HoaV+ljooZO9 for ; Wed, 25 Nov 2009 15:30:27 -0800 (PST) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by olra.theworths.org (Postfix) with ESMTP id AE905431FC0 for ; Wed, 25 Nov 2009 15:30:26 -0800 (PST) Received: by mail-ew0-f213.google.com with SMTP id 5so257211ewy.30 for ; Wed, 25 Nov 2009 15:30:26 -0800 (PST) Received: by 10.213.107.16 with SMTP id z16mr3251432ebo.47.1259191826352; Wed, 25 Nov 2009 15:30:26 -0800 (PST) Received: from x61s.janakj ([213.192.30.141]) by mx.google.com with ESMTPS id 28sm334054eyg.36.2009.11.25.15.30.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 15:30:24 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id 994C5440655; Thu, 26 Nov 2009 00:30:16 +0100 (CET) From: Jan Janak To: notmuch@notmuchmail.org Date: Thu, 26 Nov 2009 00:30:12 +0100 Message-Id: <1259191816-1982-1-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/5] 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: Wed, 25 Nov 2009 23:30:29 -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