Matthias Vallentin | 2 Jan 14:28 2011
Picon

Standard message operations

How do I move a message to the inbox? When I try to add the label
inbox, sup complains: 'inbox' is a reserved label! 

Also, how do I mark messages as read other than reading it in a buffer?

    Matthias
Johann Klähn | 2 Jan 15:38 2011
Picon

Re: Standard message operations

Hi Matthias, pressing '?' at any time provides you with all key
bindings available.

> How do I move a message to the inbox? When I try to add the label
> inbox, sup complains: 'inbox' is a reserved label! 
I usually do this by pressing 'a' (the same key binding is used for
archiving messages)

> Also, how do I mark messages as read other than reading it in a buffer?
Try 'N'

Johann
Ben Walton | 2 Jan 15:39 2011
Picon
Picon

Re: Standard message operations

Excerpts from Matthias Vallentin's message of Sun Jan 02 08:28:32 -0500 2011:

> How do I move a message to the inbox? When I try to add the label
> inbox, sup complains: 'inbox' is a reserved label! 

The 'archive' toggle controls the inbox label.  Use 'a' on a message
in the inbox to archive it.  Use 'A' on a message in the inbox to mark
it read and archive it.

> Also, how do I mark messages as read other than reading it in a
> buffer?

Use the 'n' key to do this.

Use the '?' key on any sup view to see the available key strokes and
their descriptions.

HTH.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
Moritz Wilhelmy | 2 Jan 16:47 2011
Picon

Re: Standard message operations

Excerpts from Ben Walton's message of Sun Jan 02 15:39:09 +0100 2011:
> Excerpts from Matthias Vallentin's message of Sun Jan 02 08:28:32 -0500 2011:
> 
> > How do I move a message to the inbox? When I try to add the label
> > inbox, sup complains: 'inbox' is a reserved label! 
> 
> The 'archive' toggle controls the inbox label.  Use 'a' on a message
> in the inbox to archive it.  Use 'A' on a message in the inbox to mark
> it read and archive it.

Which raises the question: why are there some special labels reserved by sup?
I don't see any disadvantages by making labels such as sent or inbox applicable
to messages by normal means.  In fact, I think the the current behaviour is
rather inconvenient.  Can anyone enlighten me?

Best regards,

Moritz
Matthias Vallentin | 2 Jan 17:13 2011
Picon

Re: message.list_address weirdness

On Dec 27 2010 at 02:07AM PST, Matthias Vallentin wrote:
> I cannot get message.list_address to match to add labels before adding
> messages although the messages definitively have the List-Post header.

Actually, the proposed changes will cause a crash when replying to a
list address (i.e., hitting 'G'), which expects message.list_address to
return a Person object rather than a string containing the email
address. This is inconsistent with the wiki [1] and started my confusion
in the first place. Automatically adding labels for mailing lists would
then change from

    if message.list_address =~ /sup-talk/
      message.add_label "sup"
      message.add_label "list"
    end

to

    if message.list_address and message.list_address.email =~ /sup-talk/
      message.add_label "sup"
      message.add_label "list"
    end

in order to work correctly. In [1], list_address is documented to be of
type String, which should probably be changed to type Person. I find the
naming (list_address) slightly misleading because it suggest a plain
email address. What about introducing a new member message.list that
returns a Person object and making
message.list_{address,subscribe,unsubscribe} return a string?

(Continue reading)

Matthias Vallentin | 3 Jan 11:24 2011
Picon

Re: Standard message operations

On Jan 02 2011 at 06:38AM PST, Johann Klähn wrote:
> Hi Matthias, pressing '?' at any time provides you with all key
> bindings available.

My main problem was getting used to the concept of toggling, i.e., using
the same key for different operations. Now I wonder how I missed them in
the first place!

    Matthias
_______________________________________________
sup-talk mailing list
sup-talk <at> rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
Matthias Vallentin | 3 Jan 11:33 2011
Picon

Re: Standard message operations

On Jan 02 2011 at 07:47AM PST, Moritz Wilhelmy wrote:
> Which raises the question: why are there some special labels reserved by sup?
> I don't see any disadvantages by making labels such as sent or inbox applicable
> to messages by normal means.  In fact, I think the the current behaviour is
> rather inconvenient.

I agree that it is sometimes desirable to use reserved labels. For
example, while I was loading my 100k+ messages into sup, I found some
messages of mine that slipped through the automatic labelling as sent
during the import, but I would still like to label them as such now.

    Matthias
Matthias Vallentin | 3 Jan 13:09 2011
Picon

Tilde expansion in signature path

Is there a specific reason why a tilde in the :signature: path is not
expanded? If not, this patch will enable it:

diff --git a/lib/sup/account.rb b/lib/sup/account.rb
index 1718d94..6e078cf 100644
--- a/lib/sup/account.rb
+++ b/lib/sup/account.rb
 <at>  <at>  -8,7 +8,7  <at>  <at>  class Account < Person
     raise ArgumentError, "no email for account" unless h[:email]
     super h[:name], h[:email]
      <at> sendmail = h[:sendmail]
-     <at> signature = h[:signature]
+     <at> signature = File.expand_path h[:signature]
      <at> gpgkey = h[:gpgkey]
   end

    Matthias
Matthias Vallentin | 3 Jan 20:34 2011
Picon

Multiple execution of before-edit hook

I noticed that before-edit is executed several times when replying:

     <at> headers.each do |k, v|
       <at> bodies[k] = body
      HookManager.run "before-edit", :header => v, :body =>  <at> bodies[k]
    end

What's the rational behind this? Why not invoking the hook once, for all
headers and the body. (Also, the hook is executed again in the parent
class EditMessageMode.) Since I use the hook to append some text at the
end of the body

    body << "foo"

the text is added multiple times. Currently I use a crude hack to avoid
the duplicate appending by

    body << "foo" unless body.last == "foo"

but I wonder whether this behavior is intentional.

    Matthias
Matthias Vallentin | 3 Jan 21:15 2011
Picon

Re: Tilde expansion in signature path

Better: this tweak supports account configurations with lacking
:signature: fields.

+     <at> signature = File.expand_path h[:signature] if h[:signature]

    Matthias

Gmane