From: Austin Clements Date: Sat, 2 Aug 2014 00:49:12 +0000 (+2000) Subject: Re: [PATCH] Add configurable changed tag to messages that have been changed on disk X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c1b4e9170030429e8a5c95c23f0a1e69dd02e34;p=notmuch-archives.git Re: [PATCH] Add configurable changed tag to messages that have been changed on disk --- diff --git a/05/e0854571df4311b478e0c6ffae9f9ebb11e950 b/05/e0854571df4311b478e0c6ffae9f9ebb11e950 new file mode 100644 index 000000000..c52722f4f --- /dev/null +++ b/05/e0854571df4311b478e0c6ffae9f9ebb11e950 @@ -0,0 +1,155 @@ +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 15B94431FB6 + for ; Fri, 1 Aug 2014 17:49:26 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 u2s+uIJU9Qm0 for ; + Fri, 1 Aug 2014 17:49:18 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4D40A431FAE + for ; Fri, 1 Aug 2014 17:49:18 -0700 (PDT) +X-AuditID: 12074425-f79766d000006da8-c8-53dc358d6204 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id F5.3B.28072.D853CD35; Fri, 1 Aug 2014 20:49:17 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s720nFnM030665; + Fri, 1 Aug 2014 20:49:16 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s720nD9d007496 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Fri, 1 Aug 2014 20:49:15 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1XDNVY-0000LK-Ug; Fri, 01 Aug 2014 20:49:13 -0400 +Date: Fri, 1 Aug 2014 20:49:12 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: Re: [PATCH] Add configurable changed tag to messages that have been + changed on disk +Message-ID: <20140802004912.GT13893@mit.edu> +References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com> + <87fviiiuzn.fsf@maritornes.cs.unb.ca> + + <20140801185505.GS13893@mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +In-Reply-To: <20140801185505.GS13893@mit.edu> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFlrHKsWRmVeSWpSXmKPExsUixG6nrttreifYYNtmVYsbrd2MFk2fL7Fa + XL85k9liX7+/A4vHj3/NbB7PVt1i9pgyay67x5ZD75kDWKK4bFJSczLLUov07RK4Mha8P8Fe + cEOq4t4B9wbGu8JdjJwcEgImEu1v1zBD2GISF+6tZ+ti5OIQEpjNJDHnahMLhLOBUWLe0a1M + IFVCAqeYJCYfLoNILGGUeHv9PQtIgkVAReL5meXsIDabgIbEtv3LGUFsEQFpiZ13Z7OC2MwC + JRIP1hwCs4UF4iSmXd4BNpRXQEei5fxFdoihlxkl3nWtYoZICEqcnPmEBaJZR2Ln1jtA93EA + 2dISy/9xQITlJZq3zgYr5xTQlfjY9A6sXBToniknt7FNYBSehWTSLCSTZiFMmoVk0gJGllWM + sim5Vbq5iZk5xanJusXJiXl5qUW6Fnq5mSV6qSmlmxjB0eKiuoNxwiGlQ4wCHIxKPLw3dt8O + FmJNLCuuzD3EKMnBpCTKO0vnTrAQX1J+SmVGYnFGfFFpTmrxIUYJDmYlEV4nkBxvSmJlVWpR + PkxKmoNFSZz3rbVVsJBAemJJanZqakFqEUxWhoNDSYK3wwSoUbAoNT21Ii0zpwQhzcTBCTKc + B2h4K0gNb3FBYm5xZjpE/hSjopQ4bxNIQgAkkVGaB9cLS2avGMWBXhHmlQGp4gEmQrjuV0CD + mYAG1xjeBhlckoiQkmpgXBkcpXjx4x3d6AUS7p+XKTOuM174snxxF5+E6p/tWcW1jq4Wh2Y6 + mv91v8O3lUv6UeKHFbtvPdU/vkj6361XTiK3RWrTXvKcDnZceUul3PKalnpNy4FpzVz7QnuT + 5WpWem7e7PPtXdCty/Ot9y45Z592fdP6P83rvk2WzJ4SmL99m8uMU3Eba5RYijMSDbWYi4oT + AZF5B/pBAwAA +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: Sat, 02 Aug 2014 00:49:26 -0000 + +I should add that this code shouldn't be considered stable yet. The +on-disk format may (and probably will) change, so don't try it on your +main notmuch database. + +Quoth myself on Aug 01 at 2:55 pm: +> I have a prototype implementation of message modification times on my +> lastmod-v1 branch at +> +> https://github.com/aclements/notmuch/tree/lastmod-v1 +> +> It builds on my database features series that's currently awaiting +> review [1]. +> +> The series uses a monotonic revision number, rather than wall-clock +> time, for reasons related to Xapian's concurrent control and detailed +> in the main commit's commit message. The implementation isn't quite +> useful from the CLI yet because I haven't added any way to query the +> database's current revision number. (I'm still thinking about how I +> want to do this, since search/show don't have a good way to deliver +> "additional" information right now. I might just add the last +> modification for each individual message/max of all messages in a +> thread, similar to what Thomas Jost's patch did long ago.) +> +> [1] id:1406859003-11561-1-git-send-email-amdragon@mit.edu +> +> Quoth Gaute Hope on Jul 28 at 4:37 pm: +> > On Thu, Jul 3, 2014 at 12:42 PM, David Bremner <[1]david@tethera.net> +> > wrote: +> > +> > Gaute Hope <[2]eg@gaute.vetsj.com> writes: +> > +> > > When one of the source files for a message is changed on disk, +> > renamed, +> > > deleted or a new source file is added. A configurable changed tag is +> > > is added. The tag can be configured under the option 'changed_tags' in +> > > the [new] section, the default is none. Tests have been updated to +> > > accept the new config option. +> > > +> > > notmuch-setup now asks for a changed tag after the new tags question. +> > > +> > > This could be useful for for example 'afew' to detect remote changes +> > in +> > > IMAP folders and update the FolderNameFilter to also add tags or +> > remove +> > > tags when a _existing_ message has been added to or removed from a +> > > maildir. +> > +> > The discussion on this proposal seems to have died out without reaching +> > a conclusion. David M expressed a strong preference for some kind of +> > modification time field in the database.  Gaute agreed with some caveats +> > that such an approach could solve his problems as well. On the other +> > hand, nobody seems to be actually working on such an approach at the +> > moment.  Gaute and or David do you have any interest in revisiting the +> > series [3]id:1323796305-28789-1-git-send-email-schnouki@schnouki.net and +> > seeing if it can be reworked into mergeable shape? I suspect in +> > particular something needs to be added with respect to message deletion +> > Thomas, are you still running some variant of these patches? +> > d +> > +> > I am afraid I don't have the chance to put in any consistent effort on +> > this at the moment. +> > +> > I agree, message deletion needs to be solved somehow. +> > Regards, Gaute + +-- +Austin Clements MIT/CSAIL/SB '06/PhD '14 +amdragon@mit.edu http://web.mit.edu/amdragon + Somewhere in the dream we call reality you will find me, + searching for the reality we call dreams.