Undo tag operation?

2011-07-21 Thread Michael Hudson-Doyle
On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins  wrote:
> On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander  chadok.info> wrote:
> > I wonder if it may be possible to create a journal of all the operations
> > on tags: a file where all the changes are registered, with a timestamp.
> > 
> > Two benefits:
> >  - going through the history to undo mistakes
> >  - being able to build a diff of two journals in order to synchronize db on 
> > multiple
> >hosts
> 
> I'm having trouble finding the thread right now, but wasn't there just
> recently a discussion about just this (i.e. time-stamping tag
> operations)?  Unless there is a big performance hit, I'm starting to
> think this sounds like a good idea.
> 
> Being also to share tags alone would be super cool.

I think the discussion was on IRC, not the mailing list.  It would be
very cool :)

Cheers,
mwh


Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins  wrote:
> Being also to share tags alone would be super cool.

I have no idea what this means, but I do know that tag sharing would be
super cool, and I think time stamping tag operations could help
facilitate it.

jamie.


Undo tag operation?

2011-07-20 Thread Olivier Schwander
Le 20 Jul 2011 09:48, Jameson Graef Rollins a ?crit:
> On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza  wrote:
> > I just inadvertently removed the "todo" tag from all my "todo"-tagged
> > emails (about 60 of them going back several months, so I doubt I can
> > find them all again in my email haystack).  So I have a few questions:
> 
> Hey, Alex.  This won't help you now, and doesn't really answer your
> questions either, but you should periodically back up your tags with the
> "dump" command.  If you had a dumpfile backup of the tags you could
> restore with "restore".  hth (for the future).

I wonder if it may be possible to create a journal of all the operations
on tags: a file where all the changes are registered, with a timestamp.

Two benefits:
 - going through the history to undo mistakes
 - being able to build a diff of two journals in order to synchronize db on 
multiple
   hosts

A drawback may be to slow down the changes on tags, since we add one more write
each time a tag is added or removed.

Olivier


Undo tag operation?

2011-07-20 Thread Alex Ghitza
Dear notmuch folks,

I just inadvertently removed the "todo" tag from all my "todo"-tagged
emails (about 60 of them going back several months, so I doubt I can
find them all again in my email haystack).  So I have a few questions:

1. Is there currently an easy way to undo this?
2. Is there currently a complicated, maybe-won't-work way to undo
this?  I have not touched the emacs instance, nor the notmuch
database, since the incident, if that helps.
3. If the answers to both 1 and 2 are "no" (which is what I expect),
should notmuch itself (or the emacs frontend) have an undo
possibility?

Best,
Alex

--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- http://aghitza.org


Undo tag operation?

2011-07-20 Thread James Vasile
On Wed, 20 Jul 2011 09:48:53 -0700, Jameson Graef Rollins  wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
> On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza  wrote:
> > I just inadvertently removed the "todo" tag from all my "todo"-tagged
> > emails (about 60 of them going back several months, so I doubt I can
> > find them all again in my email haystack).  So I have a few questions:
> 
> Hey, Alex.  This won't help you now, and doesn't really answer your
> questions either, but you should periodically back up your tags with the
> "dump" command.  If you had a dumpfile backup of the tags you could
> restore with "restore".  hth (for the future).

I generally run my notmuch commands through notmuch-retry.  See
http://notmuch.198994.n3.nabble.com/PATCH-Add-shell-script-notmuch-retry-td417192.html

That could be easily amended to log tag commands.  You could then
restore from your most recent dump and replay all the tag commands since
that dump, minus the offending command.

Not a perfect solution, but it would work.  Maybe I'll build it if I
encounter some free time.


Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander  wrote:
> I wonder if it may be possible to create a journal of all the operations
> on tags: a file where all the changes are registered, with a timestamp.
> 
> Two benefits:
>  - going through the history to undo mistakes
>  - being able to build a diff of two journals in order to synchronize db on 
> multiple
>hosts

I'm having trouble finding the thread right now, but wasn't there just
recently a discussion about just this (i.e. time-stamping tag
operations)?  Unless there is a big performance hit, I'm starting to
think this sounds like a good idea.

Being also to share tags alone would be super cool.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza  wrote:
> I just inadvertently removed the "todo" tag from all my "todo"-tagged
> emails (about 60 of them going back several months, so I doubt I can
> find them all again in my email haystack).  So I have a few questions:

Hey, Alex.  This won't help you now, and doesn't really answer your
questions either, but you should periodically back up your tags with the
"dump" command.  If you had a dumpfile backup of the tags you could
restore with "restore".  hth (for the future).

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 



Undo tag operation?

2011-07-20 Thread Alex Ghitza
Dear notmuch folks,

I just inadvertently removed the todo tag from all my todo-tagged
emails (about 60 of them going back several months, so I doubt I can
find them all again in my email haystack).  So I have a few questions:

1. Is there currently an easy way to undo this?
2. Is there currently a complicated, maybe-won't-work way to undo
this?  I have not touched the emacs instance, nor the notmuch
database, since the incident, if that helps.
3. If the answers to both 1 and 2 are no (which is what I expect),
should notmuch itself (or the emacs frontend) have an undo
possibility?

Best,
Alex

--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- http://aghitza.org
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza aghi...@gmail.com wrote:
 I just inadvertently removed the todo tag from all my todo-tagged
 emails (about 60 of them going back several months, so I doubt I can
 find them all again in my email haystack).  So I have a few questions:

Hey, Alex.  This won't help you now, and doesn't really answer your
questions either, but you should periodically back up your tags with the
dump command.  If you had a dumpfile backup of the tags you could
restore with restore.  hth (for the future).

jamie.


pgpxi7ghRuMwm.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread James Vasile
On Wed, 20 Jul 2011 09:48:53 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
 On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza aghi...@gmail.com wrote:
  I just inadvertently removed the todo tag from all my todo-tagged
  emails (about 60 of them going back several months, so I doubt I can
  find them all again in my email haystack).  So I have a few questions:
 
 Hey, Alex.  This won't help you now, and doesn't really answer your
 questions either, but you should periodically back up your tags with the
 dump command.  If you had a dumpfile backup of the tags you could
 restore with restore.  hth (for the future).

I generally run my notmuch commands through notmuch-retry.  See
http://notmuch.198994.n3.nabble.com/PATCH-Add-shell-script-notmuch-retry-td417192.html

That could be easily amended to log tag commands.  You could then
restore from your most recent dump and replay all the tag commands since
that dump, minus the offending command.

Not a perfect solution, but it would work.  Maybe I'll build it if I
encounter some free time.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread Olivier Schwander
Le 20 Jul 2011 09:48, Jameson Graef Rollins a écrit:
 On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza aghi...@gmail.com wrote:
  I just inadvertently removed the todo tag from all my todo-tagged
  emails (about 60 of them going back several months, so I doubt I can
  find them all again in my email haystack).  So I have a few questions:
 
 Hey, Alex.  This won't help you now, and doesn't really answer your
 questions either, but you should periodically back up your tags with the
 dump command.  If you had a dumpfile backup of the tags you could
 restore with restore.  hth (for the future).

I wonder if it may be possible to create a journal of all the operations
on tags: a file where all the changes are registered, with a timestamp.

Two benefits:
 - going through the history to undo mistakes
 - being able to build a diff of two journals in order to synchronize db on 
multiple
   hosts

A drawback may be to slow down the changes on tags, since we add one more write
each time a tag is added or removed.

Olivier
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander 
olivier.schwan...@chadok.info wrote:
 I wonder if it may be possible to create a journal of all the operations
 on tags: a file where all the changes are registered, with a timestamp.
 
 Two benefits:
  - going through the history to undo mistakes
  - being able to build a diff of two journals in order to synchronize db on 
 multiple
hosts

I'm having trouble finding the thread right now, but wasn't there just
recently a discussion about just this (i.e. time-stamping tag
operations)?  Unless there is a big performance hit, I'm starting to
think this sounds like a good idea.

Being also to share tags alone would be super cool.

jamie.


pgpv84STsAxay.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread Michael Hudson-Doyle
On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander 
 olivier.schwan...@chadok.info wrote:
  I wonder if it may be possible to create a journal of all the operations
  on tags: a file where all the changes are registered, with a timestamp.
  
  Two benefits:
   - going through the history to undo mistakes
   - being able to build a diff of two journals in order to synchronize db on 
  multiple
 hosts
 
 I'm having trouble finding the thread right now, but wasn't there just
 recently a discussion about just this (i.e. time-stamping tag
 operations)?  Unless there is a big performance hit, I'm starting to
 think this sounds like a good idea.
 
 Being also to share tags alone would be super cool.

I think the discussion was on IRC, not the mailing list.  It would be
very cool :)

Cheers,
mwh
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: Undo tag operation?

2011-07-20 Thread Jameson Graef Rollins
On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 Being also to share tags alone would be super cool.

I have no idea what this means, but I do know that tag sharing would be
super cool, and I think time stamping tag operations could help
facilitate it.

jamie.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch