Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Alexander Klink <alexander@klink.name>
To: sup-talk <sup-talk@rubyforge.org>
Subject: [sup-talk] Programmatically removing tags (:inbox)
Date: Wed, 23 Apr 2014 17:42:40 +0200	[thread overview]
Message-ID: <1398267413-sup-3348@zoe> (raw)

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


             reply	other threads:[~2014-04-23 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 15:42 Alexander Klink [this message]
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

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

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

  git send-email \
    --in-reply-to=1398267413-sup-3348@zoe \
    --to=alexander@klink.name \
    --cc=sup-talk@rubyforge.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox