database error
[notmuch-archives.git] / bb / c2721189c489d34f80afbb9b68d79e05be7f0c
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 88306431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 02:41:21 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id z47GHsQ30q0T for <notmuch@notmuchmail.org>;\r
16         Fri, 27 Jan 2012 02:41:20 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 50FCB431FAE\r
19         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 02:41:20 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 8917568056; Fri, 27 Jan 2012 12:41:18 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCH 2/2] added support for user-specified directories to\r
25         exclude\r
26 In-Reply-To: <87pqe6ip6f.fsf@nikula.org>\r
27 References: <8762g0sj6f.fsf@praet.org>\r
28         <1327572718-13411-1-git-send-email-tomi.ollila@iki.fi>\r
29         <1327572718-13411-2-git-send-email-tomi.ollila@iki.fi>\r
30         <87pqe6ip6f.fsf@nikula.org>\r
31 User-Agent: Notmuch/0.11+116~g34d80c9 (http://notmuchmail.org) Emacs/23.3.1\r
32         (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Fri, 27 Jan 2012 12:41:18 +0200\r
37 Message-ID: <m2fwf1jult.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=us-ascii\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Fri, 27 Jan 2012 10:41:21 -0000\r
53 \r
54 On Thu, 26 Jan 2012 13:11:36 +0000, Jani Nikula <jani@nikula.org> wrote:\r
55 > On Thu, 26 Jan 2012 12:11:58 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
56 > > A new configuration key 'database.exclude' is used to determine\r
57 > > which directories user wants not to be scanned for new mails.\r
58 > > \r
59 > > ---\r
60 > > \r
61 > > Notes (from 2011-09-13):\r
62 > > \r
63 > > 1) Currently the comments for newly created configuration file are not\r
64 > > updated, so for not this is 'undocumented feature'. Should there be an\r
65 > > empty configuration line as a placeholder ... ?\r
66 > > \r
67 > > 2) Whenever some already existing directory is added to the exclude list\r
68 > > and the parent directory timestamp has not changed, notmuch new will not\r
69 > > notice the directory has gone (as it still is there), user needs to 'touch'\r
70 > > the parent directory before next 'notmuch new' no make notmuch notice.\r
71 > > \r
72 > > 2012-01-26: could notmuch track mtime of the configuration file and if\r
73 > > that changes, ignore mail directory timestamps ?\r
74 > > \r
75 > > 3) count_files() function is not touched. The functionality there has fallen\r
76 > > behind of add_files_recursive (maildir+tmp check and following symlinks).\r
77 > > The question there should it be updated, or attempted to merge with\r
78 > > add_files (as the comment says). count_files() is only called at the beginning\r
79 > > when database is not yet initialised.\r
80 > > ---\r
81 \r
82 [ ... ]\r
83 \r
84 > > +   /* Ignore user-specified directories */\r
85 > > +   for (j = 0; j < state->database_exclude_length; j++)\r
86 > > +       if (strcmp(entry->d_name, state->database_exclude[j]) == 0)\r
87 > > +           break;\r
88 > > +   if (j < state->database_exclude_length)\r
89 > > +       continue;\r
90\r
91 > How about wrapping that in a function you can use here and below?\r
92\r
93 >       if (user_wants_this_excluded (...))\r
94 >               continue;\r
95 \r
96 Good point....\r
97 \r
98 > Please also have a look at id:"87pqecylon.fsf@nikula.org" and the\r
99 > patches Austin posted. "Auto ignore"?\r
100 \r
101 I personally don't mind auto ignore -- I even like the system yells about\r
102 those 3 files I forgot to add to ignore list every now and then (when the\r
103 mtime of the directory those are located changes). This is also something\r
104 different -- I can start keeping my drafts and spam directories alongside\r
105 other mail directories (or folders is you want to use that term).\r
106 \r
107 Thanks for that id: it refers thread starting from id:"ylp7hi23mw8.fsf@tyndall.ie" \r
108 ( http://notmuchmail.org/pipermail/notmuch/2010/003145.html )\r
109 \r
110 and the patch there is somewhat more complete (although old rebase-wise). \r
111 It's easy to combine works together, but more difficult is to choose best \r
112 terminology: database.exclude vs. new.ignore (or something in between or \r
113 totally different). Ideas anyone?\r
114 \r
115 Tomi\r