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 9F3D5431FBD for ; Wed, 6 Aug 2014 02:02:15 -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 oK675Mj8U+rj for ; Wed, 6 Aug 2014 02:02:09 -0700 (PDT) Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 09051431FAE for ; Wed, 6 Aug 2014 02:02:08 -0700 (PDT) Received: by mail-qg0-f49.google.com with SMTP id j107so2283507qga.36 for ; Wed, 06 Aug 2014 02:02:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=EFNtoY+OKho8W9JL4obKen8R0ro//jQOXhbY8Gehqr8=; b=Vae+bdvK1FhoRFc+fLVmoOa747UkpaxHY4A22noKCye/Ign2CBaOapvSXMde/w4dPR /sXohlFJuq41bggd+tPs6yqizsYJIF4QMfEbVEnjT8MTAb4O2SkRuIprCIy25SKpg29r QbK+l2Z7Pg7RLm/xEZp53rG+mdKMzMKtQGMmzvh8LF0R+2/abcW20LnNbrSgD/7tYzIN iioZc5nZRP3z2iJJq8UliS5SRZ++rRgsdBYgZdYF7UnGnjHkWmUf04yi9mlzs9Ynddnz VhgGSBqLJyRVds5I5+QDvkwYk4cXkQqPon5t8febClioc064JnVStc9x8RncGdTXIBUK U/pg== X-Gm-Message-State: ALoCoQkamNKklu4w5NNfkxtCKnEn9rg1OJJx8T0V0pBQXpgaaguX6PNkeqkrbae9Zcrj3LXz9tzS MIME-Version: 1.0 X-Received: by 10.140.102.142 with SMTP id w14mr1218313qge.101.1407315726288; Wed, 06 Aug 2014 02:02:06 -0700 (PDT) Received: by 10.140.86.148 with HTTP; Wed, 6 Aug 2014 02:02:06 -0700 (PDT) In-Reply-To: <20140801185505.GS13893@mit.edu> References: <1396800683-9164-1-git-send-email-eg@gaute.vetsj.com> <87fviiiuzn.fsf@maritornes.cs.unb.ca> <20140801185505.GS13893@mit.edu> Date: Wed, 6 Aug 2014 11:02:06 +0200 Message-ID: Subject: Re: [PATCH] Add configurable changed tag to messages that have been changed on disk From: Gaute Hope To: Austin Clements Content-Type: text/plain; charset=UTF-8 Cc: notmuch 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: Wed, 06 Aug 2014 09:02:15 -0000 On Fri, Aug 1, 2014 at 8:55 PM, Austin Clements wrote: > 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 Hi, 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: a) output during notmuch new to a hook or a list somewhere deleted files. if list: notmuch will not handle this list, only append to it and the user must purge it when it is safe to do so. if hook: for my purposes I would just create a hook appending to the list. as a minimum I think thread_id, message_id and revision number should be included. b) maintain a full list of deleted / dead messages. a user initiated purge can clean this from the database. a tag could be used for this, so that clients can ignore unlinked/deleted/dead messages. this differs from a 'deleted' message (IMAP/Maildir context) that has not yet been expunged so there is confusion to be avoided. a garbage collection function and interface must also be set up, but this one is probably simple. in most cases I think a) would be sufficient, and probably much easier to do. it might be slow in cases where large amounts of messages have been deleted, but this is seldom the case for me at least. cheers, gaute