sup 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sup might be problematic. Click here for more details.

Files changed (56) hide show
  1. data.tar.gz.sig +1 -0
  2. data/CONTRIBUTORS +25 -12
  3. data/History.txt +6 -1
  4. data/README.md +70 -0
  5. data/ReleaseNotes +5 -0
  6. data/bin/sup +22 -15
  7. data/bin/sup-add +3 -3
  8. data/bin/sup-config +3 -4
  9. data/bin/sup-import-dump +1 -1
  10. data/bin/sup-sync +1 -1
  11. data/bin/sup-sync-back +2 -2
  12. data/bin/sup-tweak-labels +1 -1
  13. data/lib/sup.rb +39 -23
  14. data/lib/sup/account.rb +4 -0
  15. data/lib/sup/buffer.rb +4 -7
  16. data/lib/sup/colormap.rb +10 -2
  17. data/lib/sup/contact.rb +11 -5
  18. data/lib/sup/crypto.rb +278 -101
  19. data/lib/sup/draft.rb +3 -2
  20. data/lib/sup/horizontal-selector.rb +5 -2
  21. data/lib/sup/index.rb +47 -42
  22. data/lib/sup/label.rb +1 -1
  23. data/lib/sup/message-chunks.rb +4 -2
  24. data/lib/sup/message.rb +14 -3
  25. data/lib/sup/modes/buffer-list-mode.rb +1 -1
  26. data/lib/sup/modes/compose-mode.rb +1 -1
  27. data/lib/sup/modes/contact-list-mode.rb +2 -2
  28. data/lib/sup/modes/edit-message-async-mode.rb +109 -0
  29. data/lib/sup/modes/edit-message-mode.rb +148 -16
  30. data/lib/sup/modes/file-browser-mode.rb +2 -2
  31. data/lib/sup/modes/forward-mode.rb +4 -4
  32. data/lib/sup/modes/line-cursor-mode.rb +2 -2
  33. data/lib/sup/modes/reply-mode.rb +34 -30
  34. data/lib/sup/modes/resume-mode.rb +4 -1
  35. data/lib/sup/modes/scroll-mode.rb +8 -6
  36. data/lib/sup/modes/text-mode.rb +1 -1
  37. data/lib/sup/modes/thread-index-mode.rb +44 -25
  38. data/lib/sup/modes/thread-view-mode.rb +26 -24
  39. data/lib/sup/person.rb +18 -7
  40. data/lib/sup/poll.rb +1 -1
  41. data/lib/sup/rfc2047.rb +1 -1
  42. data/lib/sup/sent.rb +2 -2
  43. data/lib/sup/source.rb +1 -1
  44. data/lib/sup/textfield.rb +38 -1
  45. data/lib/sup/thread.rb +1 -1
  46. data/lib/sup/time.rb +83 -0
  47. data/lib/sup/util.rb +38 -74
  48. data/lib/sup/version.rb +3 -0
  49. metadata +333 -168
  50. metadata.gz.sig +0 -0
  51. data/README.txt +0 -128
  52. data/bin/sup-cmd +0 -138
  53. data/bin/sup-server +0 -44
  54. data/lib/sup/client.rb +0 -92
  55. data/lib/sup/protocol.rb +0 -161
  56. data/lib/sup/server.rb +0 -116
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ �b�zn�J��a�dzQZ9�>@?I����ceG
data/CONTRIBUTORS CHANGED
@@ -1,26 +1,29 @@
1
1
  William Morgan <wmorgan-sup at the masanjin dot nets>
2
2
  Rich Lane <rlane at the club.cc.cmu dot edus>
3
+ Gaute Hope <eg at the gaute.vetsj dot coms>
4
+ Hamish Downer <dmishd at the gmail dot coms>
5
+ Whyme Lyu <callme5long at the gmail dot coms>
6
+ Sascha Silbe <sascha-pgp at the silbe dot orgs>
3
7
  Ismo Puustinen <ismo at the iki dot fis>
4
8
  Nicolas Pouillard <nicolas.pouillard at the gmail dot coms>
5
- Eric Sherman <hyperbolist at the gmail dot coms>
6
9
  Michael Stapelberg <michael at the stapelberg dot des>
10
+ Eric Sherman <hyperbolist at the gmail dot coms>
11
+ Tero Tilus <tero at the tilus dot nets>
7
12
  Ben Walton <bwalton at the artsci.utoronto dot cas>
8
13
  Mike Stipicevic <stipim at the rpi dot edus>
9
14
  Marcus Williams <marcus-sup at the bar-coded dot nets>
10
15
  Lionel Ott <white.magic at the gmx dot des>
11
- Tero Tilus <tero at the tilus dot nets>
16
+ Gaudenz Steinlin <gaudenz at the soziologie dot chs>
17
+ Damien Leone <damien.leone at the fensalir dot frs>
12
18
  Ingmar Vanhassel <ingmar at the exherbo dot orgs>
13
19
  Mark Alexander <marka at the pobox dot coms>
14
- Gaute Hope <eg at the gaute.vetsj dot coms>
20
+ Eric Weikl <eric.weikl at the tngtech dot coms>
15
21
  Christopher Warrington <chrisw at the rice dot edus>
16
22
  W. Trevor King <wking at the drexel dot edus>
17
- Gaudenz Steinlin <gaudenz at the soziologie dot chs>
18
23
  Richard Brown <rbrown at the exherbo dot orgs>
19
24
  Marc Hartstein <marc.hartstein at the alum.vassar dot edus>
20
- Sascha Silbe <sascha-pgp at the silbe dot orgs>
21
25
  Israel Herraiz <israel.herraiz at the gmail dot coms>
22
26
  Anthony Martinez <pi+sup at the pihost dot uss>
23
- Hamish Downer <dmishd at the gmail dot coms>
24
27
  Bo Borgerson <gigabo at the gmail dot coms>
25
28
  William Erik Baxter <web at the superscript dot coms>
26
29
  Michael Hamann <michael at the content-space dot des>
@@ -29,26 +32,36 @@ Adeodato Simó <dato at the net.com.org dot ess>
29
32
  Daniel Schoepe <daniel.schoepe at the googlemail dot coms>
30
33
  Jason Petsod <jason at the petsod dot orgs>
31
34
  Steve Goldman <sgoldman at the tower-research dot coms>
35
+ Robin Burchell <viroteck at the viroteck dot nets>
36
+ Peter Harkins <ph at the malaprop dot orgs>
32
37
  Edward Z. Yang <ezyang at the MIT dot EDUs>
33
38
  Decklin Foster <decklin at the red-bean dot coms>
34
39
  Cameron Matheson <cam+sup at the cammunism dot orgs>
35
40
  Carl Worth <cworth at the cworth dot orgs>
36
41
  Jeff Balogh <its.jeff.balogh at the gmail dot coms>
37
- Andrew Pimlott <andrew at the pimlott dot nets>
38
42
  Alex Vandiver <alexmv at the mit dot edus>
39
- Peter Harkins <ph at the malaprop dot orgs>
43
+ Andrew Pimlott <andrew at the pimlott dot nets>
44
+ Matías Aguirre <matiasaguirre at the gmail dot coms>
45
+ Anthony Martinez <pi at the pihost dot uss>
40
46
  Kornilios Kourtis <kkourt at the cslab.ece.ntua dot grs>
47
+ Kevin Riggle <kevinr at the free-dissociation dot coms>
41
48
  Giorgio Lando <patroclo7 at the gmail dot coms>
42
- Damien Leone <damien.leone at the fensalir dot frs>
43
49
  Benoît PIERRE <benoit.pierre at the gmail dot coms>
44
50
  Alvaro Herrera <alvherre at the alvh.no-ip dot orgs>
51
+ Eric Weikl <eric.weikl at the gmx dot nets>
45
52
  Jonah <Jonah at the GoodCoffee dot cas>
53
+ ian <ian at the lorf dot orgs>
46
54
  Adam Lloyd <adam at the alloy-d dot nets>
47
55
  Todd Eisenberger <teisenbe at the andrew.cmu dot edus>
48
- ian <ian at the lorf dot orgs>
49
56
  Steven Walter <swalter at the monarch.(none)>
50
- ian <itaylor at the uark dot edus>
51
- Jon M. Dugan <jdugan at the es dot nets>
57
+ Alex Vandiver <alex at the chmrr dot nets>
52
58
  Gregor Hoffleit <gregor at the sam.mediasupervision dot des>
59
+ Jon M. Dugan <jdugan at the es dot nets>
60
+ Matthieu Rakotojaona <matthieu.rakotojaona at the gmail dot coms>
53
61
  Stefan Lundström <lundst at the snabb.(none)>
62
+ Matthias Vallentin <vallentin at the icir dot orgs>
63
+ Steven Lawrance <stl at the redhat dot coms>
64
+ Jonathan Lassoff <jof at the thejof dot coms>
65
+ ian <itaylor at the uark dot edus>
66
+ Gregor Hoffleit <gregor at the hoffleit dot des>
54
67
  Kirill Smelkov <kirr at the landau.phys.spbu dot rus>
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.13.0 / 2013-05-15
2
+
3
+ * Bugfixes
4
+ * Depend on ncursesw-sup
5
+
1
6
  == 0.12.1 / 2011-01-23
2
7
  * Depend on ncursesw rather than ncurses (Ruby 1.9 compatibility)
3
8
  * Add sup-import-dump
@@ -203,7 +208,7 @@
203
208
  * doc/UserGuide.txt
204
209
 
205
210
  == 0.0.4 / 2007-01-03
206
-
211
+
207
212
  * Bugfixes, primarily for threaded networking.
208
213
 
209
214
  == 0.0.3 / 2007-01-02
data/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # Sup
2
+
3
+ A console-based email client with the best features of GMail, mutt and
4
+ Emacs.
5
+
6
+ ## Installation
7
+
8
+ [See the wiki][Installation]
9
+
10
+ ## Features / Problems
11
+
12
+ Features:
13
+
14
+ * GMail-like thread-centered archiving, tagging and muting
15
+ * [Handling mail from multiple mbox and Maildir sources][sources]
16
+ * Blazing fast full-text search with a [rich query language][search]
17
+ * Multiple accounts - pick the right one when sending mail
18
+ * [Ruby-programmable hooks][hooks]
19
+ * Automatically tracking recent contacts
20
+
21
+ Current limitations which will be fixed:
22
+
23
+ * [Doesn't run on Ruby 2.0][ruby20]
24
+
25
+ * Sup doesn't play nicely with other mail clients. Changes in Sup won't be
26
+ synced back to mail source.
27
+
28
+ * Unix-centrism in MIME attachment handling and in sendmail invocation.
29
+
30
+ ## Problems
31
+
32
+ Please report bugs to the [Github issue tracker](https://github.com/sup-heliotrope/sup/issues).
33
+
34
+ ## Links
35
+
36
+ * [Homepage](http://supmua.org/)
37
+ * [Code repository](https://github.com/sup-heliotrope/sup)
38
+ * [Wiki](https://github.com/sup-heliotrope/sup/wiki)
39
+ * IRC: [#sup @ freenode.net](http://webchat.freenode.net/?channels=#sup)
40
+ * Mailing list: [sup-talk] and [sup-devel]
41
+
42
+ ## License
43
+
44
+ ```
45
+ Copyright (c) 2013 Sup developers.
46
+ Copyright (c) 2006--2009 William Morgan.
47
+
48
+ This program is free software; you can redistribute it and/or
49
+ modify it under the terms of the GNU General Public License
50
+ as published by the Free Software Foundation; either version 2
51
+ of the License, or (at your option) any later version.
52
+
53
+ This program is distributed in the hope that it will be useful,
54
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
55
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56
+ GNU General Public License for more details.
57
+
58
+ You should have received a copy of the GNU General Public License
59
+ along with this program; if not, write to the Free Software
60
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
61
+ 02110-1301, USA.
62
+ ```
63
+
64
+ [sources]: https://github.com/sup-heliotrope/sup/wiki/Adding-sources
65
+ [hooks]: https://github.com/sup-heliotrope/sup/wiki/Hooks
66
+ [search]: https://github.com/sup-heliotrope/sup/wiki/Searching-your-mail
67
+ [Installation]: https://github.com/sup-heliotrope/sup/wiki#installation
68
+ [ruby20]: https://github.com/sup-heliotrope/sup/wiki/Development#sup-014
69
+ [sup-talk]: http://rubyforge.org/mailman/listinfo/sup-talk
70
+ [sup-devel]: http://rubyforge.org/mailman/listinfo/sup-devel
data/ReleaseNotes CHANGED
@@ -1,3 +1,8 @@
1
+ Release 0.13.0:
2
+
3
+ Collection of bugfixes and stability fixes since 0.12.1. We now depend on our
4
+ own ncursesw-sup fork.
5
+
1
6
  Release 0.12.1:
2
7
 
3
8
  This release changes the gem dependency on ncurses to ncursesw, which
data/bin/sup CHANGED
@@ -2,25 +2,28 @@
2
2
 
3
3
  require 'rubygems'
4
4
 
5
- no_ncursesw = false
5
+ require 'ncursesw'
6
+
7
+ no_gpgme = false
6
8
  begin
7
- require 'ncursesw'
9
+ # gpgme broke its API in 2.0, so make sure we have the old version for now.
10
+ gem 'gpgme', '=1.0.8'
11
+ require 'gpgme'
8
12
  rescue LoadError
9
- require 'ncurses'
10
- no_ncursesw = true
13
+ no_gpgme = true
11
14
  end
12
15
 
13
16
  require 'fileutils'
14
17
  require 'trollop'
15
- require "sup"; Redwood::check_library_version_against "0.12.1"
18
+ require "sup"; Redwood::check_library_version_against "0.13.0"
16
19
 
17
20
  if ENV['SUP_PROFILE']
18
21
  require 'ruby-prof'
19
22
  RubyProf.start
20
23
  end
21
24
 
22
- if no_ncursesw
23
- info "No 'ncursesw' gem detected. Install it for wide character support."
25
+ if no_gpgme
26
+ info "No 'gpgme' gem detected. Install it for email encryption, decryption and signatures."
24
27
  end
25
28
 
26
29
  $opts = Trollop::options do
@@ -104,9 +107,10 @@ end
104
107
  ##
105
108
  ## BSD users: if libc.so.6 is not found, try installing compat6x.
106
109
  require 'dl/import'
110
+ require 'rbconfig'
107
111
  module LibC
108
112
  extend DL.const_defined?(:Importer) ? DL::Importer : DL::Importable
109
- setlocale_lib = case Config::CONFIG['arch']
113
+ setlocale_lib = case RbConfig::CONFIG['arch']
110
114
  when /darwin/; "libc.dylib"
111
115
  when /cygwin/; "cygwin1.dll"
112
116
  else; "libc.so.6"
@@ -121,7 +125,7 @@ module LibC
121
125
  rescue RuntimeError => e
122
126
  warn "cannot dlload setlocale(); ncurses wide character support probably broken."
123
127
  warn "dlload error was #{e.class}: #{e.message}"
124
- if Config::CONFIG['arch'] =~ /bsd/
128
+ if RbConfig::CONFIG['arch'] =~ /bsd/
125
129
  warn "BSD variant detected. You may have to install a compat6x package to acquire libc."
126
130
  end
127
131
  end
@@ -287,7 +291,10 @@ begin
287
291
  b, new = bm.spawn_unless_exists("Contact List") { ContactListMode.new }
288
292
  b.mode.load_in_background if new
289
293
  when :search
290
- query = BufferManager.ask :search, "Search all messages (enter for saved searches): "
294
+ completions = LabelManager.all_labels.map { |l| "label:#{LabelManager.string_for l}" }
295
+ completions = completions.each { |l| l.force_encoding 'UTF-8' if l.methods.include?(:encoding) }
296
+ completions += ["from:", "to:", "after:", "before:", "date:", "limit:", "AND", "OR", "NOT"]
297
+ query = BufferManager.ask_many_with_completions :search, "Search all messages (enter for saved searches): ", completions
291
298
  unless query.nil?
292
299
  if query.empty?
293
300
  bm.spawn_unless_exists("Saved searches") { SearchListMode.new }
@@ -404,14 +411,14 @@ unless Redwood::exceptions.empty?
404
411
  end
405
412
  $stderr.puts <<EOS
406
413
  ----------------------------------------------------------------
407
- I'm very sorry. It seems that an error occurred in Sup. Please
408
- accept my sincere apologies. Please submit the contents of
414
+ We are very sorry. It seems that an error occurred in Sup. Please
415
+ accept our sincere apologies. Please submit the contents of
409
416
  #{BASE_DIR}/exception-log.txt and a brief report of the
410
- circumstances to http://masanjin.net/sup-bugs/ so that I might
411
- address this problem. Thank you!
417
+ circumstances to https://github.com/sup-heliotrope/sup/issues so that
418
+ we might address this problem. Thank you!
412
419
 
413
420
  Sincerely,
414
- William
421
+ The Sup Developers
415
422
  ----------------------------------------------------------------
416
423
  EOS
417
424
  Redwood::exceptions.each do |e, name|
data/bin/sup-add CHANGED
@@ -4,7 +4,7 @@ require 'uri'
4
4
  require 'rubygems'
5
5
  require 'highline/import'
6
6
  require 'trollop'
7
- require "sup"; Redwood::check_library_version_against "0.12.1"
7
+ require "sup"; Redwood::check_library_version_against "0.13.0"
8
8
 
9
9
  $opts = Trollop::options do
10
10
  version "sup-add (sup #{Redwood::VERSION})"
@@ -94,7 +94,7 @@ begin
94
94
 
95
95
  parsed_uri = URI(uri)
96
96
 
97
- source =
97
+ source =
98
98
  case parsed_uri.scheme
99
99
  when "maildir"
100
100
  Redwood::Maildir.new uri, !$opts[:unusual], $opts[:archive], nil, labels
@@ -103,7 +103,7 @@ begin
103
103
  when nil
104
104
  Trollop::die "Sources must be specified with an URI"
105
105
  else
106
- Trollop::die "Unknown source type #{parsed_uri.scheme.inspect}"
106
+ Trollop::die "Unknown source type #{parsed_uri.scheme.inspect}"
107
107
  end
108
108
  say "Adding #{source}..."
109
109
  Redwood::SourceManager.add_source source
data/bin/sup-config CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'highline/import'
5
- require 'yaml'
6
5
  require 'trollop'
7
6
  require "sup"
8
7
 
@@ -25,7 +24,7 @@ def axe q, default=nil
25
24
  else
26
25
  ask "#{q}: "
27
26
  end
28
- ans.empty? ? default : ans
27
+ ans.empty? ? default : ans.to_s
29
28
  end
30
29
 
31
30
  def axe_yes q, default="n"
@@ -103,7 +102,7 @@ def add_source
103
102
  system cmd
104
103
  if $?.success?
105
104
  say "Great! Added!"
106
- break
105
+ break
107
106
  else
108
107
  say "Rats, that failed. You may have to do it manually."
109
108
  if axe_yes("Try again?") then next else return end
@@ -210,7 +209,7 @@ if axe_yes "Run sup-sync to import all messages now?"
210
209
  system cmd
211
210
  if $?.success?
212
211
  say "Great! It worked!"
213
- break
212
+ break
214
213
  else
215
214
  say "Rats, that failed. You may have to do it manually."
216
215
  if axe_yes("Try again?") then next else break end
data/bin/sup-import-dump CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'uri'
4
4
  require 'rubygems'
5
5
  require 'trollop'
6
- require "sup"; Redwood::check_library_version_against "git"
6
+ require "sup"; Redwood::check_library_version_against "0.13.0"
7
7
 
8
8
  PROGRESS_UPDATE_INTERVAL = 15 # seconds
9
9
 
data/bin/sup-sync CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'uri'
4
4
  require 'rubygems'
5
5
  require 'trollop'
6
- require "sup"; Redwood::check_library_version_against "0.12.1"
6
+ require "sup"; Redwood::check_library_version_against "0.13.0"
7
7
 
8
8
  PROGRESS_UPDATE_INTERVAL = 15 # seconds
9
9
 
data/bin/sup-sync-back CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'uri'
5
5
  require 'tempfile'
6
6
  require 'trollop'
7
- require "sup"; Redwood::check_library_version_against "0.12.1"
7
+ require "sup"; Redwood::check_library_version_against "0.13.0"
8
8
 
9
9
  fail "not working yet"
10
10
 
@@ -71,7 +71,7 @@ index.lock_interactively or exit
71
71
 
72
72
  deleted_fp, spam_fp = nil
73
73
  unless opts[:dry_run]
74
- deleted_fp = File.open(opts[:move_deleted], "a") if opts[:move_deleted]
74
+ deleted_fp = File.open(opts[:move_deleted], "a") if opts[:move_deleted]
75
75
  spam_fp = File.open(opts[:move_spam], "a") if opts[:move_spam]
76
76
  end
77
77
 
data/bin/sup-tweak-labels CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'trollop'
5
- require "sup"; Redwood::check_library_version_against "0.12.1"
5
+ require "sup"; Redwood::check_library_version_against "0.13.0"
6
6
 
7
7
  class Float
8
8
  def to_s; sprintf '%.2f', self; end
data/lib/sup.rb CHANGED
@@ -1,5 +1,11 @@
1
1
  require 'rubygems'
2
+
3
+ require 'syck'
2
4
  require 'yaml'
5
+ if YAML.const_defined? :ENGINE
6
+ YAML::ENGINE.yamler = 'syck'
7
+ end
8
+
3
9
  require 'zlib'
4
10
  require 'thread'
5
11
  require 'fileutils'
@@ -38,8 +44,6 @@ class Module
38
44
  end
39
45
 
40
46
  module Redwood
41
- VERSION = "0.12.1"
42
-
43
47
  BASE_DIR = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
44
48
  CONFIG_FN = File.join(BASE_DIR, "config.yaml")
45
49
  COLOR_FN = File.join(BASE_DIR, "colors.yaml")
@@ -220,8 +224,8 @@ Until this is corrected, messages from these sources cannot be viewed,
220
224
  and new messages will not be detected. Luckily, this is easy to correct!
221
225
 
222
226
  #{desynced_sources.map do |s|
223
- "Source: " + s.to_s +
224
- "\n Error: " + s.error.message.wrap(70).join("\n ") +
227
+ "Source: " + s.to_s +
228
+ "\n Error: " + s.error.message.wrap(70).join("\n ") +
225
229
  "\n Fix: sup-sync --changed #{s.to_s}"
226
230
  end}
227
231
  EOM
@@ -256,22 +260,47 @@ try this instead:
256
260
  You can also try `gem uninstall sup` and removing all Sup rubygems.
257
261
 
258
262
  EOS
263
+ #' duh!
259
264
  abort
260
265
  end
261
266
  end
262
267
 
263
268
  ## set up default configuration file
264
269
  def load_config filename
270
+ default_config = {
271
+ :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
272
+ :thread_by_subject => false,
273
+ :edit_signature => false,
274
+ :ask_for_from => false,
275
+ :ask_for_to => true,
276
+ :ask_for_cc => true,
277
+ :ask_for_bcc => false,
278
+ :ask_for_subject => true,
279
+ :account_selector => true,
280
+ :confirm_no_attachments => true,
281
+ :confirm_top_posting => true,
282
+ :jump_to_open_message => true,
283
+ :discard_snippets_from_encrypted_messages => false,
284
+ :load_more_threads_when_scrolling => true,
285
+ :default_attachment_save_dir => "",
286
+ :sent_source => "sup://sent",
287
+ :archive_sent => true,
288
+ :poll_interval => 300,
289
+ :wrap_width => 0,
290
+ :slip_rows => 0,
291
+ :col_jump => 2,
292
+ :stem_language => "english"
293
+ }
265
294
  if File.exists? filename
266
295
  config = Redwood::load_yaml_obj filename
267
296
  abort "#{filename} is not a valid configuration file (it's a #{config.class}, not a hash)" unless config.is_a?(Hash)
268
- config
297
+ default_config.merge config
269
298
  else
270
299
  require 'etc'
271
300
  require 'socket'
272
301
  name = Etc.getpwnam(ENV["USER"]).gecos.split(/,/).first rescue nil
273
302
  name ||= ENV["USER"]
274
- email = ENV["USER"] + "@" +
303
+ email = ENV["USER"] + "@" +
275
304
  begin
276
305
  Socket.gethostbyname(Socket.gethostname).first
277
306
  rescue SocketError
@@ -289,24 +318,8 @@ EOS
289
318
  :gpgkey => ""
290
319
  }
291
320
  },
292
- :editor => ENV["EDITOR"] || "/usr/bin/vim -f -c 'setlocal spell spelllang=en_us' -c 'set filetype=mail'",
293
- :thread_by_subject => false,
294
- :edit_signature => false,
295
- :ask_for_from => false,
296
- :ask_for_to => true,
297
- :ask_for_cc => true,
298
- :ask_for_bcc => false,
299
- :ask_for_subject => true,
300
- :confirm_no_attachments => true,
301
- :confirm_top_posting => true,
302
- :jump_to_open_message => true,
303
- :discard_snippets_from_encrypted_messages => false,
304
- :default_attachment_save_dir => "",
305
- :sent_source => "sup://sent",
306
- :poll_interval => 300,
307
- :wrap_width => 0,
308
- :slip_rows => 0
309
321
  }
322
+ config.merge! default_config
310
323
  begin
311
324
  Redwood::save_yaml_obj config, filename, false, true
312
325
  rescue StandardError => e
@@ -321,8 +334,10 @@ EOS
321
334
  :load_config, :managers
322
335
  end
323
336
 
337
+ require 'sup/version'
324
338
  require "sup/util"
325
339
  require "sup/hook"
340
+ require "sup/time"
326
341
 
327
342
  ## everything we need to get logging working
328
343
  require "sup/logger"
@@ -369,6 +384,7 @@ require "sup/horizontal-selector"
369
384
  require "sup/modes/line-cursor-mode"
370
385
  require "sup/modes/help-mode"
371
386
  require "sup/modes/edit-message-mode"
387
+ require "sup/modes/edit-message-async-mode"
372
388
  require "sup/modes/compose-mode"
373
389
  require "sup/modes/resume-mode"
374
390
  require "sup/modes/forward-mode"