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 71E67429E25 for ; Tue, 13 Sep 2011 14:32:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 DISrGHAwF3lp for ; Tue, 13 Sep 2011 14:32:10 -0700 (PDT) Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8A413431FB6 for ; Tue, 13 Sep 2011 14:32:10 -0700 (PDT) Received: from localhost6.localdomain6 (entry3.nixu.fi [193.209.237.21]) by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p8DLW8G1022252 for ; Wed, 14 Sep 2011 00:32:08 +0300 From: tomi.ollila@iki.fi To: notmuch@notmuchmail.org Subject: [PATCH 0/3] Configuration file option to exclude files/directories Date: Wed, 14 Sep 2011 00:32:01 +0300 Message-Id: <1315949524-4948-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.7.3.4 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: Tue, 13 Sep 2011 21:32:11 -0000 This patch set adds a configuration option 'database.exclude'; a list of files/directories to be excluded when doing 'notmuch new' operation. Notes: 1) Currently the comments for newly created configuration file are not updated, so for not this is 'undocumented feature'. Should there be an empty configuration line as a placeholder ... ? 2) Whenever some already existing directory is added to the exclude list and the parent directory timestamp has not changed, notmuch new will not notice the directory has gone (as it still is there), user needs to 'touch' the parent directory before next 'notmuch new' no make notmuch notice. 3) count_files() function is not touched. The functionality there has fallen behind of add_files_recursive (maildir+tmp check and following symlinks). The question there should it be updated, or attempted to merge with add_files (as the comment says). count_files() is only called at the beginning when database is not yet initialised. Tomi notmuch-client.h | 3 ++ notmuch-config.c | 89 +++++++++++++++++++++++++++++++++++++++-------------- notmuch-new.c | 22 ++++++++++++- 3 files changed, 88 insertions(+), 26 deletions(-)