--- /dev/null
+Return-Path: <eg@gaute.vetsj.com>\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 14776431FC0\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 00:25:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 2DqV4pF7ed4b for <notmuch@notmuchmail.org>;\r
+ Wed, 23 Apr 2014 00:25:51 -0700 (PDT)\r
+Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com\r
+ [209.85.217.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id BEBC8431FBF\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 00:25:50 -0700 (PDT)\r
+Received: by mail-lb0-f176.google.com with SMTP id 10so433444lbg.21\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 00:25:48 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:content-type:from:to:subject:references\r
+ :in-reply-to:date:message-id:user-agent:content-transfer-encoding;\r
+ bh=rl7IkXb7kNG9YxdvTR4GX3Gq5yQ5B3EEkLVU7heUdjI=;\r
+ b=enHgYlaMQj9aqi5dzi6P9cOhGKxd+lqAbCSX704GG0rzAlwhp41WIqTZ531U8nn0IU\r
+ xhXUvn551Pl9ua8A9lfPHtYwi1NNTTNg1SMGGv269Per0FZnxdipO5o6X4p4QOdG+190\r
+ BtS9/2f26JVDw7+MPFL+fn3GqClCWqMSnZgoPnU38x4jFStsgNgudtffatfyHMJ/vQ15\r
+ E+KfAjuhhTn/QzgxY2N+rlhllkl3cDc4yqc3JDpmH3A5pjPS/jTtEnpygbiHQhYRLcZU\r
+ EJt+H7D95aqo/wKJRDR3uINUWu1wxRTYQcKfBF9AxQyTCRTMyEVsGsoZiq7mLBdogztU\r
+ H0+g==\r
+X-Gm-Message-State:\r
+ ALoCoQl7NZ6hFFRtufMFCLIMs+3daCWatz0GiIxgB6Xvi8kkacyA7jYMmpkG0+3pKKYzG5giiytY\r
+X-Received: by 10.112.95.166 with SMTP id dl6mr1168865lbb.19.1398237946930;\r
+ Wed, 23 Apr 2014 00:25:46 -0700 (PDT)\r
+Received: from localhost ([128.39.46.106])\r
+ by mx.google.com with ESMTPSA id fa8sm176087lbc.18.2014.04.23.00.25.45\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Wed, 23 Apr 2014 00:25:46 -0700 (PDT)\r
+Content-Type: text/plain; charset=UTF-8\r
+From: Gaute Hope <eg@gaute.vetsj.com>\r
+To: David Bremner <david@tethera.net>, notmuch <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] Add configurable changed tag to messages that have been\r
+ changed on disk\r
+References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com>\r
+ <87wqf2gqig.fsf@ta.scs.stanford.edu> <1397140962-sup-6514@qwerzila>\r
+ <87wqexnqvb.fsf@ta.scs.stanford.edu> <1397163239-sup-5101@qwerzila>\r
+ <87d2g9ja0h.fsf@maritornes.cs.unb.ca>\r
+In-reply-to: <87d2g9ja0h.fsf@maritornes.cs.unb.ca>\r
+Date: Wed, 23 Apr 2014 09:24:40 +0200\r
+Message-Id: <1398237865-sup-624@qwerzila>\r
+User-Agent: Sup/git\r
+Content-Transfer-Encoding: 8bit\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: Wed, 23 Apr 2014 07:25:55 -0000\r
+\r
+Excerpts from David Bremner's message of 2014-04-23 00:05:02 +0200:\r
+> Gaute Hope <eg@gaute.vetsj.com> writes:\r
+>\r
+> >\r
+> > I am talking about syncing tags to a maildir _folder_, not flags. It\r
+> > could be implemented as maildir.synchronize is now, but it would be a\r
+> > larger feature which could work in a lot of different ways.\r
+> >\r
+>\r
+> So to try and clarify the use case, this could be used to add a tag\r
+> "changed" to each message-id that had one or more files\r
+> moved/added/deleted on disk. You would then retag that message using\r
+> something like the output of notmuch search --output=files so that a set\r
+> of tags corresponds to a set of folders containing the message. Is this\r
+> correct? I guess the proposed ctime information could be used for this\r
+> as well, if it also tracked those non-tag related changes. I guess this\r
+> would make it worse for David M's purposes (although presumeably still\r
+> better than nothing).\r
+\r
+Yes, I would not know what has changed, but I would know which messages\r
+to check for changes and then decide whether and how to re-tag it. For\r
+the opposite case, when a message has been changed locally by a client\r
+and I would want to decide whether I need to copy/move/delete the\r
+message based on the tags a tag could be added by the application.\r
+\r
+In response to the issue of cost of this operation: I don't think it\r
+will differ much from how 'new' is handled at the moment.\r
+\r
+One extension perhaps worth considering is to have ctimes on each source\r
+file as well as the db entry, but it might be overkill.\r
+\r
+I still strongly favor an intenal db-tick over ctime - or store both,\r
+the application iterating over the 'changed' tag (or messages changed\r
+since last time) would have to store the time of last check as well. A\r
+whole bunch of stuff could result in this time being inaccurate,\r
+especially if these run on different machines.\r
+\r
+A db-tick or a _good_ ctime solution can as far as I can see solve both\r
+David M's (correct me if I am wrong) and my purposes, as well as\r
+probably have more use cases in the future. It would even be an\r
+interesting direct search: show me everything that changed lately,\r
+sorted.\r
+\r
+As noted before, my use case could also be solved by implementing it in\r
+a similar fashion as sync_flags are now, is it possible to hook into\r
+this stage in some way? So that it does not need to be included in\r
+core notmuch.\r
+\r
+- gaute\r