vmail 1.4.6 → 1.4.7
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/README.markdown +3 -2
- data/lib/vmail.vim +14 -14
- data/lib/vmail/reply_template.rb +4 -1
- data/lib/vmail/version.rb +1 -1
- metadata +5 -20
data/README.markdown
CHANGED
@@ -11,8 +11,7 @@ than in any web browser or GUI program.
|
|
11
11
|
|
12
12
|
* a Gmail account
|
13
13
|
* a relatively recent version of Vim (vmail is developed against Vim 7.3)
|
14
|
-
* Ruby with SSL support compiled in (vmail is developed using Ruby 1.9.2)
|
15
|
-
* RubyGems (if Ruby version is older than 1.9)
|
14
|
+
* Ruby 1.9.0 or higher with SSL support compiled in (vmail is developed using Ruby 1.9.2)
|
16
15
|
* the `lynx` text-only-mode web browser is required to view HTML mail parts in vmail
|
17
16
|
|
18
17
|
The current version of vmail assumes a Unix environment. I'll try to make later versions accommodate Windows.
|
@@ -464,6 +463,8 @@ vmail generates a few files in the current directory when it is running:
|
|
464
463
|
|
465
464
|
* `current_message.txt` holds the current message being shown. Not deleted on quit.
|
466
465
|
|
466
|
+
* `compose_message.txt` holds the current message being shown. Not deleted on quit.
|
467
|
+
|
467
468
|
* `part.html` is created if you open an HTML mail part from vmail.
|
468
469
|
|
469
470
|
Finally, vmail logs output to a `vmail.log` file which it creates in the
|
data/lib/vmail.vim
CHANGED
@@ -228,9 +228,9 @@ function! s:update()
|
|
228
228
|
if len(split(res, "\n", '')) > 0
|
229
229
|
setlocal modifiable
|
230
230
|
let line = line('$')
|
231
|
-
$put =res
|
231
|
+
silent $put =res
|
232
232
|
setlocal nomodifiable
|
233
|
-
write
|
233
|
+
write!
|
234
234
|
let num = len(split(res, '\n', ''))
|
235
235
|
call cursor(line + 1, 0)
|
236
236
|
normal z.
|
@@ -275,9 +275,6 @@ function! s:toggle_star() range
|
|
275
275
|
endwhile
|
276
276
|
setlocal nomodifiable
|
277
277
|
write
|
278
|
-
if nummsgs > 2
|
279
|
-
" call feedkeys("\<cr>")
|
280
|
-
endif
|
281
278
|
redraw
|
282
279
|
if nummsgs == 1
|
283
280
|
echom "toggled flag on message"
|
@@ -501,7 +498,7 @@ function! s:select_mailbox()
|
|
501
498
|
echo "loading messages..."
|
502
499
|
let res = system(command)
|
503
500
|
1,$delete
|
504
|
-
put! =res
|
501
|
+
silent! put! =res
|
505
502
|
execute "normal Gdd\<c-y>"
|
506
503
|
normal G
|
507
504
|
setlocal nomodifiable
|
@@ -533,9 +530,9 @@ function! s:do_search()
|
|
533
530
|
setlocal modifiable
|
534
531
|
echo "running query on " . s:mailbox . ": " . s:query . ". please wait..."
|
535
532
|
let res = system(command)
|
536
|
-
1,$delete
|
537
|
-
put! =res
|
538
|
-
execute "normal Gdd\<c-y>"
|
533
|
+
silent! 1,$delete
|
534
|
+
silent! put! =res
|
535
|
+
execute "silent normal Gdd\<c-y>"
|
539
536
|
setlocal nomodifiable
|
540
537
|
write
|
541
538
|
normal z.
|
@@ -586,16 +583,19 @@ func! s:open_compose_window(command)
|
|
586
583
|
redraw
|
587
584
|
echo a:command
|
588
585
|
let res = system(a:command)
|
589
|
-
|
586
|
+
split compose_message.txt
|
590
587
|
setlocal modifiable
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
588
|
+
if winnr('$') > 1
|
589
|
+
wincmd p
|
590
|
+
close!
|
591
|
+
endif
|
592
|
+
silent 1,$delete
|
593
|
+
silent put! =res
|
595
594
|
call feedkeys("\<cr>")
|
596
595
|
call s:compose_window_mappings()
|
597
596
|
setlocal completefunc=CompleteContact
|
598
597
|
normal 1G
|
598
|
+
write!
|
599
599
|
endfunc
|
600
600
|
|
601
601
|
func! s:turn_into_compose_window()
|
data/lib/vmail/reply_template.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require 'mail'
|
2
3
|
require 'time'
|
3
4
|
|
@@ -18,7 +19,9 @@ module Vmail
|
|
18
19
|
end
|
19
20
|
date = @orig_headers['date'].is_a?(String) ? Time.parse(@orig_headers['date']) : @orig_headers['date']
|
20
21
|
quote_header = date ? "On #{date.strftime('%a, %b %d, %Y at %I:%M %p')}, #{sender} wrote:\n\n" : "#{sender} wrote:\n\n"
|
21
|
-
body = quote_header + formatter.process_body
|
22
|
+
body = quote_header + formatter.process_body
|
23
|
+
body.force_encoding("UTF-8")
|
24
|
+
body = body.gsub(/^(?=>)/, ">").gsub(/^(?!>)/, "> ")
|
22
25
|
{'from' => "#@name <#@username>", 'to' => primary_recipient, 'cc' => cc, 'subject' => subject, :body => body}
|
23
26
|
end
|
24
27
|
|
data/lib/vmail/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 1.4.
|
8
|
+
- 7
|
9
|
+
version: 1.4.7
|
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: 2011-
|
17
|
+
date: 2011-02-10 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -162,20 +162,5 @@ rubygems_version: 1.3.7
|
|
162
162
|
signing_key:
|
163
163
|
specification_version: 3
|
164
164
|
summary: A Vim interface to Gmail
|
165
|
-
test_files:
|
166
|
-
|
167
|
-
- test/base64_test.rb
|
168
|
-
- test/fixtures/euc-kr-header.eml
|
169
|
-
- test/fixtures/euc-kr-html.eml
|
170
|
-
- test/fixtures/google-affiliate.eml
|
171
|
-
- test/fixtures/htmlbody.eml
|
172
|
-
- test/fixtures/moleskine-html.eml
|
173
|
-
- test/fixtures/reply-template-encoding-test.eml
|
174
|
-
- test/fixtures/reply_all.eml
|
175
|
-
- test/fixtures/rfc_part.eml
|
176
|
-
- test/fixtures/textbody-nocontenttype.eml
|
177
|
-
- test/fixtures/with-attachments.eml
|
178
|
-
- test/message_formatter_test.rb
|
179
|
-
- test/reply_template_test.rb
|
180
|
-
- test/test_helper.rb
|
181
|
-
- test/time_format_test.rb
|
165
|
+
test_files: []
|
166
|
+
|