vmail 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/NOTES +6 -0
- data/lib/vmail.vim +1 -1
- data/lib/vmail/imap_client.rb +16 -3
- data/lib/vmail/version.rb +1 -1
- data/website/vmail-template.html +1 -0
- metadata +4 -4
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
|
data/lib/vmail.vim
CHANGED
@@ -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 . ' ' .
|
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
|
data/lib/vmail/imap_client.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
347
|
+
mailboxes = nil # force reload next fime list_mailboxes() called
|
335
348
|
end
|
336
349
|
end
|
337
350
|
|
data/lib/vmail/version.rb
CHANGED
data/website/vmail-template.html
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
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-
|
17
|
+
date: 2010-12-15 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|