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 23599431FC0 for ; Mon, 22 Sep 2014 05:06:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 rNCQ4VMEg8+I for ; Mon, 22 Sep 2014 05:06:12 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 958FD431FB6 for ; Mon, 22 Sep 2014 05:06:12 -0700 (PDT) Received: by mail-lb0-f181.google.com with SMTP id b6so1376176lbj.40 for ; Mon, 22 Sep 2014 05:06:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:references:in-reply-to :user-agent:message-id:mime-version:content-type :content-transfer-encoding; bh=cd5n+/Ij92mJiVkXA5J9/X2JObSlPDrgm8SvIFrAp9I=; b=b6lftlEteFMsvCEOoOiEn54G52q0NeEqamf10jd6PplveyHHspd1yqP4EWIeDlIlmb EYc8MVs0Ijf0PpeLnX1JoSzlYskuCBZ0ARfOLyBOa+1zaU5B1D1Fx1H1mxiuZzpms0Cv peZBLNXssoQJcrjigzx7YRGloQMs7TIXjheCFi1N74tAqpHvXMbweYFJGVCztarkw/4u 5f00novSIFAD10BoDA7RnF9k/C8TWZnESld6s74XOBsGfk7nBXxpDLqP+5MZU2q7whnc 8y2OSJ/5H5czoqt2zVQZxN4rfI8VMBU9gSDuxohdautBkM0DHCRUr0UBsUIxIvSAPCLM /5QA== X-Gm-Message-State: ALoCoQns6dKkKTNk4m8Y8YZeFv31AJp0m50mk1CgYe9rr3aIZ1kU9IzdIUzWE1rczZ3YsVd4lm6p X-Received: by 10.152.42.209 with SMTP id q17mr25606880lal.43.1411387570264; Mon, 22 Sep 2014 05:06:10 -0700 (PDT) Received: from localhost ([128.39.46.106]) by mx.google.com with ESMTPSA id qs6sm1071487lbb.40.2014.09.22.05.06.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Sep 2014 05:06:09 -0700 (PDT) Date: Mon, 22 Sep 2014 12:06:21 +0000 From: Gaute Hope Subject: Re: [PATCH] Add configurable changed tag to messages that have been changed on disk To: notmuch@notmuchmail.org References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com> <87fviiiuzn.fsf@maritornes.cs.unb.ca> <20140801185505.GS13893@mit.edu> <1407313144-astroid-0-vyhth1tcrd-3835@strange> In-Reply-To: <1407313144-astroid-0-vyhth1tcrd-3835@strange> User-Agent: astroid/vb457ef13 (https://github.com/gauteh/astroid) Message-Id: <1411386960-astroid-2-k1e726ut3f-2518@strange> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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: Mon, 22 Sep 2014 12:06:20 -0000 Excerpts from Gaute Hope's message of August 6, 2014 10:29: > Austin Clements wrote on Fri, 01 Aug 2014 14:55:05 -04= 00: >> I have a prototype implementation of message modification times on my >> lastmod-v1 branch at >>=20 >> https://github.com/aclements/notmuch/tree/lastmod-v1 >>=20 >> It builds on my database features series that's currently awaiting >> review [1]. >>=20 >> 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.) >>=20 >> [1] id:1406859003-11561-1-git-send-email-amdragon@mit.edu =20 > this should allow me to do what I wish to accomplish. The message > deletion is still a problem though, I can see two options at the moment: Hi list, While exploring the possibility of syncing maildir/X-keywords with tags I had some thoughts about lastmod and message modification: As briefly discussed on #notmuch, I noticed that it seems that 'notmuch new' does not detect that a message source has been changed, unless the file is also re-named. This means that for instance if the X-Keywords fields have been updated in a message (from GMail with offlineimap, synclabels =3D yes) the lastmod field will remain unchanged, and a source modification will be undetectable to a client program using this value. Would it not make sense that if a message has a more recent mtime than at index time it is re-indexed? Also, for the lastmod branch I would wish for a notmuch_message_touch() method where the lastmod time is updated to the last. As well as a notmuch_database_reindex_message () - possibly defined/documented behaviour for notmuch_database_add_message () when the filename is already added (in which case I would expect notmuch to re-index the message). Doing notmuch_database_remove_message followed by _add_message could risk deleting the entry if this file is the only on-disk-representation. Cheers, Gaute =