]> git.cworth.org Git - sup/blob - doc/UserGuide.txt
4be2c3633db09804d6b4e9a1aefaf6b508a72567
[sup] / doc / UserGuide.txt
1 Welcome to Sup! Here's how to actually use it.
2
3 First, try running 'sup'. Assuming this is your first time, you'll be
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.
7
8 If you want to play around a little at this point, you can press 'b'
9 to cycle between buffers and 'x' to kill a buffer. There's probably
10 not too much interesting there, but there's a log buffer with some
11 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 mostly useless. When you're bored, press 'q' to quit.
14
15 We need to add some messages to Sup. In order for Sup to know about a
16 message, it must be in the index. In order for Sup to load a message
17 into the index, it must know about the "source" in which it
18 resides. Sup stores all information necessary for search, and all
19 state we have about a message, in the index, but doesn't duplicate the
20 actual contents of the message itself. So when you search for messages
21 or view your inbox, Sup just talks to the index (stored locally on
22 disk), but when you view a message, Sup must request it from the
23 source.
24
25 So let's tell Sup about some sources. Run 'sup-import' with a URI
26 pointing to an email source. The URI should be of the form:
27 - mbox://path/to/a/filename, for an mbox file on disk. (You can also
28   just provide the filename).
29 - imap://imap.server/folder or imaps://secure.imap.server/folder for
30   an IMAP folder. (Leave the folder blank for INBOX.)
31 - mbox+ssh://remote.machine/path/to/a/filename for a remote mbox file.
32
33 Before you actually import messages, you need to decide whether you
34 want them to be archived or not. An archived message will not show up
35 in your inbox. (Your inbox in Sup is, by definition, the set of all
36 all non-archived messages). If you specify --force-archive, messages
37 imported at *this* time will be archived, but new messages will go to
38 your inbox. If you specify --archive, messages imported at *any* time
39 will be automatically archived. (This is useful for sources that
40 contain high-traffic mailing lists that you don't want "polluting"
41 your inbox.)
42
43 Typically you'll want to specify --archive for every source you import
44 except your actual inbox. You can also force all messages to be marked
45 as read; run sup-import --help for details. The default is to preserve
46 the read/unread status from the source.
47
48 Now run sup-import to add the source. If it requires a username and
49 password for the source, it will prompt you. Either way, it will add
50 the sources to Sup, and immediately start loading messages from them
51 into the index. Depending on the size of the source, this may take a
52 while. Don't panic! It's a one-time process.
53
54 Now, before we run 'sup' again, take a moment to edit your
55 ~/.sup/config.yaml file. Replace "Your Name Here" with your name,
56 "your.email.here@domain.tld" with your email address, and fill in your
57 .signature file if you choose. You can also set the default editor.
58
59 We're finally ready to run 'sup'. You should see the most recent
60 loaded messages appear in your inbox. Congratulations, you've got Sup
61 working!
62
63 If you're coming from the world of traditional email, there are a
64 couple differences you should be aware of at this point. First, Sup
65 does not use folders. Instead, you organize and find messages by a
66 combination of search and labels (knowns as 'tags' everywhere else in
67 the world). I like to say that 95% of the functionality of folders is
68 superceded by a quick, easy-to-access, and powerful search mechanism,
69 and the other 5% by labels. (The Sup statement of philosophy has a
70 little more on this.)
71
72 Search and labels are an integral part of Sup because in Sup, rather
73 than viewing the contents of a folder, you view the results of a
74 search. I mentioned above that your inbox is, by definition, the set
75 of all messages that aren't archived. This means that your inbox is,
76 in fact, the result of the search for all messages with the label
77 "inbox". (It's actually slightly more complicated---we omit killed,
78 deleted and spam messages as well.)
79
80 So you could replicate the folder paradigm easily under this scheme,
81 by giving each message exactly one label and only viewing the results
82 of simple searches for those labels. But you'd quickly find out that
83 life can be easier than that if you just trust the search engine, and
84 use labels judiciously for things that are too hard to find with
85 search.
86
87 But enough chit-chat! Let's take a look at your inbox. You'll see that
88 Sup groups messages together into threads: each line in the inbox is a
89 thread, and the number in parentheses is the number of messages in
90 that thread. (If there's no number in parens, it means there's just
91 one message.) In Sup, you rarely operate on an individual message. The
92 idea is that you rarely want to operate on a message independent of
93 its context; you typically want to view, archive, kill, or label all
94 the messages in a thread at one time.
95
96 Use the up and down arrows to highlight a thread. ('j' and 'k' do the
97 same thing, and 'J' and 'K' will scroll the whole window.  Even the
98 left and right arrow keys work!) By default, Sup only loads as many
99 threads as it takes to fill the window; if you'd like to load more,
100 press 'M'. You can hit tab to cycle between only threads with new
101 messages.
102
103 Highlight a thread and press enter to view it. You'll notice that all
104 messages in the thread are displayed together, layed out graphically
105 by their relationship to each other (replies are nested under
106 parents). By default, only the new messages in a thread are expanded,
107 and the others are hidden. You can toggle an individual message's
108 state by highlighting a green line and pressing enter. You can use 'E'
109 to expand or collapse all messages or 'N' to expand only the new
110 messages. You'll also notice that Sup hides quoted text and
111 signatures. If you highlight a particular hidden chunk, you can press
112 enter to expand it, or you can press 'o' to toggle every hidden chunk
113 in a particular message. (Don't worry about remembering all these
114 things---you can hit '?' to see the full list of keyboard commands at
115 any point.)
116
117 A few other useful commands while viewing a thread. Press 'd' to
118 toggle a detailed header fpr a message. If you've scrolled too far to
119 the right, press '[' to jump all the way to the left. Finally, you can
120 press 'n' and 'p' to jump forward and backward between open
121 messages. (I find that very useful!)
122
123 Now press 'x' to kill the thread view buffer. You should see the inbox
124 again. If you don't, you can cycle through the buffers by pressing
125 'b', or you can press 'A' to see a list of all buffers and simply
126 select the inbox.
127
128 There are many operations you can perform on threads beyond viewing
129 them. To archive a thread, press 'a'. The thread will disappear from
130 your inbox, but will still appear in search results. If someone
131 replies an archived thread, it will reappear in your inbox. To kill a
132 thread, press '&'. Killed threads will never come back to your inbox,
133 even if people reply, but will still be searchable. (This is useful
134 for those interminable threads that you really have no interest in,
135 but which seem to pop up on every mailing list.)
136
137 If a thread is spam, press 'S'. It will disappear and won't come
138 back. It won't even appear in search results (unless you explicitly
139 search for spam.)
140
141 You can also star a thread by pressing '*'. Starred threads are
142 displayed with a little yellow asterix next to them, but otherwise
143 have no special semantics. (But you can also search for them
144 easily---we'll see how in a moment).
145
146 To edit the labels for (all the messages in) a thread, press 'l'. Type
147 in the labels as a sequence of space-separated words. To cancel the
148 input, press Ctrl-G.
149
150 Many of these operations can be applied to a group of threads. Press
151 't' to tag a thread. Tag a couple, then press ';' to apply the next
152 command to the set of threads. ';t', of course, will untag all tagged
153 messages.
154
155 Ok, let's try using labels and search. Press 'L' to bring up a list of
156 all the labels you've ever used, along with some special labels
157 (Draft, Starred, Sent, Spam, etc.). Highlight a label and press enter
158 to view all the messages with that label.
159
160 What you just did was actually a specific search. For a general
161 search, press "/". Now type in your query (again, Ctrl-G to cancel at
162 any point.) You can just type in arbitrary text, which will be matched
163 on a per-word basis against the bodies of all email in the index, or
164 you can make use of the full Ferret query syntax:
165
166 - Phrasal queries using double-quotes, e.g.: "three contiguous words"
167 - Queries against a particular field using <field name>:<query>,
168   e.g.: label:ruby-talk, or from:matz@ruby-lang.org. (Fields include:
169   body, from, to, and subject.)
170 - Force occurrence and non-occurrence using + and -, e.g. +label:spam,
171   or -body:"hot soup"
172
173 You can combine those all together. For example:
174      +label:ruby-talk +subject:\[ANN\] -rails
175
176 Play around with the search, and see the Ferret documentation for
177 details on more sophisticated queries (date ranges, "within n words",
178 etc.)
179
180 At this point, you're well on your way to figuring out all the cool
181 things Sup can do. By repeated applications of the '?' key, see if you
182 can figure out how to:
183  - List some recent contacts
184  - Easily search for all mail from a recent contact
185  - Easily search for all mail from several recent contacts!
186  - Add someone to your address book
187  - Postpone a message (i.e., save a draft)
188  - Quickly re-edit a just-saved draft message
189  - View the raw header of a message
190  - Star an individual message, not just a thread
191
192 There's one last thing to be aware of when using Sup: how it interacts
193 with other email programs. Sup stores data about messages in the
194 index---information necessary for searching, and message state---but
195 doesn't duplicate the message contents themselves. The messages remain
196 on the source. If the index and the source every fall out of sync,
197 e.g. due to another email client modifying the source, then Sup will
198 be unable to operate on that source.
199
200 For example, for mbox files, Sup stores a byte offset into the file
201 for each message. If a message deleted from that file by another
202 client, or even marked as read (yeah, mbox sucks), all succeeding
203 offsets will be wrong.
204
205 That's the bad news. The good news is that Sup is fairly good at being
206 able to detect this type of situation, and fixing it is just a matter
207 of running sup-import --rebuild on the source. Sup will even tell you
208 how to invoke sup-import when it detects a problem. This is a
209 complication you will almost certainly run in to if you use both Sup
210 and another MUA on the same source, so it's good to be aware of it.
211
212 Have fun, and let me know if you have any problems. --William