Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Programmatically removing tags (:inbox)
@ 2014-04-23 15:42 Alexander Klink
  2014-04-23 16:24 ` MaDhAt2r
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alexander Klink @ 2014-04-23 15:42 UTC (permalink / raw)
  To: sup-talk

Hi all,

I am trying to archive all my existing mails in order to make a nicer
workflow for myself (sort of a GTD thing with reading mails, either
acting directly or tagging them with 'todo' or 'hold' depending on whether I
have to do something or am waiting for someone to reply).

For this, I want to remove the :inbox tag from all mails in my index.
As a start I looked at https://github.com/sup-heliotrope/sup/issues/225
and tried to reproduce what gauteh did in the console (with one single mail
which I gave a testfoo tag in sup):

| q = Index.parse_query('label:testfoo')
| a = []
| Index.each_message(q) { |x| a.push x }
| puts a # this should only contain one message if you only have one marked as draft
| m = a[0] # get the first message or find the problematic one
| m.labels.delete :testfoo
| m.sync_back
| exit

Unluckily, both in sup and programmatically the mail still has the
testfoo tag. I also tried adding an Index.save_index before the exit,
but that didn't help either.

Any ideas on how to achieve that goal (I am on 0.17.0 if that helps)?

Cheers,
  Alex
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


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

end of thread, other threads:[~2014-05-02  9:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 15:42 [sup-talk] Programmatically removing tags (:inbox) Alexander Klink
2014-04-23 16:24 ` MaDhAt2r
2014-04-24  8:55   ` Alexander Klink
2014-04-23 18:11 ` Matthieu Rakotojaona
2014-04-24 13:17   ` Alexander Klink
2014-04-25 10:53     ` Gaute Hope
2014-05-02  9:08       ` Gaute Hope
2014-04-24 18:00 ` Devon Gleeson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox