unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: David Bremner <david@tethera.net>, notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH] Add configurable changed tag to messages that have been changed on disk
Date: Wed, 23 Apr 2014 09:24:40 +0200	[thread overview]
Message-ID: <1398237865-sup-624@qwerzila> (raw)
In-Reply-To: <87d2g9ja0h.fsf@maritornes.cs.unb.ca>

Excerpts from David Bremner's message of 2014-04-23 00:05:02 +0200:
> Gaute Hope <eg@gaute.vetsj.com> writes:
>
> >
> > I am talking about syncing tags to a maildir _folder_, not flags. It
> > could be implemented as maildir.synchronize is now, but it would be a
> > larger feature which could work in a lot of different ways.
> >
>
> So to try and clarify the use case, this could be used to add a tag
> "changed" to each message-id that had one or more files
> moved/added/deleted on disk.  You would then retag that message using
> something like the output of notmuch search --output=files so that a set
> of tags corresponds to a set of folders containing the message. Is this
> correct?   I guess the proposed ctime information could be used for this
> as well, if it also tracked those non-tag related changes. I guess this
> would make it worse for David M's purposes (although presumeably still
> better than nothing).

Yes, I would not know what has changed, but I would know which messages
to check for changes and then decide whether and how to re-tag it. For
the opposite case, when a message has been changed locally by a client
and I would want to decide whether I need to copy/move/delete the
message based on the tags a tag could be added by the application.

In response to the issue of cost of this operation: I don't think it
will differ much from how 'new' is handled at the moment.

One extension perhaps worth considering is to have ctimes on each source
file as well as the db entry, but it might be overkill.

I still strongly favor an intenal db-tick over ctime - or store both,
the application iterating over the 'changed' tag (or messages changed
since last time) would have to store the time of last check as well. A
whole bunch of stuff could result in this time being inaccurate,
especially if these run on different machines.

A db-tick or a _good_ ctime solution can as far as I can see solve both
David M's (correct me if I am wrong) and my purposes, as well as
probably have more use cases in the future. It would even be an
interesting direct search: show me everything that changed lately,
sorted.

As noted before, my use case could also be solved by implementing it in
a similar fashion as sync_flags are now, is it possible to hook into
this stage in some way? So that it does not need to be included in
core notmuch.

- gaute

  reply	other threads:[~2014-04-23  7:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-06 16:11 [PATCH] Add configurable changed tag to messages that have been changed on disk Gaute Hope
2014-04-06 20:19 ` David Mazieres
2014-04-10 14:43   ` Gaute Hope
2014-04-10 15:31     ` dm-list-email-notmuch
2014-04-10 21:10       ` Gaute Hope
2014-04-22 22:05         ` David Bremner
2014-04-23  7:24           ` Gaute Hope [this message]
2014-04-23  9:00             ` David Mazieres
2014-04-23 11:53               ` Gaute Hope
2014-04-23 20:59               ` Austin Clements
2014-04-23 22:31                 ` dm-list-email-notmuch
2014-04-11 11:08       ` David Bremner
2014-04-11 16:03         ` dm-list-email-notmuch
2014-04-12 15:58           ` David Bremner
2014-05-03 14:01             ` Jani Nikula
2014-04-23 21:28   ` Austin Clements
2014-04-23 22:40     ` David Mazieres expires 2014-07-22 PDT
2014-07-03 10:42 ` David Bremner
2014-07-28 14:37   ` Gaute Hope
2014-08-01 18:55     ` Austin Clements
2014-08-02  0:49       ` Austin Clements
2014-08-06  9:02       ` Gaute Hope
2014-08-06 17:06         ` Austin Clements
     [not found]       ` <1407313144-astroid-0-vyhth1tcrd-3835@strange>
2014-09-22 12:06         ` Gaute Hope
2014-09-22 15:33           ` Tomi Ollila
2014-09-22 15:40           ` Austin Clements
2014-09-23  6:57             ` Gaute Hope

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398237865-sup-624@qwerzila \
    --to=eg@gaute.vetsj.com \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).