--- /dev/null
+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 7D2A3431FC0\r
+ for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 08:34:12 -0700 (PDT)\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 LsAXFcImE5Cr for <notmuch@notmuchmail.org>;\r
+ Mon, 22 Sep 2014 08:34:06 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 5202D431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 22 Sep 2014 08:34:06 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 3AD37100033;\r
+ Mon, 22 Sep 2014 18:33:52 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Gaute Hope <eg@gaute.vetsj.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] Add configurable changed tag to messages that have\r
+ been changed on disk\r
+In-Reply-To: <1411386960-astroid-2-k1e726ut3f-2518@strange>\r
+References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com>\r
+ <87fviiiuzn.fsf@maritornes.cs.unb.ca>\r
+ <CABKe4Mv6p77i5dBT9BV41hxmtrE4UPLR3NjZfpLuZDoE1KWYyA@mail.gmail.com>\r
+ <20140801185505.GS13893@mit.edu>\r
+ <1407313144-astroid-0-vyhth1tcrd-3835@strange>\r
+ <1411386960-astroid-2-k1e726ut3f-2518@strange>\r
+User-Agent: Notmuch/0.18.1+97~g6c845ef (http://notmuchmail.org) Emacs/24.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: Mon, 22 Sep 2014 18:33:51 +0300\r
+Message-ID: <m2a95rpt40.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Mon, 22 Sep 2014 15:34:12 -0000\r
+\r
+On Mon, Sep 22 2014, Gaute Hope <eg@gaute.vetsj.com> wrote:\r
+\r
+> Excerpts from Gaute Hope's message of August 6, 2014 10:29:\r
+>> Austin Clements <amdragon@MIT.EDU> wrote on Fri, 01 Aug 2014 14:55:05 -0400:\r
+>>> I have a prototype implementation of message modification times on my\r
+>>> lastmod-v1 branch at\r
+>>> \r
+>>> https://github.com/aclements/notmuch/tree/lastmod-v1\r
+>>> \r
+>>> It builds on my database features series that's currently awaiting\r
+>>> review [1].\r
+>>> \r
+>>> The series uses a monotonic revision number, rather than wall-clock\r
+>>> time, for reasons related to Xapian's concurrent control and detailed\r
+>>> in the main commit's commit message. The implementation isn't quite\r
+>>> useful from the CLI yet because I haven't added any way to query the\r
+>>> database's current revision number. (I'm still thinking about how I\r
+>>> want to do this, since search/show don't have a good way to deliver\r
+>>> "additional" information right now. I might just add the last\r
+>>> modification for each individual message/max of all messages in a\r
+>>> thread, similar to what Thomas Jost's patch did long ago.)\r
+>>> \r
+>>> [1] id:1406859003-11561-1-git-send-email-amdragon@mit.edu\r
+> \r
+>> this should allow me to do what I wish to accomplish. The message\r
+>> deletion is still a problem though, I can see two options at the moment:\r
+>\r
+> Hi list,\r
+>\r
+> While exploring the possibility of syncing maildir/X-keywords with tags\r
+> I had some thoughts about lastmod and message modification:\r
+>\r
+> As briefly discussed on #notmuch, I noticed that it seems that 'notmuch\r
+> new' does not detect that a message source has been changed, unless the\r
+> file is also re-named.\r
+>\r
+> This means that for instance if the X-Keywords fields have been updated\r
+> in a message (from GMail with offlineimap, synclabels = yes) the lastmod\r
+> field will remain unchanged, and a source modification will be\r
+> undetectable to a client program using this value.\r
+>\r
+> Would it not make sense that if a message has a more recent mtime than\r
+> at index time it is re-indexed?\r
+\r
+That would require notmuch to scan the contents of a directory for changed\r
+mtimes of the files -- now notmuch skips looking for the files unless\r
+directory mtime has changed. Directory mtime changes when files are\r
+added/deleted/renamed (as that is what directory needs to know) -- file\r
+mtime change are stored in file information and therefore change there does\r
+not probagate to parent directory (and, if such happened, to it's parent\r
+and so on...)\r
+\r
+That would mean the scanning would be slower than it is now.\r
+\r
+Tomi\r
+\r
+>\r
+> Also, for the lastmod branch I would wish for a notmuch_message_touch()\r
+> method where the lastmod time is updated to the last. As well as a\r
+> notmuch_database_reindex_message () - possibly defined/documented\r
+> behaviour for notmuch_database_add_message () when the filename is\r
+> already added (in which case I would expect notmuch to re-index the\r
+> message).\r
+>\r
+> Doing notmuch_database_remove_message followed by _add_message could\r
+> risk deleting the entry if this file is the only on-disk-representation.\r
+>\r
+> Cheers, Gaute\r