sup 0.0.8 → 0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sup might be problematic. Click here for more details.

Files changed (57) hide show
  1. data/HACKING +6 -36
  2. data/History.txt +11 -0
  3. data/Manifest.txt +5 -0
  4. data/README.txt +13 -31
  5. data/Rakefile +3 -3
  6. data/bin/sup +167 -89
  7. data/bin/sup-add +39 -29
  8. data/bin/sup-config +57 -31
  9. data/bin/sup-sync +60 -54
  10. data/bin/sup-sync-back +143 -0
  11. data/doc/FAQ.txt +56 -19
  12. data/doc/Philosophy.txt +34 -33
  13. data/doc/TODO +76 -46
  14. data/doc/UserGuide.txt +142 -122
  15. data/lib/sup.rb +76 -36
  16. data/lib/sup/account.rb +27 -19
  17. data/lib/sup/buffer.rb +130 -44
  18. data/lib/sup/contact.rb +1 -1
  19. data/lib/sup/draft.rb +1 -2
  20. data/lib/sup/imap.rb +64 -19
  21. data/lib/sup/index.rb +95 -16
  22. data/lib/sup/keymap.rb +1 -1
  23. data/lib/sup/label.rb +31 -5
  24. data/lib/sup/maildir.rb +7 -5
  25. data/lib/sup/mbox.rb +34 -15
  26. data/lib/sup/mbox/loader.rb +30 -12
  27. data/lib/sup/mbox/ssh-loader.rb +7 -5
  28. data/lib/sup/message.rb +93 -44
  29. data/lib/sup/modes/buffer-list-mode.rb +1 -1
  30. data/lib/sup/modes/completion-mode.rb +55 -0
  31. data/lib/sup/modes/compose-mode.rb +6 -25
  32. data/lib/sup/modes/contact-list-mode.rb +1 -1
  33. data/lib/sup/modes/edit-message-mode.rb +119 -29
  34. data/lib/sup/modes/file-browser-mode.rb +108 -0
  35. data/lib/sup/modes/forward-mode.rb +3 -20
  36. data/lib/sup/modes/inbox-mode.rb +9 -12
  37. data/lib/sup/modes/label-list-mode.rb +28 -46
  38. data/lib/sup/modes/label-search-results-mode.rb +1 -16
  39. data/lib/sup/modes/line-cursor-mode.rb +44 -5
  40. data/lib/sup/modes/person-search-results-mode.rb +1 -16
  41. data/lib/sup/modes/reply-mode.rb +18 -31
  42. data/lib/sup/modes/resume-mode.rb +6 -6
  43. data/lib/sup/modes/scroll-mode.rb +6 -5
  44. data/lib/sup/modes/search-results-mode.rb +6 -17
  45. data/lib/sup/modes/thread-index-mode.rb +70 -28
  46. data/lib/sup/modes/thread-view-mode.rb +65 -29
  47. data/lib/sup/person.rb +71 -30
  48. data/lib/sup/poll.rb +13 -4
  49. data/lib/sup/rfc2047.rb +61 -0
  50. data/lib/sup/sent.rb +7 -5
  51. data/lib/sup/source.rb +12 -9
  52. data/lib/sup/suicide.rb +36 -0
  53. data/lib/sup/tagger.rb +6 -6
  54. data/lib/sup/textfield.rb +76 -14
  55. data/lib/sup/thread.rb +97 -123
  56. data/lib/sup/util.rb +167 -1
  57. metadata +30 -5
data/doc/FAQ.txt CHANGED
@@ -1,18 +1,30 @@
1
1
  Sup FAQ
2
2
  -------
3
+
4
+ Q: What is Sup?
5
+ A: Sup is a console-based email client for people with a lot of email.
6
+ It supports tagging, very fast full-text search, automatic contact-
7
+ list management, and more. If you're the type of person who treats
8
+ email as an extension of your long-term memory, Sup is for you.
9
+
3
10
  Q: What does Sup stand for?
4
- A: It stands for "what's up?", which is more or less the question in
5
- mind when I fire up my mail client.
11
+ A: "What's up?"
12
+
13
+ Q: Sup looks a lot like a text-based Gmail.
14
+ A: I stole a lot of their ideas. And improved upon them, of course.
6
15
 
7
- Q: If you love GMail so much, why not just use it?
16
+ Q: If you love Gmail so much, why not just use it?
8
17
  A: I hate ads, I hate using a mouse, and I hate non-programmability
9
18
  and non-extensibility.
10
19
 
11
- Also, GMail encourages top-posting. THIS CANNOT BE TOLERATED!
20
+ Also, Gmail doesn't let you use a monospace font, which is just
21
+ plain lame.
22
+
23
+ Also, Gmail encourages top-posting. THIS CANNOT BE TOLERATED!
12
24
 
13
25
  Q: Why the console?
14
- A: Because a keystroke is with a hundred mouse clicks (as any Unix
15
- user knows). Because you don't need web browser. Because you get
26
+ A: Because a keystroke is worth a hundred mouse clicks, as any Unix
27
+ user knows. Because you don't need web browser. Because you get
16
28
  instantaneous response and a simple interface.
17
29
 
18
30
  Q: How does Sup deal with spam?
@@ -28,9 +40,8 @@ A: Ok, press the 'd' key.
28
40
 
29
41
  Q: But I want to delete it for real, not just add a 'deleted' flag in
30
42
  the index. I want it gone from disk!
31
- A: Ok, at some point I plan to have a batch deletion tool that will
32
- run through a source and delete all messages that have a 'spam' or
33
- 'deleted' tags. But that doesn't exist yet.
43
+ A: Currently, for mbox sources, there is a batch deletion tool that
44
+ will strip out all messages marked as spam or deleted.
34
45
 
35
46
  Q: I got some error message about needing to run sup-sync --changed
36
47
  when I tried to read a message. What's that about?
@@ -41,10 +52,6 @@ A: If messages have been moved, deleted, or altered in a source, Sup
41
52
  sources don't change except by having new messages added. If that
42
53
  assumption is violated, you'll have to sync the index.
43
54
 
44
- The alternative is to rescan every source when Sup starts
45
- up. Because Sup is designed to work with arbitrarily large mbox
46
- files, this would not be a good idea.
47
-
48
55
  Q: How do I back up my index?
49
56
  Q: How do I make a state dump?
50
57
  A: Since the contents of the messages are recoverable from their
@@ -59,13 +66,10 @@ A: Run:
59
66
  sup-sync [<source>+] --restored --restore <dumpfile>
60
67
  where <dumpfile> was created as above.
61
68
 
62
- Q: I see this message from Ferret:
63
- Error occured in index.c:825 - sis_find_segments_file
64
- A: Yikes! You've upgraded Ferret and the index format changed beneath
65
- you. Follow the index rebuild instructions below.
66
-
67
69
  Q: I upgraded Ferret and the index format changed. I need to
68
70
  completely rebuild my index. How do I do this?
71
+ Q: Ferret crashed and I can't read my index. Luckily I made a state
72
+ dump. What should I do?
69
73
  A: First, you'll need a complete state dump. If you haven't made
70
74
  one, you'll need to downgrade Ferret and make a state dump as
71
75
  above. Then run these commands:
@@ -83,7 +87,7 @@ A: Move the messages from the source to the target using whatever tool
83
87
 
84
88
  If you sup-sync only one source at a time, depending on the order,
85
89
  the messages may be treated as missing and then deleted from the
86
- index, which means that their state will be lost when you sync the
90
+ index, which means that their states will be lost when you sync the
87
91
  other source.
88
92
 
89
93
  Q: What are all these "Redwood" references I see in the code?
@@ -101,3 +105,36 @@ A: Sup is only possible through the hard work of Dave Balmain, the
101
105
  really a first-class piece of software, and it's due to the
102
106
  tremendous amount of time and effort he's put in to it.
103
107
 
108
+ Common Problems
109
+ ---------------
110
+
111
+ P: I see this message from Ferret:
112
+ Error occured in index.c:825 - sis_find_segments_file
113
+ S: Yikes! You've upgraded Ferret and the index format changed beneath
114
+ you. Follow the index rebuild instructions above.
115
+
116
+ P: I get some error message from Rubymail about frozen strings when
117
+ importing messages with attachments.
118
+ S: The current solution is to directly modify RubyMail. Change line 159 of
119
+ multipart.rb to:
120
+ chunk = chunk[0..start]
121
+ This is because RubyMail hasn't been updated since like Ruby 1.8.2.
122
+ Please bug Matt Lickey.
123
+
124
+ P: I see this error:
125
+ /usr/local/lib/ruby/1.8/yaml.rb:133:in `transfer': allocator undefined for Bignum (TypeError)
126
+ S: You need to upgrade to Ruby 1.8.5. YAML in earlier versions can't
127
+ parse BigNums, but Sup relies on that for Maildir and IMAP.
128
+
129
+ P: I see this error:
130
+ /usr/lib/ruby/1.8/net/imap.rb:204: uninitialized constant Net::IMAP::SSL (NameError)
131
+ S: You need to install a package called libssl-ruby or something similar.
132
+ Or, don't use imaps:// sources. Ruby's IMAP library otherwise fails in
133
+ this completely uninformative manner.
134
+
135
+ P: When I run Sup remotely and view an HTML attachment, an existing
136
+ Firefox on the *local* machine is redirected to the attachment
137
+ file, which it can't find (since it's on the remote machine). How do
138
+ I view HTML attachments in this environment?
139
+ S: Put this in your ~/.mailcap on the machine you run Sup on:
140
+ text/html; /usr/bin/firefox -a sup '%s'; description=HTML Text; test=test -n "$DISPLAY"; nametemplate=%s.html
data/doc/Philosophy.txt CHANGED
@@ -1,57 +1,58 @@
1
1
  Should an email client have a philosophy? For many people, email is
2
- one of our primary means of communication. Something so important
3
- ought to warrant a little thought.
2
+ one of our primary means of communication, and email archives are an
3
+ integral part of our long-term memory. Something so important ought to
4
+ warrant a little thought.
4
5
 
5
6
  Here's Sup's philosophy.
6
7
 
7
8
  Using "traditional" email clients today is increasingly problematic.
8
- Anyone who's on a high-traffic mailing list knows this. My ruby-talk
9
+ Anyone who's on a high-traffic mailing list knows this. My ruby-talk
9
10
  folder is 430 megs and Mutt sits there for 60 seconds while it opens
10
- it. Keeping up with the all the new traffic is painful, even with
11
+ it. Keeping up with the all the new traffic is impossible, even with
11
12
  Mutt's excellent threading features, simply because there's so much of
12
13
  it. A single thread can span several pages in the folder index view
13
- alone! And Mutt is probably the fastest email client out there, and
14
- certainly most featureful and in terms of threading and mailing list
15
- support. God help me if I try and throw Thunderbird at that.
14
+ alone! And Mutt is probably the fastest, most mailing-list aware email
15
+ client out there. God help me if I try and use Thunderbird.
16
16
 
17
- The principle problem with traditional clients is that they deal with
17
+ The problem with traditional clients like Mutt is that they deal with
18
18
  individual pieces of email. This places a high mental cost on the user
19
19
  for each incoming email, by forcing them to ask: Should I keep this
20
- email, or delete it? If I keep it, where should I file it? For
21
- example, I've spent the last 10 years of my life laboriously
22
- hand-filing every email message I received and feeling a mild sense of
23
- panic every time an email was both "from Mom" and "about school". The
24
- massive amounts of email that many people receive, and the cheap cost
25
- of storage, have made these questions both more costly and less useful
26
- to answer.
20
+ email, or delete it? If I keep it, where should I file it? I've spent
21
+ the last 10 years of my life laboriously hand-filing every email
22
+ message I received and feeling a mild sense of panic every time an
23
+ email was both "from Mom" and "about school". The massive amounts of
24
+ email that many people receive, and the cheap cost of storage, have
25
+ made these questions both more costly and less useful to answer.
27
26
 
28
- I think GMail has taken the right approach. As a long-time Mutt user,
29
- I was pretty much blown away when I first saw people use GMail,
30
- because I saw them treat email differently from how I ever had. I saw
31
- that making certain operations quantitatively easier (namely, search)
32
- resulted in a qualitative difference in usage. You didn't have to
33
- worry about filing things into folders correctly, because you could
34
- just find things later by searching for them. I also saw how
35
- thread-centrism was advantageous over message-centrism when message
36
- volume was high: if nothing else, there's simply less of them.
27
+ Contrast that with using Gmail. As a long-time Mutt user, I was blown
28
+ away when I first saw someone use Gmail. They treated their email
29
+ differently from how I ever had. They never filed email and they never
30
+ deleted it. They relied on an immediate, global, full-text search, and
31
+ thread-level tagging, to do everything I'd ever done with Mutt, but
32
+ with a trivial cost to the user at message receipt time.
37
33
 
38
- Much of the inspiration for Sup was based on GMail. I think it's to
39
- the GMail designers' credit that they started with a somewhat ad-hoc
34
+ From Gmail I learned that making certain operations quantitatively
35
+ easier (namely, search) resulted in a qualitative improvement in
36
+ usage. I also learned how thread-centrism was advantageous over
37
+ message-centrism when message volume was high: most of the time, a
38
+ message and its context deserve the same treatment. I think it's to
39
+ the Gmail designers' credit that they started with a somewhat ad-hoc
40
40
  idea (hey, we're really good at search engines, so maybe we can build
41
41
  an email client on top of one) and managed to build something that was
42
42
  actually better than everything else out there. At least, that's how I
43
43
  imagine in happened. Maybe they knew what they were doing from the
44
44
  start.
45
45
 
46
- But ultimately, GMail wasn't right for me (fuck top posting and HTML
47
- mail), which is why the idea for Sup was born.
46
+ Unfortunately, there's a lot to Gmail I can't tolerate (top posting,
47
+ HTML mail, one-level threads, and ads come to mind, never mind the
48
+ fact that it's not FOSS). Thus Sup was born.
48
49
 
49
50
  Sup is based on the following principles, which I stole directly from
50
- GMail:
51
+ Gmail:
51
52
 
52
- - An immediately accessible and fast search capability over the
53
- entire email archive eliminates most of the need for folders,
54
- and eliminates the necessity of having to ever delete email.
53
+ - An immediately accessible and fast search capability over the entire
54
+ email archive eliminates most of the need for folders, and most of
55
+ the necessity of deleting email.
55
56
 
56
57
  - Labels eliminate what little need for folders search doesn't cover.
57
58
 
@@ -65,4 +66,4 @@ do with the fantastic productivity of a console- and keyboard-based
65
66
  application, the usefulness of multiple buffers, the necessity of
66
67
  handling multiple email accounts, etc. But those are just details!
67
68
 
68
- Let me know what you think.
69
+ Try it and let me know what you think.
data/doc/TODO CHANGED
@@ -1,66 +1,96 @@
1
- for 0.0.8
2
- ---------
3
- x nice little startup config program
4
- x bugfix: triggering a pageup when cursor scrolling up jumps to the
5
- bottom of the page rather than the next line
6
- x bugfix: final logging messages to stdout?
7
- x bugfix: mbox directory shouldn't generate an exception, just an error
8
- x bugfix: m in thread-view-mode when a person is not selected should open up a
9
- blank compose-mode rather than do nothing
10
- x bugfix: stars on messages with blue backgrounds still have green bgs
11
- x ferret upgrade script (dump & restore)
12
- x bugfix: mark messages as read immediately when t-v-m is opened
13
- x compose in thread-view-mode auto-fills in person
14
- x bugfix: 'N' in thread-view-mode (expand only new messages) crashes
15
- x bugfix: detect source corruption at startup
16
- x maildir
17
- x bugfix: single-line messages come empty upon reply
18
-
19
- next release
20
- ------------
21
- _ bugfix: when one new message comes into an imap folder, we don't
22
- catch it until a reload (sometimes?)
23
- _ bugfix: add new message counts until keypress
24
- _ bugfix: attachment filenames sometimes not detected (filename=)
25
- _ split out threading & message chunk parsing to a separate library
1
+ for 0.1
2
+ -------
3
+ x bugfix: any interactive prompt after "No new messages." flash has an
4
+ empty line above it.
5
+ x detect other sup instances and do something intelligent (because
6
+ x refactor all the *-search-results-mode classes
7
+ x decode RFC 2047 ("encoded word") headers
8
+ - see: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/101949, http://dev.rubyonrails.org/ticket/6807
9
+ ferret crashes violently with more than one index writer open)
10
+ x create attachments
11
+ x add arbitrary labels to sources
12
+ x improve sup-config
13
+ x autoload more threads when you go down
14
+ x add a sync-back tool that at least works for mboxes
15
+ x thread by subject configurable in config.yaml
16
+ x view as text command if the mime view command fails for an attachment
17
+ x bugfix: attachment filenames sometimes not detected (filename=)
18
+ x bugfix: rmail multipart error
19
+ x bugfix: sup-add not prompting for old accounts, i think? possibly because
20
+ sources no longer respond_to? :username due to Recoverable wrapping
21
+ x wide character support
22
+ x i18n support
23
+ x tab completion on labels
26
24
 
27
- near future
28
- ---------
29
- _ Net::SMTP support (cuz I'm going to need it soon)
30
- _ create attachments
25
+ for next release
26
+ ----------------
27
+ _ use trac or something. this file is getting a little silly.
28
+ _ gpg integration
29
+ _ user-defined hooks
30
+ _ saved searches
31
+ _ bugfix: missing sources should be handled better
32
+ _ tab completion for contacts
33
+ _ bugfix: screwing the headers when editing causes a crash
34
+ _ bugfix: sometimes, when one new message comes into an imap folder,
35
+ we don't catch it until a reload. but we do see a message
36
+ indicating they're loaded to inbox (imap only? hard to reproduce.)
37
+ _ bugfix: need a better way to force an address to a particular name,
38
+ for things like evite addresses
39
+ _ bugfix: ferret flakiness: just added message but can't find it
40
+ _ add new message counts until keypress
41
+ _ bugfix: deadlock (on rubyforge)
42
+ _ bugfix: ferret corrupt index problem at index.c:901. see http://ferret.davebalmain.com/trac/ticket/279
43
+ _ bugfix: read before thread-index has finished loading then hides the
44
+ thread?!? wtf. (on jamie)_ bugfix: width in index-mode needs to be
45
+ determined per-character rather than per-byte
46
+ _ search results: highlight relevant snippets and open to relevant
47
+ portion of thread
48
+ _ rss feed reading
31
49
  _ forward attachments
32
50
  _ select all, starred, to me, etc
33
51
  _ undo
34
- _ gmail
52
+ _ gmail support
35
53
  _ warnings: top-posting, missing attachment, ruby-talk:XXXX detection
36
- _ mboxz, mboxbz
54
+ _ Net::SMTP support
55
+ _ more control character support in buffer line editing
37
56
 
38
57
  future
39
58
  ------
40
- search results: highlight relevant snippets and open to relevant portion of thread
41
- email address to name mapping needs some work. automatic email addresses (noreply@...) are often assigned to something screwy.
42
- decode RFC 2047 ("encoded word") headers
43
- - see: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/101949, http://dev.rubyonrails.org/ticket/6807
59
+ mboxz, mboxbz
44
60
  swappable keymappings
45
- within-buffer search
46
- bugfix: when returning from a shelling out, ncurses is crazy
47
- more control character support in buffer line editing
48
- wide character support
49
- i18n support
50
- batch deletion
51
- tab completion on labels, contacts
52
- contact selector in edit-message-mode
53
- maybe: filters
54
- maybe: rangefilter on the initial inbox to only consider the most recent 1000 messages
61
+ bugfix: when returning from a shelling out, sometime ncurses is crazy
62
+ and refuses to interpret any keystrokes
63
+ better batch deletion (extend to non-mbox sources)
55
64
  annotations on messages
56
65
  pop
57
66
  be able to mark individual messages as spam in thread-view-mode
58
67
  toggle wrapping
59
68
  maybe: de-archived messages auto-added to inbox
60
- prune old entries from contacts.txt so that it doesn't arbitrarily
69
+ prune old entries from contacts.txt so that it doesn't grow without bound
70
+
71
+ maybe
72
+ -----
73
+ split out threading & message chunk parsing to a separate library
74
+ filters
75
+ rangefilter on the initial inbox to only consider the most recent 1000 messages
61
76
 
62
77
  done
63
78
  ----
79
+ x nice little startup config program
80
+ x bugfix: triggering a pageup when cursor scrolling up jumps to the
81
+ bottom of the page rather than the next line
82
+ x bugfix: final logging messages to stdout?
83
+ x bugfix: mbox directory shouldn't generate an exception, just an error
84
+ x bugfix: m in thread-view-mode when a person is not selected should open up a
85
+ blank compose-mode rather than do nothing
86
+ x bugfix: stars on messages with blue backgrounds still have green bgs
87
+ x ferret upgrade script (dump & restore)
88
+ x bugfix: mark messages as read immediately when t-v-m is opened
89
+ x compose in thread-view-mode auto-fills in person
90
+ x bugfix: 'N' in thread-view-mode (expand only new messages) crashes
91
+ x bugfix: detect source corruption at startup
92
+ x maildir
93
+ x bugfix: single-line messages come empty upon reply
64
94
  x make 'A' archive in thread-view-mode
65
95
  x remove stupid percent_done source methods (still useful; made it optional)
66
96
  x don't quit while writing thread index state to disk or with unsaved drafts/messages
data/doc/UserGuide.txt CHANGED
@@ -2,137 +2,101 @@ Welcome to Sup! Here's how to get started.
2
2
 
3
3
  First, try running 'sup'. Since this is your first time, you'll be
4
4
  confronted with a mostly blank screen, and a notice at the bottom that
5
- you have no new messages. That's because Sup doesn't have any messages
6
- in its index yet, and has no idea where to look for them anyways.
5
+ you have no new messages. That's because Sup doesn't hasn't loaded
6
+ anything into its index yet, and has no idea where to look for them
7
+ anyways.
7
8
 
8
9
  If you want to play around a little at this point, you can press 'b'
9
10
  to cycle between buffers and 'x' to kill a buffer. There's probably
10
11
  not too much interesting there, but there's a log buffer with some
11
12
  cryptic messages. You can also press '?' at any point to get a list of
12
- keyboard commands, but in the absense of any email, these will be
13
+ keyboard commands, but in the absence of any email, these will be
13
14
  mostly useless. When you get bored, press 'q' to quit.
14
15
 
15
- I mentioned that Sup's index was empty. The index is where Sup stores
16
- all message state (e.g. read or unread, any message labels), and all
17
- information necessary for searching and for threading messages. Sup
18
- only knows about messages in its index, so we've got to add some to
19
- it.
20
-
21
- We add messages to the index by telling Sup about the source where the
22
- messages reside. Sources are things like imap folders, mbox folders,
23
- maildir directories, and gmail accounts (in the future). Sup doesn't
24
- duplicate the actual message content in the index. So when you search
25
- for messages or view your inbox, Sup talks only to the index (stored
26
- locally on disk). When you view a thread, Sup requests the full
27
- content of all the messages from the source.
16
+ To actually use Sup for email, we need to load messages into the
17
+ index. The index is where Sup stores all message state (e.g. read or
18
+ unread, any message labels), and all information necessary for
19
+ searching and for threading messages. Sup only knows about messages in
20
+ its index.
21
+
22
+ We can add messages to the index by telling Sup about the "source"
23
+ where the messages reside. Sources are things like IMAP folders, mbox
24
+ folders, maildir directories, and Gmail accounts (in the future). Sup
25
+ doesn't duplicate the actual message content in the index; it only
26
+ stores whatever information is necessary for searching, threading and
27
+ labelling. So when you search for messages or view your inbox, Sup
28
+ talks only to the index (stored locally on disk). When you view a
29
+ thread, Sup requests the full content of all the messages from the
30
+ source.
28
31
 
29
32
  The easiest way to set up all your sources is to run "sup-config".
30
33
  This will interactively walk you through some basic configuration,
31
34
  prompt you for all the sources you need, and optionally import
32
- messages from them.
35
+ messages from them. Sup-config uses two other tools, sup-add and
36
+ sup-sync, to load messages into the index. In the future you may make
37
+ use of these tools directly (see below).
33
38
 
34
- sup-config works by calling sup-add and sup-sync with the right
35
- arguments. If you have a non-trivial setup, you may need to run
36
- sup-add and sup-sync manually.
37
-
38
- You can manually add a source to Sup's source list by running
39
- 'sup-add' with a URI pointing to it. The URI should be of the form:
40
- - mbox://path/to/a/filename, for an mbox file on disk.
41
- - maildir://path/to/a/filename, for an maildir directory on disk.
42
- - imap://imap.server/folder for an unsecure IMAP folder.
43
- - imaps://secure.imap.server/folder for a secure IMAP folder.
44
- - mbox+ssh://remote.machine/path/to/a/filename for a remote mbox file.
45
-
46
- Before you add the source, you need make two decisions. The first is
47
- whether you want Sup to regularly poll this source for new
48
- messages. By default it will, but if this is a source that will never
49
- have new messages, you can specify --unusual. Sup polls only "usual"
50
- sources.
51
-
52
- The second is whether you want messages from the source to be
53
- automatically archived. An archived message will not show up in your
54
- inbox, but will be found when you search. (Your inbox in Sup is, by
55
- definition, the set of all all non-archived messages). Specify
56
- --archive to automatically archive all messages from the source. This
57
- is useful for sources that contain, for example, high-traffic mailing
58
- lists that you don't want polluting your inbox.
59
-
60
- If Sup requires account information, e.g. for IMAP servers and remote
61
- mbox files, sup-add will ask for it.
62
-
63
- Now that you've added the source, let's import all the current
64
- messages from it, by running sup-sync with the source URI. You can
65
- specify --archive to automatically archive all messages in this
66
- import; typically you'll want to specify this for every source you
67
- import except your actual inbox. You can also specify --read to mark
68
- all imported messages as read; the default is to preserve the
69
- read/unread status from the source.
70
-
71
- sup-sync will now load all the messages from the source into the
72
- index. Depending on the size of the source, this may take a
73
- while. Don't panic! It's a one-time process.
74
-
75
- Ok, now run 'sup'. You should see the most recent unarchived messages
76
- appear in your inbox. Congratulations, you've got Sup working!
39
+ Once you've run sup-config, you're ready to run 'sup'. You should see
40
+ the most recent unarchived messages appear in your inbox.
41
+ Congratulations, you've got Sup working!
77
42
 
78
43
  If you're coming from the world of traditional MUAs, there are a
79
44
  couple differences you should be aware of at this point. First, Sup
80
- does not use folders. Instead, you organize and find messages by a
45
+ has no folders. Instead, you organize and find messages by a
81
46
  combination of search and labels (knowns as 'tags' everywhere else in
82
- the world). I claim that 95% of the functionality of folders is
83
- superceded by a quick, easy-to-access, and powerful search mechanism,
84
- and the other 5% by labels. (The Sup philosophical treatise has a
47
+ the world). Search and labels are an integral part of Sup because in
48
+ Sup, rather than viewing the contents of a folder, you view the
49
+ results of a search. I mentioned above that your inbox is, by
50
+ definition, the set of all messages that aren't archived. This means
51
+ that your inbox is nothing more than the result of the search for all
52
+ messages with the label "inbox". (It's actually slightly more
53
+ complicated---we omit messages marked as killed, deleted or spam.)
54
+
55
+ You could replicate the folder paradigm easily under this scheme, by
56
+ giving each message exactly one label and only viewing the results of
57
+ simple searches for those labels. But you'd quickly find out that life
58
+ can be easier than that if you just trust the search engine, and use
59
+ labels judiciously for things that are too hard to find with search.
60
+ The idea is that a labeling system that allows arbitrary, user-defined
61
+ labels, supplemented by a quick and easy-to-access search mechanism
62
+ provides all the functionality that folders does, plus much more, at a
63
+ far lower cost to the user. (The Sup philosophical treatise has a
85
64
  little more on this.)
86
65
 
87
- Search and labels are an integral part of Sup because in Sup, rather
88
- than viewing the contents of a folder, you view the results of a
89
- search. I mentioned above that your inbox is, by definition, the set
90
- of all messages that aren't archived. This means that your inbox is,
91
- in fact, the result of the search for all messages with the label
92
- "inbox". (It's actually slightly more complicated---we omit killed,
93
- deleted and spam messages as well.)
94
-
95
- So you could replicate the folder paradigm easily under this scheme,
96
- by giving each message exactly one label and only viewing the results
97
- of simple searches for those labels. But you'd quickly find out that
98
- life can be easier than that if you just trust the search engine, and
99
- use labels judiciously for things that are too hard to find with
100
- search.
101
-
102
66
  Now let's take a look at your inbox. You'll see that Sup groups
103
67
  messages together into threads: each line in the inbox is a thread,
104
68
  and the number in parentheses is the number of messages in that
105
- thread. (If there's no number, there's just one message.) In Sup, most
106
- operations are on threads, not individual messages. The idea is that
107
- you rarely want to operate on a message independent of its context.
108
- You typically want to view, archive, kill, or label all the messages
109
- in a thread at one time.
69
+ thread. (If there's no number, there's just one message in the
70
+ thread.) In Sup, most operations are on threads, not individual
71
+ messages. The ideais that you rarely want to operate on a message
72
+ independent of its context. You typically want to view, archive, kill,
73
+ or label all the messages in a thread at one time.
110
74
 
111
75
  Use the up and down arrows to highlight a thread. ('j' and 'k' do the
112
- same thing, and 'J' and 'K' will scroll the whole window. Even the
76
+ same thing, and 'J' and 'K' will scroll the whole window. Even the
113
77
  left and right arrow keys work.) By default, Sup only loads as many
114
78
  threads as it takes to fill the window; if you'd like to load more,
115
79
  press 'M'. You can hit tab to cycle between only threads with new
116
80
  messages.
117
81
 
118
82
  Highlight a thread and press enter to view it. You'll notice that all
119
- messages in the thread are displayed together, layed out graphically
120
- by their relationship to each other (replies are nested under
121
- parents). By default, only the new messages in a thread are expanded,
122
- and the others are hidden. You can toggle an individual message's
123
- state by highlighting a green line and pressing enter. You can use 'E'
124
- to expand or collapse all messages or 'N' to expand only the new
83
+ messages in the thread are displayed together, laid out graphically by
84
+ their relationship to each other (replies are nested under parents).
85
+ By default, only the new messages in a thread are expanded, and the
86
+ others are hidden. You can toggle an individual message's state by
87
+ highlighting a green line and pressing enter. You can use 'E' to
88
+ expand or collapse all messages or 'N' to expand only the new
125
89
  messages. You'll also notice that Sup hides quoted text and
126
90
  signatures. If you highlight a particular hidden chunk, you can press
127
91
  enter to expand it, or you can press 'o' to toggle every hidden chunk
128
- in a particular message. (You can hit '?' to see the full list of
129
- keyboard commands at any point.)
92
+ in a particular message. (Remember, you can hit '?' to see the full
93
+ list of keyboard commands at any point.)
130
94
 
131
95
  A few other useful commands while viewing a thread. Press 'd' to
132
- toggle a detailed header fpr a message. If you've scrolled too far to
96
+ toggle a detailed header for a message. If you've scrolled too far to
133
97
  the right, press '[' to jump all the way to the left. Finally, you can
134
- press 'n' and 'p' to jump forward and backward between open
135
- messages, aligning the display as necessary.
98
+ press 'n' and 'p' to jump forward and backward between open messages,
99
+ aligning the display as necessary.
136
100
 
137
101
  Now press 'x' to kill the thread view buffer. You should see the inbox
138
102
  again. If you don't, you can cycle through the buffers by pressing
@@ -148,14 +112,14 @@ even if people reply, but will still be searchable. (This is useful
148
112
  for those interminable threads that you really have no interest in,
149
113
  but which seem to pop up on every mailing list.)
150
114
 
151
- If a thread is spam, press 'S'. It will disappear and won't come
152
- back. It won't even appear in search results (unless you explicitly
153
- search for spam.)
115
+ If a thread is spam, press 'S'. It will disappear and won't come back.
116
+ It won't even appear in search results, unless you explicitly search
117
+ for spam.
154
118
 
155
- You can also star a thread by pressing '*'. Starred threads are
156
- displayed with a little yellow asterix next to them, but otherwise
157
- have no special semantics. (But you can also search for them
158
- easily---we'll see how in a moment).
119
+ You can star a thread by pressing '*'. Starred threads are displayed
120
+ with a little yellow asterisk next to them, but otherwise have no
121
+ special semantics. But you can also search for them easily---we'll see
122
+ how in a moment.
159
123
 
160
124
  To edit the labels for (all the messages in) a thread, press 'l'. Type
161
125
  in the labels as a sequence of space-separated words. To cancel the
@@ -166,10 +130,11 @@ Many of these operations can be applied to a group of threads. Press
166
130
  command to the set of threads. ';t', of course, will untag all tagged
167
131
  messages.
168
132
 
169
- Ok, let's try using labels and search. Press 'L' to bring up a list of
170
- all the labels you've ever used, along with some special labels
171
- (Draft, Starred, Sent, Spam, etc.). Highlight a label and press enter
172
- to view all the messages with that label.
133
+ Ok, let's try using labels and search. Press 'L' to do a quick label
134
+ search. You'll be prompted for a label; simply hit enter to bring up
135
+ scrollable list of all the labels you've ever used, along with some
136
+ special labels (Draft, Starred, Sent, Spam, etc.). Highlight a label
137
+ and press enter to view all the messages with that label.
173
138
 
174
139
  What you just did was actually a specific search. For a general
175
140
  search, press "/". Now type in your query (again, Ctrl-G to cancel at
@@ -181,11 +146,10 @@ you can make use of the full Ferret query syntax:
181
146
  - Queries against a particular field using <field name>:<query>,
182
147
  e.g.: label:ruby-talk, or from:matz@ruby-lang.org. (Fields include:
183
148
  body, from, to, and subject.)
184
- - Force occurrence and non-occurrence using + and -, e.g. +label:spam,
185
- or -body:"hot soup"
149
+ - Force non-occurrence by -, e.g. -body:"hot soup"
186
150
 
187
151
  You can combine those all together. For example:
188
- +label:ruby-talk +subject:\[ANN\] -rails
152
+ label:ruby-talk subject:\[ANN\] -rails
189
153
 
190
154
  Play around with the search, and see the Ferret documentation for
191
155
  details on more sophisticated queries (date ranges, "within n words",
@@ -204,18 +168,17 @@ can figure out how to:
204
168
  - Star an individual message, not just a thread
205
169
 
206
170
  There's one last thing to be aware of when using Sup: how it interacts
207
- with other email programs. Sup stores data about messages in the
208
- index, but doesn't duplicate the message contents themselves. The
209
- messages remain on the source. If the index and the source every fall
210
- out of sync, e.g. due to another email client modifying the source,
211
- then Sup will be unable to operate on that source.
212
-
213
- For example, for mbox files, Sup stores a byte offset into the file
214
- for each message. If a message deleted from that file by another
215
- client, or even marked as read (yeah, mbox sucks), all succeeding
216
- offsets will be wrong.
217
-
218
- That's the bad news. The good news is that Sup is fairly good at being
171
+ with other email programs. As I described at the beginning of the
172
+ document, Sup stores data about messages in the index, but doesn't
173
+ duplicate the message contents themselves. The messages remain on the
174
+ source. If the index and the source every fall out of sync, e.g. due
175
+ to another email client modifying the source, then Sup will be unable
176
+ to operate on that source. For example, for mbox files, Sup stores a
177
+ byte offset into the file for each message. If a message deleted from
178
+ that file by another client, or even marked as read (yeah, mbox
179
+ sucks), all succeeding offsets will be wrong.
180
+
181
+ That's the bad news. The good news is that Sup is pretty good at being
219
182
  able to detect this type of situation, and fixing it is just a matter
220
183
  of running sup-sync --changed on the source. Sup will even tell you
221
184
  how to invoke sup-sync when it detects a problem. This is a
@@ -223,3 +186,60 @@ complication you will almost certainly run in to if you use both Sup
223
186
  and another MUA on the same source, so it's good to be aware of it.
224
187
 
225
188
  Have fun, and let me know if you have any problems. --William
189
+
190
+ Appending A: sup-add and sup-sync
191
+ ---------------------------------
192
+
193
+ Instead of using sup-config to add a new source, you can manually run
194
+ 'sup-add' with a URI pointing to it. The URI should be of the form:
195
+ - mbox://path/to/a/filename, for an mbox file on disk.
196
+ - maildir://path/to/a/filename, for a maildir directory on disk.
197
+ - imap://imap.server/folder for an unsecure IMAP folder.
198
+ - imaps://secure.imap.server/folder for a secure IMAP folder.
199
+ - mbox+ssh://remote.machine/path/to/a/filename for a remote mbox file.
200
+
201
+ Before you add the source, you need make three decisions. The first is
202
+ whether you want Sup to regularly poll this source for new messages.
203
+ By default it will, but if this is a source that will never have new
204
+ messages, you can specify --unusual. Sup polls only "usual" sources.
205
+
206
+ The second is whether you want messages from the source to be
207
+ automatically archived. An archived message will not show up in your
208
+ inbox, but will be found when you search. (Your inbox in Sup is, by
209
+ definition, the set of all all non-archived messages). Specify
210
+ --archive to automatically archive all messages from the source. This
211
+ is useful for sources that contain, for example, high-traffic mailing
212
+ lists that you don't want polluting your inbox.
213
+
214
+ The final decision is whether you want any labels automatically
215
+ applied to messages from this source. You can use --labels to do this.
216
+
217
+ If Sup requires account information, e.g. for IMAP servers and remote
218
+ mbox files, sup-add will ask for it.
219
+
220
+ Now that you've added the source, let's import all the current
221
+ messages from it, by running sup-sync with the source URI. You can
222
+ specify --archive to automatically archive all messages in this
223
+ import; typically you'll want to specify this for every source you
224
+ import except your actual inbox. You can also specify --read to mark
225
+ all imported messages as read; the default is to preserve the
226
+ read/unread status from the source.
227
+
228
+ sup-sync will now load all the messages from the source into the
229
+ index. Depending on the size of the source, this may take a while.
230
+ Don't panic! It's a one-time process.
231
+
232
+ Appending B: Handling high-volume mailing lists
233
+ -----------------------------------------------
234
+
235
+ Here's what I recommend:
236
+ 1. Use procmail to filter messages from the list into a distinct source.
237
+ 2. Add that source to Sup as a usual source with auto-archive turned
238
+ on, and with a label corresponding to the mailing list name.
239
+ (E.g.: sup-add mbox:/home/me/Mail/ruby-talk -a -l ruby-talk)
240
+ 3. Voila! Sup will load new messages into the index but not into the
241
+ inbox, and you can browse the mailing list traffice at any point by
242
+ searching for that label.
243
+
244
+
245
+