vmail 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -171,8 +171,8 @@ You can add a `cc:` and `bcc:` field if you want.
171
171
 
172
172
 
173
173
  When you fill in the recipient addresses, you can use vim autocompletion if you
174
- generated a `vmail-contacts.txt` file. Start typing a name or email address, then press `C-x C-u`
175
- to invoke autocompletion.
174
+ generated a `vmail-contacts.txt` file. Start typing a name or email address,
175
+ then press `C-x C-u` to invoke autocompletion.
176
176
 
177
177
  Tip: Use `C-y` instead of ENTER to select a match. This will prevent you from
178
178
  creating a blank line in the middle of the email headers.
@@ -187,8 +187,22 @@ blank line between the headers and the body of your message.
187
187
 
188
188
  When you're done writing, send the message by typing `,vs` in normal mode.
189
189
 
190
- You can save the message as a draft in your draft mailbox by typing `,vd` in
191
- normal mode.
190
+ In this early version of vmail, saving and resuming draft emails is a bit
191
+ clunky. But it works.
192
+
193
+ While you're composing a message in the composition window, you can save a
194
+ draft to a local file the standard vim `w` command with a filename argument:
195
+
196
+ :w my_draft_filename.txt
197
+
198
+ Make sure you don't use `:wq` unless you mean to quit vmail immediately. After
199
+ you save the draft to a file, you can go back to the message list by typing `q`
200
+ in normal mode.
201
+
202
+ To resume writing the draft later, type `,c` to open a message composition
203
+ window, delete all its contents, and then type `:r my_draft_filename.txt` to
204
+ load the draft email into the buffer. Make sure you delete any blank lines that
205
+ are created above the header. Resume editing. Send by typing `,vs`.
192
206
 
193
207
  At any point, you can quit the composition window by typing `q` in normal mode.
194
208
 
@@ -420,13 +420,21 @@ EOF
420
420
 
421
421
  def save_draft(text)
422
422
  mail = new_mail_from_input(text)
423
- log mail.to_s
423
+ log "saving draft"
424
424
  reconnect_if_necessary do
425
425
  log "saving draft"
426
426
  log @imap.append("[Gmail]/Drafts", text.gsub(/\n/, "\r\n"), [:Seen], Time.now)
427
427
  end
428
428
  end
429
429
 
430
+ # TODO
431
+ def resume_draft
432
+ # chop off top three lines (this is hackey, fix later)
433
+ # text = text.split("\n")[3..-1].join("\n")
434
+ # delete date: field
435
+ # text = text.sub("^date:\s*$", "")
436
+ end
437
+
430
438
  def new_mail_from_input(text)
431
439
  require 'mail'
432
440
  mail = Mail.new
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -3,10 +3,10 @@
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
5
  <title>Vmail</title>
6
- <link href="stylesheets-vmail/reset.css?1292349581" media="screen" rel="stylesheet" type="text/css" />
7
- <link href="stylesheets-vmail/960.css?1292349581" media="screen" rel="stylesheet" type="text/css" />
8
- <link href="stylesheets-vmail/text.css?1292349581" media="screen" rel="stylesheet" type="text/css" />
9
- <link href="stylesheets-vmail/site.css?1292349581" media="screen" rel="stylesheet" type="text/css" />
6
+ <link href="stylesheets-vmail/reset.css?1292352305" media="screen" rel="stylesheet" type="text/css" />
7
+ <link href="stylesheets-vmail/960.css?1292352305" media="screen" rel="stylesheet" type="text/css" />
8
+ <link href="stylesheets-vmail/text.css?1292352305" media="screen" rel="stylesheet" type="text/css" />
9
+ <link href="stylesheets-vmail/site.css?1292352305" media="screen" rel="stylesheet" type="text/css" />
10
10
  <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'8579b5f8-0860-4ea6-9ef1-6f0f58359a99'});</script>
11
11
  <script type="text/javascript" src="lightbox2/js/prototype.js"></script>
12
12
  <script type="text/javascript" src="lightbox2/js/scriptaculous.js?load=effects,builder"></script>
@@ -206,8 +206,8 @@ You're responsible for fill in the <code>to:</code> and the <code>subject:</code
206
206
  You can add a <code>cc:</code> and <code>bcc:</code> field if you want.</p>
207
207
 
208
208
  <p>When you fill in the recipient addresses, you can use vim autocompletion if you
209
- generated a <code>vmail-contacts.txt</code> file. Start typing a name or email address, then press <code>C-x C-u</code>
210
- to invoke autocompletion.</p>
209
+ generated a <code>vmail-contacts.txt</code> file. Start typing a name or email address,
210
+ then press <code>C-x C-u</code> to invoke autocompletion.</p>
211
211
 
212
212
  <p>Tip: Use <code>C-y</code> instead of ENTER to select a match. This will prevent you from
213
213
  creating a blank line in the middle of the email headers.</p>
@@ -222,8 +222,23 @@ blank line between the headers and the body of your message.</p>
222
222
 
223
223
  <p>When you're done writing, send the message by typing <code>,vs</code> in normal mode.</p>
224
224
 
225
- <p>You can save the message as a draft in your draft mailbox by typing <code>,vd</code> in
226
- normal mode.</p>
225
+ <p>In this early version of vmail, saving and resuming draft emails is a bit
226
+ clunky. But it works.</p>
227
+
228
+ <p>While you're composing a message in the composition window, you can save a
229
+ draft to a local file the standard vim <code>w</code> command with a filename argument:</p>
230
+
231
+ <pre><code>:w my_draft_filename.txt
232
+ </code></pre>
233
+
234
+ <p>Make sure you don't use <code>:wq</code> unless you mean to quit vmail immediately. After
235
+ you save the draft to a file, you can go back to the message list by typing <code>q</code>
236
+ in normal mode.</p>
237
+
238
+ <p>To resume writing the draft later, type <code>,c</code> to open a message composition
239
+ window, delete all its contents, and then type <code>:r my_draft_filename.txt</code> to
240
+ load the draft email into the buffer. Make sure you delete any blank lines that
241
+ are created above the header. Resume editing. Send by typing <code>,vs</code>.</p>
227
242
 
228
243
  <p>At any point, you can quit the composition window by typing <code>q</code> in normal mode.</p>
229
244
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 8
9
- version: 0.0.8
8
+ - 9
9
+ version: 0.0.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi