unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Undo tag operation?
@ 2011-07-20 14:17 Alex Ghitza
  2011-07-20 16:48 ` Jameson Graef Rollins
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Ghitza @ 2011-07-20 14:17 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 14:17 Undo tag operation? Alex Ghitza
@ 2011-07-20 16:48 ` Jameson Graef Rollins
  2011-07-20 19:51   ` James Vasile
  2011-07-20 20:02   ` Olivier Schwander
  0 siblings, 2 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2011-07-20 16:48 UTC (permalink / raw)
  To: Alex Ghitza, notmuch

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza <aghitza@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.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 16:48 ` Jameson Graef Rollins
@ 2011-07-20 19:51   ` James Vasile
  2011-07-20 20:02   ` Olivier Schwander
  1 sibling, 0 replies; 7+ messages in thread
From: James Vasile @ 2011-07-20 19:51 UTC (permalink / raw)
  To: Jameson Graef Rollins, Alex Ghitza, notmuch

On Wed, 20 Jul 2011 09:48:53 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
Non-text part: multipart/mixed
Non-text part: multipart/signed
> On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza <aghitza@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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 16:48 ` Jameson Graef Rollins
  2011-07-20 19:51   ` James Vasile
@ 2011-07-20 20:02   ` Olivier Schwander
  2011-07-20 21:37     ` Jameson Graef Rollins
  1 sibling, 1 reply; 7+ messages in thread
From: Olivier Schwander @ 2011-07-20 20:02 UTC (permalink / raw)
  To: Jameson Graef Rollins; +Cc: notmuch

Le 20 Jul 2011 09:48, Jameson Graef Rollins a écrit:
> On Wed, 20 Jul 2011 16:17:37 +0200, Alex Ghitza <aghitza@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 20:02   ` Olivier Schwander
@ 2011-07-20 21:37     ` Jameson Graef Rollins
  2011-07-21  2:07       ` Michael Hudson-Doyle
  2011-07-21  5:49       ` Jameson Graef Rollins
  0 siblings, 2 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2011-07-20 21:37 UTC (permalink / raw)
  To: Olivier Schwander; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander <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.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 21:37     ` Jameson Graef Rollins
@ 2011-07-21  2:07       ` Michael Hudson-Doyle
  2011-07-21  5:49       ` Jameson Graef Rollins
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Hudson-Doyle @ 2011-07-21  2:07 UTC (permalink / raw)
  To: Jameson Graef Rollins, Olivier Schwander; +Cc: notmuch

On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Wed, 20 Jul 2011 22:02:47 +0200, Olivier Schwander <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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undo tag operation?
  2011-07-20 21:37     ` Jameson Graef Rollins
  2011-07-21  2:07       ` Michael Hudson-Doyle
@ 2011-07-21  5:49       ` Jameson Graef Rollins
  1 sibling, 0 replies; 7+ messages in thread
From: Jameson Graef Rollins @ 2011-07-21  5:49 UTC (permalink / raw)
  To: Olivier Schwander; +Cc: notmuch

On Wed, 20 Jul 2011 14:37:50 -0700, Jameson Graef Rollins <jrollins@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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-21  5:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 14:17 Undo tag operation? Alex Ghitza
2011-07-20 16:48 ` Jameson Graef Rollins
2011-07-20 19:51   ` James Vasile
2011-07-20 20:02   ` Olivier Schwander
2011-07-20 21:37     ` Jameson Graef Rollins
2011-07-21  2:07       ` Michael Hudson-Doyle
2011-07-21  5:49       ` Jameson Graef Rollins

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).