Philippe LeCavalier | 1 Feb 17:29 2011

stripping label from msgs

Hi.

I've only recently began using sup. As such, I've changed my mind on my labeling structure. Naturally, I
thought I'll just open each label -there aren't that many yet-, tag all, apply to all, -label. But there
must be something about '-label' I'm not understanding. I've tried -label:<label_name>, just '-label'
and a few other attempts at the syntax but nothing works. If I don't tag-all and just tag a single mail at a
time I can delete/edit labels. But that's no solution -there may not be many labels but there's a ton of mail-.

Also, why can't I use 'A' in the search mode? I like searching tagging and marking but I can only search, tag,
mark read and then archive. Is that intentional?

Lastly, and somewhat related to my above mentioned issue, how do I modify labels. The label list mode seems
rather restricted. I'd like to do L<enter> and delete/edit the labels themselves.
--

-- 
Thanks,
Phil
Tero Tilus | 1 Feb 18:31 2011
Picon

Re: stripping label from msgs

Philippe LeCavalier, 2011-02-01 18:29:
> I've only recently began using sup. As such, I've changed my mind on
> my labeling structure.

You probably want to make friends with sup-tweak-labels.  And thats
_after_ you have backed up label state dump.  ;)

  sup-tweak-labels --help

--

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
Philippe LeCavalier | 1 Feb 18:43 2011

Re: stripping label from msgs

Excerpts from Tero Tilus's message of Tue Feb 01 12:31:59 -0500 2011:
> Philippe LeCavalier, 2011-02-01 18:29:
> > I've only recently began using sup. As such, I've changed my mind on
> > my labeling structure.
> 
> You probably want to make friends with sup-tweak-labels.  And thats
> _after_ you have backed up label state dump.  ;)
> 
>   sup-tweak-labels --help
> 
Perfect!
--

-- 
Thanks,
Phil
Michael Stapelberg | 1 Feb 18:26 2011
Picon

Re: stripping label from msgs

Hi Philippe,

Excerpts from Philippe LeCavalier's message of 2011-02-01 17:29:56 +0100:
> aren't that many yet-, tag all, apply to all, -label. But there must be
> something about '-label' I'm not understanding. I've tried
> -label:<label_name>, just '-label' and a few other attempts at the syntax but
Suppose you have labeled a mail 'sup'. To remove this label, use '-sup'

In general, if you want to re-label a lot of mails, use sup-tweak-labels.

> Lastly, and somewhat related to my above mentioned issue, how do I modify
> labels. The label list mode seems rather restricted. I'd like to do L<enter>
> and delete/edit the labels themselves.
I don’t think you can. Again, use sup-tweak-labels to remove/add labels.

Best regards,
Michael
_______________________________________________
sup-talk mailing list
sup-talk <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
Philippe LeCavalier | 1 Feb 20:58 2011

Re: stripping label from msgs

Excerpts from Michael Stapelberg's message of Tue Feb 01 12:26:15 -0500 2011:
> Hi Philippe,
> 
> Excerpts from Philippe LeCavalier's message of 2011-02-01 17:29:56 +0100:
> > aren't that many yet-, tag all, apply to all, -label. But there must be
> > something about '-label' I'm not understanding. I've tried
> > -label:<label_name>, just '-label' and a few other attempts at the syntax but
> Suppose you have labeled a mail 'sup'. To remove this label, use '-sup'
ah! Just about the only thing I didn't try...figures.
> 
> In general, if you want to re-label a lot of mails, use sup-tweak-labels.
> 
> > Lastly, and somewhat related to my above mentioned issue, how do I modify
> > labels. The label list mode seems rather restricted. I'd like to do L<enter>
> > and delete/edit the labels themselves.
> I don’t think you can. Again, use sup-tweak-labels to remove/add labels.
I had now idea this existed. We should plug that in the wiki somewhere. Or is it already and I didn't see it?

> Best regards,
> Michael
--

-- 
Thanks,
Phil
_______________________________________________
sup-talk mailing list
sup-talk <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
sup-talk-bounces | 1 Feb 21:18 2011

Re: stripping label from msgs

Hi Michael.
Excerpts from Michael Stapelberg's message of Tue Feb 01 12:26:15 -0500 2011:
> Hi Philippe,
> 
> Excerpts from Philippe LeCavalier's message of 2011-02-01 17:29:56 +0100:
> > aren't that many yet-, tag all, apply to all, -label. But there must be
> > something about '-label' I'm not understanding. I've tried
> > -label:<label_name>, just '-label' and a few other attempts at the syntax but
> Suppose you have labeled a mail 'sup'. To remove this label, use '-sup'
> 
> In general, if you want to re-label a lot of mails, use sup-tweak-labels.
> 
> > Lastly, and somewhat related to my above mentioned issue, how do I modify
> > labels. The label list mode seems rather restricted. I'd like to do L<enter>
> > and delete/edit the labels themselves.
> I don’t think you can. Again, use sup-tweak-labels to remove/add labels.
Could you be so kind as to provide me with a working example of a query. I don't seem to "get it". :)

> Best regards,
> Michael
_______________________________________________
sup-talk mailing list
sup-talk <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
Philippe LeCavalier | 3 Feb 16:58 2011

New User Hooks Details

I'm having a hard time using the hooks system.

I'm trying to add the 'AutoAddLabelsToNewMessages'. I've followed the wiki and created
'~/.sup/hooks/before-add-message.rb' with a few hooks but sup isn't calling them before polling.

One bit of info that seems odd to me is when I issue 'sup -l' the hooks listed are nowhere to be found in the hooks
folder yet they appear to be working. Is that normal?

ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
sup 0.12.1

sample hook:
#Mark Lists <lists> 
addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r")
if ! addressfile.grep(/#{message.list_address}/).empty?
message.add_label :lists
end

contents of ~/.sup.hooks/label.lists

plecavalier <at> plc:~/.sup/hooks$ cat label.lists 
cups <at> easysw.com
samba <at> lists.samba.org
rsync <at> lists.samba.org
offlineimap-project <at> lists.alioth.debian.org
bind-users <at> lists.isc.org

The only thing I can think of is possibly setting the execute bit but I wanted to checking here prior.
--

-- 
Thanks,
(Continue reading)

Tero Tilus | 4 Feb 00:01 2011
Picon

Re: New User Hooks Details

Philippe LeCavalier, 2011-02-03 17:58:
> One bit of info that seems odd to me is when I issue 'sup -l' the
> hooks listed are nowhere to be found in the hooks folder yet they
> appear to be working. Is that normal?

The `sup -l` lists all the hooks sup looks for upon start.  If a hook
file exists, sup loads it and calls the ruby code in the file the way
documented in `sup -l`.

> # Mark Lists <lists> 
> addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r")
> if ! addressfile.grep(/#{message.list_address}/).empty?
>   message.add_label :lists
> end

Looks sound on the surface.  This is your
~/.sup/hooks/before-add-message.rb?  New mails coming from
mailinglists listed in label.lists don't get lists-tag?  You could add
some logging and see whats going on.

debug "before-add-message"
File.open("/home/plecavalier/.sup/hooks/label.lists") do |addressfile|
  unless addressfile.grep(/#{message.list_address}/).empty?
    debug "list message #{message.id.inspect}"
    message.add_label :lists
  else
    debug "non-list message #{message.id.inspect}"
  end
end

(Continue reading)

Hamish D | 4 Feb 00:48 2011
Picon

Re: New User Hooks Details

> One bit of info that seems odd to me is when I issue 'sup -l' the hooks listed are nowhere to be found in the
hooks folder yet they appear to be working. Is that normal?

sup -l will list the hooks you can use - it doesn't check what hooks
you've actually created.

> sample hook:
> #Mark Lists <lists>
> addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r")
> if ! addressfile.grep(/#{message.list_address}/).empty?
> message.add_label :lists
> end

You can stick debug statements in - say:

debug "list address is #{message.list_address.inspect}, type is
#{message.list_address.class.to_s}"

and then see it in the log (while using sup, press ";" and scroll down
to the log buffer).

I think that message.list_address is actually of class Person, so you
would want to use message.list_address.email for your case. I've
updated the wiki to correct that - I think I may have written the
wrong information into the wiki to start with :/ so sorry for the
mistake.

Hamish
Hamish D | 4 Feb 00:52 2011
Picon

Re: issue after upgrading sup mainline

The key line would be:

> ./lib/sup/index.rb:17: Xapian version 1.2.1 or higher required

gem upgrade should fix it.

Hamish

Gmane