* [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
* Re: [sup-talk] Programmatically removing tags (:inbox)
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 18:00 ` Devon Gleeson
2 siblings, 1 reply; 8+ messages in thread
From: MaDhAt2r @ 2014-04-23 16:24 UTC (permalink / raw)
To: sup-talk
Hey Alex,
Try this: https://github.com/sup-heliotrope/sup/issues/272
Just use :inbox instead of :draft
Excerpts from Alexander Klink's message of 2014-04-23 10:42:40 -0500:
> 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
* Re: [sup-talk] Programmatically removing tags (:inbox)
2014-04-23 15:42 [sup-talk] Programmatically removing tags (:inbox) Alexander Klink
2014-04-23 16:24 ` MaDhAt2r
@ 2014-04-23 18:11 ` Matthieu Rakotojaona
2014-04-24 13:17 ` Alexander Klink
2014-04-24 18:00 ` Devon Gleeson
2 siblings, 1 reply; 8+ messages in thread
From: Matthieu Rakotojaona @ 2014-04-23 18:11 UTC (permalink / raw)
To: sup-talk
[-- Attachment #1.1: Type: text/plain, Size: 445 bytes --]
Excerpts from Alexander Klink's message of 2014-04-23 17:42:40 +0200:
> 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).
bin/sup-tweak-labels was made for this :)
--
Matthieu Rakotojaona
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [sup-talk] Programmatically removing tags (:inbox)
2014-04-23 18:11 ` Matthieu Rakotojaona
@ 2014-04-24 13:17 ` Alexander Klink
2014-04-25 10:53 ` Gaute Hope
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Klink @ 2014-04-24 13:17 UTC (permalink / raw)
To: sup-talk
Hi Matthieu,
Excerpts from Matthieu Rakotojaona's message of 2014-04-23 20:11:28 +0200:
> Excerpts from Alexander Klink's message of 2014-04-23 17:42:40 +0200:
> > 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).
>
> bin/sup-tweak-labels was made for this :)
Unfortunately, that fails completely for me:
$ sup-tweak-labels -r inbox -v --all-sources
[2014-04-24 15:15:50 +0200] WARNING: can't find character set by using locale, defaulting to utf-8
Found 149439 documents across 453 sources. Scanning...
1-773309-5rGbUSNrGbUS9qb@example.com: {inbox,unread,spam} => {unread,spam}
[2014-04-24 15:15:50 +0200] Flushing Xapian updates to disk. This may take a while...
/home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:141:in `update_message_state': undefined method `[]' for #<Redwood::Message:0x000000029ebf68> (NoMethodError)
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/bin/sup-tweak-labels:109:in `block in <top (required)>'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:288:in `block in each_id'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:288:in `each'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:288:in `each_id'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/bin/sup-tweak-labels:95:in `each'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/bin/sup-tweak-labels:95:in `<top (required)>'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/bin/sup-tweak-labels:19:in `load'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/bin/sup-tweak-labels:19:in `<main>'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /home/alech/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Any ideas?
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
* Re: [sup-talk] Programmatically removing tags (:inbox)
2014-04-24 13:17 ` Alexander Klink
@ 2014-04-25 10:53 ` Gaute Hope
2014-05-02 9:08 ` Gaute Hope
0 siblings, 1 reply; 8+ messages in thread
From: Gaute Hope @ 2014-04-25 10:53 UTC (permalink / raw)
To: sup-talk
Excerpts from Alexander Klink's message of 2014-04-24 15:17:56 +0200:
> Hi Matthieu,
>
> Excerpts from Matthieu Rakotojaona's message of 2014-04-23 20:11:28 +0200:
> > Excerpts from Alexander Klink's message of 2014-04-23 17:42:40 +0200:
> > > 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).
> >
> > bin/sup-tweak-labels was made for this :)
>
> Unfortunately, that fails completely for me:
>
> $ sup-tweak-labels -r inbox -v --all-sources
> [2014-04-24 15:15:50 +0200] WARNING: can't find character set by using locale, defaulting to utf-8
> Found 149439 documents across 453 sources. Scanning...
> 1-773309-5rGbUSNrGbUS9qb@example.com: {inbox,unread,spam} => {unread,spam}
> [2014-04-24 15:15:50 +0200] Flushing Xapian updates to disk. This may take a while...
> /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:141:in `update_message_state': undefined method `[]' for #<Redwood::Message:0x000000029ebf68> (NoMethodError)
Could you check if #295 [0] solves this for you? --tweak-labels wasn't
updated for the latest Index api changes. You have to specify the
--sync-back option if you want message flags to be synced back to
maildir, this _ignores_ any source specific sync_back settings so use
sup-tweak-labels on only one source at the time if you need more fine
grained control.
Note that even though you do the changes in the console as suggested in
the earlier mails the index list in the open sup won't be updated before
you restart sup.
- gaute
[0] https://github.com/sup-heliotrope/sup/pull/295
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [sup-talk] Programmatically removing tags (:inbox)
2014-04-25 10:53 ` Gaute Hope
@ 2014-05-02 9:08 ` Gaute Hope
0 siblings, 0 replies; 8+ messages in thread
From: Gaute Hope @ 2014-05-02 9:08 UTC (permalink / raw)
To: sup-talk
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
Excerpts from Gaute Hope's message of 2014-04-25 12:53:38 +0200:
> Excerpts from Alexander Klink's message of 2014-04-24 15:17:56 +0200:
> > Hi Matthieu,
> >
> > Excerpts from Matthieu Rakotojaona's message of 2014-04-23 20:11:28 +0200:
> > > Excerpts from Alexander Klink's message of 2014-04-23 17:42:40 +0200:
> > > > 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).
> > >
> > > bin/sup-tweak-labels was made for this :)
> >
> > Unfortunately, that fails completely for me:
> >
> > $ sup-tweak-labels -r inbox -v --all-sources
> > [2014-04-24 15:15:50 +0200] WARNING: can't find character set by using locale, defaulting to utf-8
> > Found 149439 documents across 453 sources. Scanning...
> > 1-773309-5rGbUSNrGbUS9qb@example.com: {inbox,unread,spam} => {unread,spam}
> > [2014-04-24 15:15:50 +0200] Flushing Xapian updates to disk. This may take a while...
> > /home/alech/.rvm/gems/ruby-1.9.3-p194/gems/sup-0.17.0/lib/sup/index.rb:141:in `update_message_state': undefined method `[]' for #<Redwood::Message:0x000000029ebf68> (NoMethodError)
This was fixed with the merge of #300. You should be able to use
sup-tweak-labels from git/develop now.
- gaute
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [sup-talk] Programmatically removing tags (:inbox)
2014-04-23 15:42 [sup-talk] Programmatically removing tags (:inbox) Alexander Klink
2014-04-23 16:24 ` MaDhAt2r
2014-04-23 18:11 ` Matthieu Rakotojaona
@ 2014-04-24 18:00 ` Devon Gleeson
2 siblings, 0 replies; 8+ messages in thread
From: Devon Gleeson @ 2014-04-24 18:00 UTC (permalink / raw)
To: Alexander Klink; +Cc: sup-talk
I had this problem too when I first started using Sup. I think what I
ended up having to do was force sup to load all messages into memory
with !!, then tag all with T, then removed inbox. I took a long time for
sup to churn through all of that, but it did work eventually.
IDK, this does seem like a barrier to entry for new folks trying to
adopt sup.
--
Devon Gleeson
Software Engineer
TRIPWIRE | CONFIDENCE:SECURED
www.tripwire.com
_______________________________________________
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