From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.96.157.163 with SMTP id wn3csp32075qdb; Wed, 23 Apr 2014 08:53:14 -0700 (PDT) X-Received: by 10.182.18.102 with SMTP id v6mr1854858obd.71.1398268394132; Wed, 23 Apr 2014 08:53:14 -0700 (PDT) Return-Path: Received: from rubyforge.org ([50.56.192.79]) by mx.google.com with ESMTP id pu6si1237728oeb.70.2014.04.23.08.53.13 for ; Wed, 23 Apr 2014 08:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id AC0242E296; Wed, 23 Apr 2014 15:53:14 +0000 (UTC) X-Greylist: delayed 552 seconds by postgrey-1.31 at rubyforge; Wed, 23 Apr 2014 15:52:02 UTC Received: from shiftordie.de (0x90.eu [78.47.172.14]) by rubyforge.org (Postfix) with ESMTP id A5A632E292 for ; Wed, 23 Apr 2014 15:52:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by shiftordie.de (Postfix) with ESMTP id 4856C42021 for ; Wed, 23 Apr 2014 17:42:40 +0200 (CEST) From: Alexander Klink To: sup-talk Date: Wed, 23 Apr 2014 17:42:40 +0200 Message-Id: <1398267413-sup-3348@zoe> User-Agent: Sup/0.17.0 Subject: [sup-talk] Programmatically removing tags (:inbox) X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org 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