]> git.cworth.org Git - sup/blob - doc/NewUserGuide.txt
fix broken merge
[sup] / doc / NewUserGuide.txt
1 Welcome to Sup! Here's how to get started.
2
3 First, try running `sup`. Since 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 hasn't loaded
6 anything into its index yet, and has no idea where to look for them
7 anyways.
8
9 If you want to play around a little at this point, you can press 'b'
10 to cycle between buffers, ';' to get a list of the open buffers, and
11 'x' to kill a buffer. There's probably not too much interesting there,
12 but there's a log buffer with some cryptic messages. You can also
13 press '?' at any point to get a list of keyboard commands, but in the
14 absence of any email, these will be mostly useless. When you get
15 bored, press 'q' to quit.
16
17 To use Sup for email, we need to load messages into the index. The
18 index is where Sup stores all message state (e.g. read or unread, any
19 message labels), and all information necessary for searching and for
20 threading messages. Sup only knows about messages in 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, and maildir directories. Sup doesn't duplicate the actual
25 message content in the index; it only stores whatever information is
26 necessary for searching, threading and labelling. So when you search
27 for messages or view your inbox, Sup talks only to the index (stored
28 locally on disk). When you view a thread, Sup requests the full
29 content of all the messages from the source.
30
31 The easiest way to set up all your sources is to run `sup-config`.
32 This will interactively walk you through some basic configuration,
33 prompt you for all the sources you need, and optionally import
34 messages from them.  Sup-config uses two other tools, sup-add and
35 sup-sync, to load messages into the index. In the future you may make
36 use of these tools directly (see below).
37
38 Once you've run sup-config, you're ready to run `sup`. You should see
39 the most recent unarchived messages appear in your inbox.
40 Congratulations, you've got Sup working!
41
42 If you're coming from the world of traditional MUAs, there are a
43 couple differences you should be aware of at this point. First, Sup
44 has no folders. Instead, you organize and find messages by a
45 combination of search and labels (known as "tags" everywhere else in
46 the world). Search and labels are an integral part of Sup because in
47 Sup, rather than viewing the contents of a folder, you view the
48 results of a search. I mentioned above that your inbox is, by
49 definition, the set of all messages that aren't archived. This means
50 that your inbox is nothing more than the result of the search for all
51 messages with the label "inbox". (It's actually slightly more
52 complicated---we also omit messages marked as killed, deleted or
53 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.
64
65 Now let's take a look at your inbox. You'll see that Sup groups
66 messages together into threads: each line in the inbox is a thread,
67 and the number in parentheses is the number of messages in that
68 thread. (If there's no number, there's just one message in the
69 thread.) In Sup, most operations are on threads, not individual
70 messages. The idea is that you rarely want to operate on a message
71 independent of its context. You typically want to view, archive, kill,
72 or label all the messages in a thread at one time.
73
74 Use the up and down arrows to highlight a thread. ('j' and 'k' do the
75 same thing, and 'J' and 'K' will scroll the whole window. Even the
76 left and right arrow keys work.) By default, Sup only loads as many
77 threads as it takes to fill the window; if you'd like to load more,
78 press 'M'. You can hit tab to cycle between only threads with new
79 messages.
80
81 Highlight a thread and press enter to view it. You'll notice that all
82 messages in the thread are displayed together, laid out graphically by
83 their relationship to each other (replies are nested under parents).
84 By default, only the new messages in a thread are expanded, and the
85 others are hidden. You can toggle an individual message's state by
86 highlighting a green line and pressing enter. You can use 'E' to
87 expand or collapse all messages or 'N' to expand only the new
88 messages. You'll also notice that Sup hides quoted text and
89 signatures. If you highlight a particular hidden chunk, you can press
90 enter to expand it, or you can press 'o' to toggle every hidden chunk
91 in a particular message.
92
93 Other useful keyboard commands when viewing a thread are: 'n' and 'p'
94 to jump to the next and previous open messages, 'h' to toggle the
95 detailed headers for the current message, and enter to expand or
96 collapse the current message (when it's on a text region). Enter and
97 'n' in combination are useful for scanning through a thread---press
98 enter to close the current message and jump to the next open one, and
99 'n' to keep it open and jump. If the buffer is misaligned with a
100 message, you can press 'z' to highlight it.
101
102 This is a lot to remember, but you can always hit '?' to see the full
103 list of keyboard commands at any point. There's a lot of useful stuff
104 in there---once you learn some, try out some of the others!
105
106 Now press 'x' to kill the thread view buffer. You should see the inbox
107 again. If you don't, you can cycle through the buffers by pressing
108 'b', or you can press ';' to see a list of all buffers and simply
109 select the inbox.
110
111 There are many operations you can perform on threads beyond viewing
112 them. To archive a thread, press 'a'. The thread will disappear from
113 your inbox, but will still appear in search results. If someone
114 replies an archived thread, it will reappear in your inbox. To kill a
115 thread, press '&'. Killed threads will never come back to your inbox,
116 even if people reply, but will still be searchable. (This is useful
117 for those interminable threads that you really have no immediate
118 interest in, but which seem to pop up on every mailing list.)
119
120 If a thread is spam, press 'S'. It will disappear and won't come back.
121 It won't even appear in search results, unless you explicitly search
122 for spam.
123
124 You can star a thread by pressing '*'. Starred threads are displayed
125 with a little yellow asterisk next to them, but otherwise have no
126 special semantics. But you can also search for them easily---we'll see
127 how in a moment.
128
129 To edit the labels for (all the messages in) a thread, press 'l'. Type
130 in the labels as a sequence of space-separated words. To cancel the
131 input, press Ctrl-G.
132
133 Many of these operations can be applied to a group of threads. Press
134 't' to tag a thread. Tag a couple, then press '=' to apply the next
135 command to the set of threads. '=t', of course, will untag all tagged
136 messages.
137
138 Ok, let's try using labels and search. Press 'L' to do a quick label
139 search. You'll be prompted for a label; simply hit enter to bring up
140 scrollable list of all the labels you've ever used, along with some
141 special labels (Draft, Starred, Sent, Spam, etc.). Highlight a label
142 and press enter to view all the messages with that label.
143
144 What you just did was actually a specific search. For a general search,
145 press '\' (backslash---forward slash is used for in-buffer search,
146 following console conventions). Now type in your query (again, Ctrl-G to
147 cancel at any point.) You can just type in arbitrary text, which will be
148 matched on a per-word basis against the bodies of all email in the
149 index, or you can make use of the full Ferret query syntax:
150
151 - Phrasal queries using double-quotes, e.g.: "three contiguous words"
152 - Queries against a particular field using <field name>:<query>,
153   e.g.: label:ruby-talk, or from:matz@ruby-lang.org. (Fields include:
154   body, from, to, and subject.)
155 - Force non-occurrence by -, e.g. -body:"hot soup".
156 - If you have the chronic gem installed, date queries like
157   "before:today", "on:today", "after:yesterday", "after:(2 days ago)"
158   (parentheses required for multi-word descriptions).
159
160 You can combine those all together. For example:
161      label:ruby-talk subject:\[ANN\] -rails on:today
162
163 Play around with the search, and see the Ferret documentation for
164 details on more sophisticated queries (date ranges, "within n words",
165 etc.)
166
167 At this point, you're well on your way to figuring out all the cool
168 things Sup can do. By repeated application of the '?' key, see if you
169 can figure out how to:
170  - List some recent contacts
171  - Easily search for all mail from a recent contact
172  - Easily search for all mail from several recent contacts
173  - Add someone to your address book
174  - Postpone a message (i.e., save a draft)
175  - Quickly re-edit a just-saved draft message
176  - View the raw header of a message
177  - Star an individual message, not just a thread
178
179 There's one last thing to be aware of when using Sup: how it interacts
180 with other email programs. As I described above, Sup stores data about
181 messages in the index, but doesn't duplicate the message contents
182 themselves. The messages remain on the source. If the index and the
183 source every fall out of sync, e.g. due to another email client
184 modifying the source, then Sup will be unable to operate on that
185 source. For example, for mbox files, Sup stores a byte offset into the
186 file for each message. If a message deleted from that file by another
187 client, or even marked as read (yeah, mbox sucks), all succeeding
188 offsets will be wrong.
189
190 That's the bad news. The good news is that Sup is pretty good at being
191 able to detect this type of situation, and fixing it is just a matter
192 of running `sup-sync --changed` on the source. Sup will even tell you
193 how to invoke sup-sync when it detects a problem. This is a
194 complication you will almost certainly run in to if you use both Sup
195 and another MUA on the same source, so it's good to be aware of it.
196
197 Have fun, and email sup-talk@rubyforge.org if you have any problems!
198
199 Appendix A: sup-add and sup-sync
200 ---------------------------------
201
202 Instead of using sup-config to add a new source, you can manually run
203 `sup-add` with a URI pointing to it. The URI should be of the form:
204 - mbox://path/to/a/filename, for an mbox file on disk.
205 - maildir://path/to/a/filename, for a maildir directory on disk.
206 - imap://imap.server/folder for an unsecure IMAP folder.
207 - imaps://secure.imap.server/folder for a secure IMAP folder.
208 - mbox+ssh://remote.machine/path/to/a/filename for a remote mbox file.
209
210 Before you add the source, you need make three decisions. The first is
211 whether you want Sup to regularly poll this source for new messages.
212 By default it will, but if this is a source that will never have new
213 messages, you can specify --unusual. Sup polls only "usual" sources
214 when checking for new mail (unless you manually invoke sup-sync).
215
216 The second is whether you want messages from the source to be
217 automatically archived. An archived message will not show up in your
218 inbox, but will be found when you search. (Your inbox in Sup is, by
219 definition, the set of all all non-archived messages). Specify
220 --archive to automatically archive all messages from the source. This
221 is useful for sources that contain, for example, high-traffic mailing
222 lists that you don't want polluting your inbox.
223
224 The final decision is whether you want any labels automatically
225 applied to messages from this source. You can use --labels to do this.
226
227 If Sup requires account information, e.g. for IMAP servers and remote
228 mbox files, sup-add will ask for it.
229
230 Now that you've added the source, let's import all the current
231 messages from it, by running sup-sync with the source URI. You can
232 specify --archive to automatically archive all messages in this
233 import; typically you'll want to specify this for every source you
234 import except your actual inbox. You can also specify --read to mark
235 all imported messages as read; the default is to preserve the
236 read/unread status from the source.
237
238 Sup-sync will now load all the messages from the source into the
239 index. Depending on the size of the source, this may take a while.
240 Don't panic! It's a one-time process.
241
242 Appendix B: Automatically labeling incoming email
243 -------------------------------------------------
244
245 One option is to filter incoming email into different sources with
246 something like procmail, and have each of these sources auto-apply
247 labels by using sup-add --labels.
248
249 But the better option is to learn Ruby and write a before-add hook.
250 This will allow you to apply labels based on whatever crazy logic you
251 can come up with. See http://sup.rubyforge.org/wiki/wiki.pl?Hooks for
252 examples.
253
254 Appendix C: Reading blogs with Sup
255 ----------------------------------
256
257 Really, blog posts should be read like emails are read---you should be
258 able to mark them as unread, flag them, label them, etc. Use rss2email
259 to transform RSS feeds into emails, direct them all into a source, and
260 add that source to Sup. Voila!