vmail 0.9.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  vmail is a Vim interface to Gmail.
4
4
 
5
- Why vmail? Because some people are 1000 times more efficient and happy in [Vim][vim]
5
+ Why vmail? Because some people are 1000 times more productive and happy in [Vim][vim]
6
6
  than in any web browser or GUI program.
7
7
 
8
8
  [vim]:http://www.vim.org/
@@ -67,11 +67,16 @@ You can omit the password key-value pair if you'd rather not have the password
67
67
  saved in the file. In that case, you'll prompted for the password each time you
68
68
  start vmail.
69
69
 
70
+ If you want to configure vmail with multiple Gmail accounts, [here's how][multiaccount].
71
+
72
+ [multiaccount]:https://github.com/danchoi/vmail/wiki/How-can-i-quickly-switch-between-multiple-accounts%3F
73
+
70
74
  If you are behind a firewall that blocks IMAP, see these [additional
71
75
  configuration options][firewall] that you can use.
72
76
 
73
77
  [firewall]:https://github.com/danchoi/vmail/wiki/How-to-use-vmail-behind-a-firewall-that-blocks-IMAP
74
78
 
79
+
75
80
  ## Contacts autocompletion
76
81
 
77
82
  vmail uses Vim autocompletion to help you auto-complete email addresses.
@@ -405,8 +410,7 @@ vmail or put this command in your `~/.bash_profile`.
405
410
  Note that when vmail uses MacVim, the terminal window in which you invoke vmail
406
411
  will show vmail's logging output while MacVim is running. To quit vmail in
407
412
  MacVim mode, first quit the MacVim window running vmail, and then press CTRL-c
408
- in the original terminal window to stop the vmail process after quitting the
409
- MacVim app.
413
+ in the original terminal window to stop the vmail process.
410
414
 
411
415
  There seems to be a bug in MacVim that prevent some the status line messages
412
416
  from becoming visible, but this is minor issue.
data/TODO CHANGED
@@ -19,4 +19,18 @@ Sat Dec 18 09:08:47 EST 2010
19
19
 
20
20
  - use IMAP EXISTS command to check for updates.
21
21
 
22
+ ------------------------------------------------------------------------
23
+ Mon Dec 20 08:14:54 EST 2010
24
+
25
+ - make the 100 list batch limit adjustable, through some flag or env
26
+ variable
27
+
28
+ - starring from msg window should keep the cursor there
29
+
30
+ - starred messages should be indicated as such in msg window
31
+
32
+ - after switching into a cached mailbox, check for update? or at least
33
+ show when the mailbox was last updated.
22
34
 
35
+ - bug: mark as read a message, should update the cached version in
36
+ current message list cache
@@ -77,7 +77,9 @@ function! s:show_message(stay_in_message_list)
77
77
  endif
78
78
  " remove the unread flag +
79
79
  " TODO!
80
- let newline = substitute(line, '^**+', ' ', '')
80
+ " tetset
81
+ let newline = substitute(line, '^\V*+', '* ', '')
82
+ let newline = substitute(newline, '^\V+ ', ' ', '')
81
83
  setlocal modifiable
82
84
  call setline(line('.'), newline)
83
85
  setlocal nomodifiable
@@ -414,9 +414,12 @@ module Vmail
414
414
  return @current_message
415
415
  end
416
416
 
417
- prefetch_adjacent(index)
417
+ prefetch_adjacent(index) # TODO mark these as unread
418
418
 
419
419
  envelope_data = current_message_list_cache[index]
420
+ log envelope_data.inspect
421
+ # TODO factor this gsubbing stuff out into own function
422
+ envelope_data[:row_text] = envelope_data[:row_text].gsub(/^\+ /, ' ').gsub(/^\*\+/, '* ') # mark as read in cache
420
423
  seqno = envelope_data[:seqno]
421
424
  uid = envelope_data[:uid]
422
425
  log "showing message index: #{index} seqno: #{seqno} uid #{uid}"
@@ -459,6 +462,11 @@ module Vmail
459
462
  end
460
463
  res[0]
461
464
  end
465
+ # TODO keep these marked unread; test this
466
+ if envelope_data[:row_text] =~ /^\*?\+/ # not seen
467
+ log "reflagging index #{index} uid #{uid} as not seen"
468
+ flag("#{index}..#{index}", '-FLAGS', :Seen) # change flag() method to accept a single index later
469
+ end
462
470
  size = fetch_data.attr["RFC822.SIZE"]
463
471
  mail = Mail.new(fetch_data.attr['RFC822'])
464
472
  formatter = Vmail::MessageFormatter.new(mail)
@@ -529,6 +537,17 @@ EOF
529
537
  log "@imap.uid_store #{uid_set.inspect} #{action} [#{flg.to_sym}]"
530
538
  log @imap.uid_store(uid_set, action, [flg.to_sym])
531
539
  end
540
+
541
+ # mark cached versions of the rows with flag/unflag
542
+ uid_set.each do |uid|
543
+ envelope_data = current_message_list_cache.detect {|x| x[:uid] == uid}
544
+ if action == '+FLAGS' && flg == 'Flagged'
545
+ envelope_data[:row_text] = envelope_data[:row_text].gsub(/^\+ /, '*+').gsub(/^ /, '* ') # mark as read in cache
546
+ elsif action == '-FLAGS' && flg == 'Flagged'
547
+ envelope_data[:row_text] = envelope_data[:row_text].gsub(/^\*\+/, '+ ').gsub(/^\* /, ' ') # mark as read in cache
548
+ end
549
+ end
550
+
532
551
  end
533
552
  end
534
553
 
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.9.9"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -3,10 +3,10 @@ name: vmail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
+ - 1
6
7
  - 0
7
- - 9
8
- - 9
9
- version: 0.9.9
8
+ - 0
9
+ version: 1.0.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi