vmail 0.1.9 → 0.2.0

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.
data/NOTES CHANGED
@@ -552,4 +552,10 @@ imap.search ["HEADER", "MESSAGE-ID", "<757FC46C-9394-494E-91B4-B051F48419DA@prx.
552
552
  " trying to make user defined commands that work from : prompt
553
553
  " command -buffer -range VmailDelete call s:toggle_star("Deleted")
554
554
  " command -buffer -range VmailStar call s:toggle_star("Flagged")
555
+ ------------------------------------------------------------------------
556
+ Tue Dec 14 23:06:41 EST 2010
557
+
558
+ todo
555
559
 
560
+ - one particular email don't send
561
+ - from f rojas. see why it fails silently
@@ -273,7 +273,7 @@ func! s:archive_messages() range
273
273
  let lnum = lnum + 1
274
274
  endwhile
275
275
  let uid_set = join(uids, ",")
276
- let command = s:move_to_command . uid_set . ' ' . shellescape("[Gmail]/All Mail")
276
+ let command = s:move_to_command . uid_set . ' ' . "all"
277
277
  echo "archiving message" . (len(uids) == 1 ? '' : 's')
278
278
  let res = system(command)
279
279
  setlocal modifiable
@@ -75,6 +75,14 @@ module Vmail
75
75
  @mailboxes.join("\n")
76
76
  end
77
77
 
78
+ # called internally, not by vim client
79
+ def mailboxes
80
+ if @mailboxes.nil?
81
+ list_mailboxes
82
+ end
83
+ @mailboxes
84
+ end
85
+
78
86
  def fetch_headers(uid_set)
79
87
  if uid_set.is_a?(String)
80
88
  uid_set = uid_set.split(",").map(&:to_i)
@@ -303,14 +311,17 @@ EOF
303
311
  end
304
312
 
305
313
  def move_to(uid_set, mailbox)
314
+ if mailbox == 'all'
315
+ log "archiving messages"
316
+ end
306
317
  if MailboxAliases[mailbox]
307
318
  mailbox = MailboxAliases[mailbox]
308
319
  end
309
320
  create_if_necessary mailbox
310
- log "move_to #{uid_set.inspect} #{mailbox}"
311
321
  if uid_set.is_a?(String)
312
322
  uid_set = uid_set.split(",").map(&:to_i)
313
323
  end
324
+ log "move_to #{uid_set.inspect} #{mailbox}"
314
325
  log @imap.uid_copy(uid_set, mailbox)
315
326
  log @imap.uid_store(uid_set, '+FLAGS', [:Deleted])
316
327
  end
@@ -328,10 +339,12 @@ EOF
328
339
  end
329
340
 
330
341
  def create_if_necessary(mailbox)
331
- if !@mailboxes.include?(mailbox)
342
+ current_mailboxes = mailboxes.map {|m| MailboxAliases[m] || m}
343
+ if !current_mailboxes.include?(mailbox)
344
+ log "current mailboxes: #{current_mailboxes.inspect}"
332
345
  log "creating mailbox #{mailbox}"
333
346
  log @imap.create(mailbox)
334
- @mailboxes = nil # force reload next fime list_mailboxes() called
347
+ mailboxes = nil # force reload next fime list_mailboxes() called
335
348
  end
336
349
  end
337
350
 
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -31,6 +31,7 @@
31
31
  <ul>
32
32
  <li><a href="https://github.com/danchoi/vmail">github repo</a></li>
33
33
  <li><a href="https://rubygems.org/gems/vmail">rubygems page</a></li>
34
+ <li><a href="https://github.com/danchoi/vmail/issues">issue tracker</a></li>
34
35
  </ul>
35
36
  </div>
36
37
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- - 9
9
- version: 0.1.9
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-14 00:00:00 -05:00
17
+ date: 2010-12-15 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency