vmail 0.6.7 → 0.6.8

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.
Files changed (5) hide show
  1. data/.gitignore +1 -0
  2. data/lib/vmail.vim +6 -1
  3. data/lib/vmail/version.rb +1 -1
  4. metadata +2 -3
  5. data/NOTES +0 -580
data/.gitignore CHANGED
@@ -5,3 +5,4 @@ gmail.yml
5
5
  *.log
6
6
  pkg/
7
7
  .rvmrc
8
+ notes.txt
@@ -292,7 +292,12 @@ endfunc
292
292
  func! s:append_messages_to_file() range
293
293
  let uid_set = (a:firstline - 2) . '..' . (a:lastline - 2)
294
294
  let nummsgs = (a:lastline - a:firstline + 1)
295
- let s:append_file = input("print messages to file: ", s:append_file)
295
+ let append_file = input("print messages to file: ", s:append_file)
296
+ if append_file == ''
297
+ echom "canceled"
298
+ return
299
+ endif
300
+ let s:append_file = append_file
296
301
  let command = s:append_to_file_command . s:append_file . ' ' . uid_set
297
302
  echo "appending " . nummsgs . " message" . (nummsgs == 1 ? '' : 's') . " to " . s:append_file . ". please wait..."
298
303
  let res = system(command)
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.6.7"
2
+ VERSION = "0.6.8"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 7
9
- version: 0.6.7
8
+ - 8
9
+ version: 0.6.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi
@@ -61,7 +61,6 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - .gitignore
63
63
  - MIT-LICENSE.txt
64
- - NOTES
65
64
  - README.markdown
66
65
  - Rakefile
67
66
  - TODO
data/NOTES DELETED
@@ -1,580 +0,0 @@
1
- interesting. the UID don't seem to be globally unique. two different
2
- messages in 2 different mailboxes can have same UID
3
-
4
-
5
- Mon Nov 22 23:12:49 EST 2010
6
-
7
- - next, do window sensing and recreation. let user expand the message
8
- detail window and shrink it with some key like <cr>
9
-
10
- I need status windows that show how many messagesin a box, when it was
11
- last updated, etc
12
-
13
- This app is coming along well.
14
-
15
-
16
- Another reason to not allow a divergent offline store is that when the
17
- schema changes on an update, it's easier to have the user rebuild the
18
- locate version of the GMAIL
19
-
20
-
21
- Another anomaly. Threading seems to reverse the UIDs.
22
-
23
-
24
- Imap tasks should be batched so that we don't have the overhead of an
25
- imap login each time.
26
-
27
- The vertial 3 pan view should have a different set of columns in the
28
- message list window.
29
-
30
- Need command to reprocess text translation, also to display way eml.
31
-
32
- NEXT. Learn how to do a popup window. Try out other Vim plugins! Do some
33
- research online.
34
-
35
- OR, do replies.
36
-
37
- - work on email formatting
38
-
39
- Flag new messages. And position cursor correctly on a refresh.
40
-
41
-
42
-
43
-
44
- inputlist()
45
-
46
-
47
- winrestcmd() potentially useful
48
-
49
- 1resize 20|vert 1resize 84|2resize 18|vert 2resize 84|3resize 39|vert 3resize 84|
50
-
51
-
52
- ------------------------------------------------------------------------
53
- Thu Nov 25 16:55:07 EST 2010 {{{1
54
-
55
- Trying new schema and more unix-inspired approach. First, the schema is
56
- changed to allow unique messages to be shared across mailboxes via
57
- message_refs. The Mailbox model has been removed.
58
-
59
- Second, the tools should be smaller and less interdependent. There
60
- should be a tool just for getting a text list of UID for a mailbox, and
61
- then another that takes a UID and pulls down the raw eml, which I can
62
- then use for testing.
63
-
64
- The tool to insert into data should take two arguments, the mailbox name
65
- and the UID, and the raw eml into STDIN.
66
-
67
- Set up a test harness for all this email caching and data extraction
68
- with rspec or test unit
69
-
70
- ------------------------------------------------------------------------
71
- Fri Nov 26 12:08:26 EST 2010 {{{1
72
-
73
- I need a text extract tool that works like iconv command line tool.
74
-
75
- Lots of little tools for my workbench.
76
-
77
-
78
- Now, I'm thinking of ditching the database. Use one document of
79
- concatenated EML with message and mailbox info incorporated.
80
-
81
-
82
- I tried using folds to present the email headers but I'm not sure it
83
- works. Too many key strokes to unfold, fold, move to next message, and
84
- unfold. Also, search doesn't work as expected since it searches through
85
- all the text.
86
-
87
- This suggests that using the database might be the best solution.
88
-
89
-
90
- OK I've experimented and found a reasonably fast way to do imap searchs
91
-
92
- e.g.
93
-
94
- ruby lib/gmail.rb FROM monit BEFORE 8-Aug-2010 SINCE 1-Jun-2010
95
-
96
- Now the question is how to get from output to load a specific message
97
- and then possibly reply to it.
98
-
99
- And later, we need to keep a contact list somehow.
100
-
101
- I also forgot how an email is sent with sendmail. Maybe with
102
- authentication.
103
-
104
- ------------------------------------------------------------------------
105
- Sun Nov 28 10:42:50 EST 2010
106
-
107
- Got threaded message list fetch working
108
-
109
- Marking messages for deletion or starring could be done very simply:
110
- Just add a mark '*' or 'D' to the beginning of lines that should be
111
- starred or deleted, then press a command key.
112
-
113
- Just put one commented line at top of generated list. This is so the
114
- viewer can refresh the list on demand when the user wants to. But the
115
- focus should be on generating these imap search result lists from the
116
- command line and saving the output to a file. Then the use can view the
117
- file in the viewer. Should the file serve as a virtual mailbox?
118
-
119
- User can alway do "search command | tee inbox" periodically and then
120
- view the inbox in the viewer when a new message arrives.
121
-
122
- There are even ways of setting up watches from the command to see if a
123
- new message arrives in a certain mailbox. These recipes should be
124
- written up in a tutorial on the website.
125
-
126
-
127
- Wrote a wrapper startup script that you invoke like so
128
-
129
- ./wrapper inbox 20 all
130
- ./wrapper inbox 20 subject instantwatcher
131
-
132
- This will generate the list file and open the viewer on it.
133
-
134
- I think this is the workflow I want. It keeps the viewer lightweight and
135
- prevents it from becoming a captive user interface.
136
-
137
-
138
-
139
- Remember to convert uid to_i before calling IMAP methods.
140
-
141
- Need to figure out a way to flag a line and show the change. Do we have
142
- to use Vim data structures?
143
-
144
- Also, be careful. The f command throws an error when there is no mailbox
145
- and search term information at the top of the message list.
146
-
147
-
148
- Make a view mode that lets one simple page through the messages and keep
149
- track of which message is visible.
150
-
151
- TODO Try d for trash and D for permanent Delete.
152
-
153
-
154
- http://stackoverflow.com/questions/1430866/gmail-threading-imap-and-ruby
155
-
156
- ------------------------------------------------------------------------
157
- Tue Nov 30 07:30:19 EST 2010
158
-
159
- Start from command line, and then quit. Not meant to be an application
160
- that you keep open. At least not for my uses.
161
-
162
- But it would be better to start up the app in the Ruby wrapper
163
-
164
- If it's contained in vim, I can use append(lnum, list) to insert
165
- previous messages to the top of the buffer as the user scrolls back.
166
-
167
- So two things to accomplish this morning:
168
- 1. start the application in a Ruby wrapper
169
- 2. select mailbox from viewer
170
- 3. infinite paging back
171
-
172
- Done:
173
- 1. Ruby wrapper
174
- 2. Update the current mailbox
175
- 3. Fast deletes, range flagging
176
- 4. slightly better multipart displaying
177
-
178
- Won't do:
179
- - infinite paging
180
- - starting mailbox from viewer
181
-
182
- TODO
183
- - send messages
184
-
185
-
186
- Unicode korean characters are wider than ascii characters, so this will
187
- mess up alignment, but I don't know what I can do about this.
188
-
189
- ------------------------------------------------------------------------
190
- Wed Dec 1 15:39:39 EST 2010
191
-
192
- - got composing messages working, switching between full screen message
193
- view and list view
194
-
195
- TODO
196
- - reply to messages
197
-
198
- contacts
199
- - import contacts by looking at sent mailbox. save contacts into a file
200
- and use that for autocompletion
201
-
202
- split reply window veritcally: that's the way I wanted this interface
203
-
204
- Quoting emails:
205
-
206
- http://en.wikipedia.org/wiki/Posting_style
207
-
208
- stackoverflow:
209
-
210
- If you get the raw source of the messages you can relate messages to one
211
- another by looking at the following headers:
212
-
213
- Message-ID:
214
- <097819EBC7F79F4A850C8F088D35927302442A82AA@xxxxxxxxxxxxxxxxxxx>
215
- References: <4A8BE8F3.2060007@xxxxxxxxxxxxxx>
216
- In-Reply-To: <4A8BE8F3.2060007@xxxxxxxxxxxxxxx>
217
- link|flag
218
- answered Aug 28 '09 at 7:23
219
- Kees de Kooter
220
- 1,7341512
221
-
222
-
223
- TODO
224
- - get full email addresses including names
225
- - fix reply to quote header
226
- - address book
227
- - later:
228
- - append to text file
229
- - display and save attachments
230
- Thurs
231
- - start packaging
232
- - need a better way to refresh a stale IMAP connection
233
- - try wrapping client calls with Timeout. Then call daemon to refresh
234
- connection if things take too long.
235
-
236
- * Need to save mail list buffer or else it forgets what user has flagged
237
- or deleted.
238
-
239
-
240
- - will have to write out message list buffer
241
-
242
- - IMAP fails from parsing email from
243
-
244
- D, [2010-12-02T04:14:47.034816 #26464] DEBUG -- : error fetching uid
245
- 83682
246
- D, [2010-12-02T04:14:47.034884 #26464] DEBUG -- : unknown token -
247
- "\"[Christian" (Net::IMAP::ResponseParseError)
248
-
249
-
250
- It is vital to rewrite the message list buffer to file. This is a
251
- significant bug. Since new messages gotten via update disappear when
252
- coming back from full screen message view.
253
-
254
- Also, let use go forward and back while reading full messages.
255
- Or even in split view. Don't bind n since we need it for search. Use
256
- CTRL-n, CTRL-p? or leader n leader
257
-
258
- Need better recovery from expired IMAP session. At least some kind of
259
- warning so that use retries the previous action that failed.
260
-
261
- TODO
262
- - gmail charset correction
263
-
264
-
265
- ------------------------------------------------------------------------
266
- Tue Dec 7 09:36:01 EST 2010
267
-
268
- Instead of autocomplete mailbox chooser, have a generic search command
269
- line buffer that might autocomplete the mailbox for you.
270
-
271
- This simplifies the user interface and makes it more coherent.
272
-
273
- You will always specify a mailbox and a command. Get the user used to
274
- doing searches like this.
275
-
276
- I'm also thinking of keep the viewer thin and not that featureful.
277
- I'll emphasize the command line features, like using search criteria to
278
- pipe emails into a text file.
279
-
280
- Change the architecture so that the daemon is fired up in a separate
281
- process.
282
-
283
- I don't think I need to download the RFC822 header, the envelope has
284
- this data.
285
-
286
- Done.
287
-
288
- Next, in the search window, I can keep a history of previous searches.
289
- And just execute the command that the user hits carriage return on.
290
-
291
- ENVELOPE: !ruby/struct:Net::IMAP::Envelope
292
- date: Tue, 7 Dec 2010 11:25:47 -0500
293
- subject: "Error message: /titles.new"
294
- from:
295
- - !ruby/struct:Net::IMAP::Address
296
- name:
297
- route:
298
- mailbox: error
299
- host: instantwatcher.com
300
- sender:
301
- - !ruby/struct:Net::IMAP::Address
302
- name:
303
- route:
304
- mailbox: error
305
- host: instantwatcher.com
306
- reply_to:
307
- - !ruby/struct:Net::IMAP::Address
308
- name:
309
- route:
310
- mailbox: error
311
- host: instantwatcher.com
312
- to:
313
- - !ruby/struct:Net::IMAP::Address
314
- name:
315
- route:
316
- mailbox: dhchoi
317
- host: gmail.com
318
- cc:
319
- bcc:
320
- in_reply_to:
321
- message_id: <4cfe600b1cd1f_202540e109c8ee@ubuntu.tmail>
322
-
323
-
324
-
325
-
326
- (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:3235:in `parse_error': unknown token - "\"[Christian" (Net::IMAP::ResponseParseError)
327
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:3180:in `next_token'
328
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:3097:in `lookahead'
329
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2995:in `nstring'
330
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2183:in `envelope'
331
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2170:in `envelope_data'
332
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2145:in `msg_att'
333
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2125:in `numeric_response'
334
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2067:in `response_untagged'
335
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:2047:in `response'
336
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:1973:in `parse'
337
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:1124:in `get_response'
338
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:1036:in `receive_responses'
339
- from (druby://127.0.0.1:61676) /Users/choi/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/imap.rb:1023:in `block in initialize'
340
- from run.rb:8:in `block in <main>'
341
- from run.rb:7:in `open'
342
- from run.rb:7:in `<main>'
343
-
344
-
345
-
346
- # Sends a APPEND command to append the +message+ to the end of
347
- # the +mailbox+. The optional +flags+ argument is an array of
348
- # flags to initially passing to the new message. The optional
349
- # +date_time+ argument specifies the creation time to assign to the
350
- # new message; it defaults to the current time.
351
- # For example:
352
- #
353
- # imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now)
354
- # Subject: hello
355
- # From: shugo@ruby-lang.org
356
- # To: shugo@ruby-lang.org
357
- #
358
- # hello world
359
- # EOF
360
- #
361
- # A Net::IMAP::NoResponseError is raised if the mailbox does
362
- # not exist (it is not created automatically), or if the flags,
363
- # date_time, or message arguments contain errors.
364
-
365
-
366
-
367
-
368
- Next, I think I need to restore the vertical mailbox selection mode, and
369
- then have the search window execute in the current mailbox.
370
-
371
- Finally, I need to eliminate the limit number (on search) and just to dynamic
372
- back-paging when a user gets to the top line, which will say "Get 40
373
- more messages" or something.
374
-
375
- Also, forget 2 pane, just toggle full screen message and list view
376
-
377
- Finally, I need to do autocompletion for contacts.
378
-
379
-
380
-
381
- done today:
382
- - backpaging
383
- - single window at a time
384
- - vertical mailbox selection
385
- - no more yaml
386
-
387
- OK next
388
- - autocompletion for contacts
389
- - extract and show attachments, bytesize
390
- - can't show this without downloading RFC822.header
391
- - autocomplete better for mailbox
392
- - STTY adjustment `stty size` from the vim client and sent to back end?
393
-
394
- This url doesn't open
395
-
396
- http://twitter.com/#!/kanter/status/12398658028834816
397
-
398
- Because of the # or !. Wrapping it in quotes double or singles
399
- doesn't fix the prob. Need to use system and shellescape
400
-
401
- TODO
402
- - display current mailbox somewhere, and also search query
403
- - allow splitting the window to keep multiple messages open. Don't call only.
404
- - move to - done
405
- - contacts!
406
- - character encodings
407
-
408
- echo winwidth(1)
409
- use this instead of system('stty size') to get window width
410
- - then adjust the column sizes
411
-
412
- :set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
413
-
414
- - in .vmail/ dir?
415
-
416
- ------------------------------------------------------------------------
417
- Thu Dec 9 10:13:53 EST 2010
418
-
419
- - got status line to show current mailbox. Next I just need to show the
420
- current search query!
421
- - got bells to go away in most cases
422
- - need to work on autocomplete for addressbook
423
- - getting there!
424
-
425
- - ok i got statusline working in principle
426
-
427
- - next, do contacts
428
- - fix encoding issues
429
- - get ready to release. Monday seems doable.
430
-
431
- for contacts, use dictionary file option in vim
432
-
433
-
434
- DONE
435
- - contacts, proof of concept
436
- - encoding issues (some at least)
437
- - get reply template recipients right
438
- - forwarding (not with attachments)
439
- - auto-adjusting column widths depending on window width
440
- - for older message, replace time with year
441
- - signature
442
- - open hyperlink in browser (OS X only?)
443
- - open html in browser
444
- - when show_next_message, get message without flashing the list
445
- - solved by restoring two pane view
446
- - when loading update, position cursor on first new message
447
- - spacebar in message window to fullscreen the message and toggle back
448
- - spam range
449
- - in list, show message sizes
450
- - prevent the "8 more lines" and wait for enter. 2 is the threshhold
451
- - fix compose message, reply windowing
452
- - mapping improvements:
453
- - straight to reply from list window
454
- - fixed addresses in recipients to a reply all
455
- - position cursor conveniently on opening compose windows
456
- - show num additional when in sent msg list
457
- - save drafts on server to [Gmail]/Drafts
458
- - use unquote_and_convert for subject lines?
459
- - attachments extraction
460
- - encoding issues (korean)
461
- - plus use iconv for 1.8
462
- - search for from kr
463
- - can't rely on mail.encoding to be non-nil
464
- - if html version, command to open
465
- - create wrapper exec to start both daemon and client from same
466
- window. redirect streams from daemon to a log file
467
- - package gem
468
- - vmail (client)
469
- - mvim = allow using through VMAIL_EDITOR env variable
470
- - need to put mailbox and search on status line from startup
471
- - c-j c-k to go to prev/next message
472
- - turn search into an input() style prompt
473
- - remember and show last search
474
- - map u update from message window
475
- - do search after loading vim or mvim and send size first
476
- - vim resize event
477
- - mvim - window width corrected
478
- - delete mvmail command. just use env variable - cleaner
479
- - sending an attachment
480
- - can specify a directory, then all the items in the directory get
481
- attached and sent
482
- - extract and append text of all selected messages into file (append)
483
- - ,s s confusion? Star vs search
484
- - ,* is star now
485
- - archive function (shortcut for move to all mail)
486
- - remember searches?
487
- - perma-delete from Trash
488
- - put move to> and copy to> prompts
489
- - create mailboxes if they don't exist on move or copy
490
- - tweak contacts list script (plus instruction for how to use)
491
- - .vmailrc is a yaml file, first in current dir, then check home, can
492
- also use command line opts
493
- - fix tests
494
- - open_href is an improved way to open http hrefs
495
- - VMAIL_URL_OPENER=elinks
496
- - digg, reddit, etc buttons
497
- - note dependence on lynx on startup
498
-
499
- NEXT:
500
- - help doc: just return readme file, or a vim version of it (vim filetype later)
501
- - width 780 px
502
- - try turning starred item color into some existing syn color group -
503
- like comments
504
-
505
- later:
506
- - mvim - starred messages not syntax colored
507
- - mvim redrawstatus line bug
508
- http://vim.1045645.n5.nabble.com/Redrawing-bug-in-MacVim-Command-T-since-commit-ba44868-td3248742.html
509
- - allow one daemon, multiple clients (select mailbox?)
510
- - crate to package app as a OS X app?
511
- http://rubyconf2008.confreaks.com/crate-packaging-your-ruby-application.html
512
- - need to bundle macvim
513
- - if move to unknown mailbox, create the mailbox, then do the move
514
- - some lingering encoding issues
515
- - forwarding with attachments
516
- - could be "attach: [uid] attachments to signal"
517
- - something is wrong with cursorline sometimes
518
- - try flashing progress in echo line
519
- - sort contacts by frequency, then take first 10 or so of any match
520
- - straight to switch mailbox, etc from message window
521
- - allow deliver command from any buffer or window, as long as headers are at top
522
- - range selection from : prompt
523
- - starring
524
- - do fast action like deletes
525
- - reload after window resize
526
- - sometimes update doesn't work - bug
527
- - show total messages from a search, showing 100
528
- - message threads
529
- - use temp files
530
- - tempname()
531
- - system() allows a parameters that is written to tmp file and passed
532
- to stdin
533
- - enhance contacts auto fix with more advanced vim script
534
- - create contacts database on first startup
535
-
536
- won't do
537
- - follow mysql and use -u and -p flags on startup of server?
538
- - omitting -p flag forces prompt
539
-
540
- ------------------------------------------------------------------------
541
-
542
- Threading
543
- how to find the message that a message is in reply-to
544
-
545
- imap.search ["HEADER", "MESSAGE-ID", "<757FC46C-9394-494E-91B4-B051F48419DA@prx.org>"]
546
-
547
- :! ls %
548
-
549
- % is filename
550
-
551
- " TODO the range doesn't quite work as expect, need <line1> <line2>
552
- " trying to make user defined commands that work from : prompt
553
- " command -buffer -range VmailDelete call s:toggle_star("Deleted")
554
- " command -buffer -range VmailStar call s:toggle_star("Flagged")
555
- ------------------------------------------------------------------------
556
- Tue Dec 14 23:06:41 EST 2010
557
-
558
- todo
559
-
560
- - one particular email don't send
561
- - from f rojas. see why it fails silently
562
-
563
- - deal with encoding: quotable printable mail part, e.g.
564
- inbox 85740 4 kb
565
- - application/pgp-signature; name=signature.asc
566
- ---------------------------------------
567
- from: asdsadsd
568
- date: Wed, Dec 15 02:01 PM +01:00 2010
569
- to: vim_use@googlegroups.com
570
- subject: Re: introducing vmail
571
- cc: Daniel Choi <dhchoi@gmail.com>
572
-
573
- --Sig_/mr9Wc47A9zV0_9ckNR.1R8f
574
- Content-Type: text/plain; charset=US-ASCII
575
- Content-Transfer-Encoding: quoted-printable
576
-
577
- - put command line parsing under a test harness
578
-
579
- - ,k ,j should accept a number so you can jump to a message further away
580
-