Re: [PATCH 2/2] added support for user-specified directories to exclude
authorTomi Ollila <tomi.ollila@iki.fi>
Fri, 27 Jan 2012 10:41:18 +0000 (12:41 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:24 +0000 (09:43 -0800)
bb/c2721189c489d34f80afbb9b68d79e05be7f0c [new file with mode: 0644]

diff --git a/bb/c2721189c489d34f80afbb9b68d79e05be7f0c b/bb/c2721189c489d34f80afbb9b68d79e05be7f0c
new file mode 100644 (file)
index 0000000..88667be
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 88306431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 02:41:21 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id z47GHsQ30q0T for <notmuch@notmuchmail.org>;\r
+       Fri, 27 Jan 2012 02:41:20 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+       by olra.theworths.org (Postfix) with ESMTP id 50FCB431FAE\r
+       for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 02:41:20 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 8917568056; Fri, 27 Jan 2012 12:41:18 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] added support for user-specified directories to\r
+       exclude\r
+In-Reply-To: <87pqe6ip6f.fsf@nikula.org>\r
+References: <8762g0sj6f.fsf@praet.org>\r
+       <1327572718-13411-1-git-send-email-tomi.ollila@iki.fi>\r
+       <1327572718-13411-2-git-send-email-tomi.ollila@iki.fi>\r
+       <87pqe6ip6f.fsf@nikula.org>\r
+User-Agent: Notmuch/0.11+116~g34d80c9 (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Fri, 27 Jan 2012 12:41:18 +0200\r
+Message-ID: <m2fwf1jult.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 27 Jan 2012 10:41:21 -0000\r
+\r
+On Thu, 26 Jan 2012 13:11:36 +0000, Jani Nikula <jani@nikula.org> wrote:\r
+> On Thu, 26 Jan 2012 12:11:58 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> > A new configuration key 'database.exclude' is used to determine\r
+> > which directories user wants not to be scanned for new mails.\r
+> > \r
+> > ---\r
+> > \r
+> > Notes (from 2011-09-13):\r
+> > \r
+> > 1) Currently the comments for newly created configuration file are not\r
+> > updated, so for not this is 'undocumented feature'. Should there be an\r
+> > empty configuration line as a placeholder ... ?\r
+> > \r
+> > 2) Whenever some already existing directory is added to the exclude list\r
+> > and the parent directory timestamp has not changed, notmuch new will not\r
+> > notice the directory has gone (as it still is there), user needs to 'touch'\r
+> > the parent directory before next 'notmuch new' no make notmuch notice.\r
+> > \r
+> > 2012-01-26: could notmuch track mtime of the configuration file and if\r
+> > that changes, ignore mail directory timestamps ?\r
+> > \r
+> > 3) count_files() function is not touched. The functionality there has fallen\r
+> > behind of add_files_recursive (maildir+tmp check and following symlinks).\r
+> > The question there should it be updated, or attempted to merge with\r
+> > add_files (as the comment says). count_files() is only called at the beginning\r
+> > when database is not yet initialised.\r
+> > ---\r
+\r
+[ ... ]\r
+\r
+> > +  /* Ignore user-specified directories */\r
+> > +  for (j = 0; j < state->database_exclude_length; j++)\r
+> > +      if (strcmp(entry->d_name, state->database_exclude[j]) == 0)\r
+> > +          break;\r
+> > +  if (j < state->database_exclude_length)\r
+> > +      continue;\r
+> \r
+> How about wrapping that in a function you can use here and below?\r
+> \r
+>      if (user_wants_this_excluded (...))\r
+>              continue;\r
+\r
+Good point....\r
+\r
+> Please also have a look at id:"87pqecylon.fsf@nikula.org" and the\r
+> patches Austin posted. "Auto ignore"?\r
+\r
+I personally don't mind auto ignore -- I even like the system yells about\r
+those 3 files I forgot to add to ignore list every now and then (when the\r
+mtime of the directory those are located changes). This is also something\r
+different -- I can start keeping my drafts and spam directories alongside\r
+other mail directories (or folders is you want to use that term).\r
+\r
+Thanks for that id: it refers thread starting from id:"ylp7hi23mw8.fsf@tyndall.ie" \r
+( http://notmuchmail.org/pipermail/notmuch/2010/003145.html )\r
+\r
+and the patch there is somewhat more complete (although old rebase-wise). \r
+It's easy to combine works together, but more difficult is to choose best \r
+terminology: database.exclude vs. new.ignore (or something in between or \r
+totally different). Ideas anyone?\r
+\r
+Tomi\r