sup 0.10.2 → 0.11

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.

@@ -2,40 +2,42 @@ William Morgan <wmorgan-sup at the masanjin dot nets>
2
2
  Rich Lane <rlane at the club.cc.cmu dot edus>
3
3
  Ismo Puustinen <ismo at the iki dot fis>
4
4
  Nicolas Pouillard <nicolas.pouillard at the gmail dot coms>
5
+ Eric Sherman <hyperbolist at the gmail dot coms>
5
6
  Ben Walton <bwalton at the artsci.utoronto dot cas>
6
7
  Mike Stipicevic <stipim at the rpi dot edus>
7
8
  Marcus Williams <marcus-sup at the bar-coded dot nets>
8
9
  Lionel Ott <white.magic at the gmx dot des>
10
+ Tero Tilus <tero at the tilus dot nets>
9
11
  Ingmar Vanhassel <ingmar at the exherbo dot orgs>
10
12
  Mark Alexander <marka at the pobox dot coms>
11
13
  Christopher Warrington <chrisw at the rice dot edus>
12
14
  Richard Brown <rbrown at the exherbo dot orgs>
13
- Anthony Martinez <pi+sup at the pihost dot uss>
14
15
  Marc Hartstein <marc.hartstein at the alum.vassar dot edus>
15
16
  Israel Herraiz <israel.herraiz at the gmail dot coms>
16
- Tero Tilus <tero at the tilus dot nets>
17
+ Anthony Martinez <pi+sup at the pihost dot uss>
18
+ Michael Stapelberg <michael at the stapelberg dot des>
17
19
  Bo Borgerson <gigabo at the gmail dot coms>
18
20
  William Erik Baxter <web at the superscript dot coms>
19
21
  Grant Hollingworth <grant at the antiflux dot orgs>
20
22
  Adeodato Simó <dato at the net.com.org dot ess>
21
- Edward Z. Yang <ezyang at the mit dot edus>
23
+ Daniel Schoepe <daniel.schoepe at the googlemail dot coms>
22
24
  Steve Goldman <sgoldman at the tower-research dot coms>
23
- Michael Stapelberg <michael at the stapelberg dot des>
25
+ Edward Z. Yang <ezyang at the MIT dot EDUs>
24
26
  Decklin Foster <decklin at the red-bean dot coms>
25
- Eric Sherman <hyperbolist at the gmail dot coms>
26
27
  Cameron Matheson <cam+sup at the cammunism dot orgs>
27
28
  Carl Worth <cworth at the cworth dot orgs>
28
- Alex Vandiver <alex at the chmrr dot nets>
29
- Jeff Balogh <its.jeff.balogh at the gmail dot coms>
30
29
  Andrew Pimlott <andrew at the pimlott dot nets>
30
+ Alex Vandiver <alexmv at the mit dot edus>
31
+ Jeff Balogh <its.jeff.balogh at the gmail dot coms>
31
32
  Peter Harkins <ph at the malaprop dot orgs>
32
33
  Kornilios Kourtis <kkourt at the cslab.ece.ntua dot grs>
34
+ Michael Hamann <michael at the content-space dot des>
33
35
  Giorgio Lando <patroclo7 at the gmail dot coms>
34
36
  Benoît PIERRE <benoit.pierre at the gmail dot coms>
35
37
  Jonah <Jonah at the GoodCoffee dot cas>
36
38
  ian <ian at the lorf dot orgs>
37
39
  Steven Walter <swalter at the monarch.(none)>
38
- Jon M. Dugan <jdugan at the es dot nets>
40
+ Alex Vandiver <alex at the chmrr dot nets>
39
41
  Stefan Lundström <lundst at the snabb.(none)>
40
- Michael Hamann <michael at the content-space dot des>
42
+ Jon M. Dugan <jdugan at the es dot nets>
41
43
  Kirill Smelkov <kirr at the landau.phys.spbu dot rus>
@@ -1,3 +1,17 @@
1
+ == 0.11 / 2010-03-07
2
+ * Remove deprecated Ferret backend.
3
+ * Add deprecation notices to IMAP, IMAPS, and mbox+ssh sources.
4
+ * 256 color support.
5
+ * Backwards-compatible index format improvements.
6
+ * Saved searches.
7
+ * Improved support for custom keybindings.
8
+ * Idle detection - poll totals accumulate and index flushes on idle.
9
+ * Several textfield improvments.
10
+ * New hooks: publish, mentions-attachments, keybindings,
11
+ index-mode-date-widget, gpg-args, and crypto-settings.
12
+ * sup-cmd for easy programmatic access to a Sup index.
13
+ * As always, many bugfixes and tweaks.
14
+
1
15
  == 0.10.2 / 2010-01-26
2
16
  * Update gem dependencies to pull in xapian-full and ncursesw instead of ferret
3
17
  and ncurses.
data/README.txt CHANGED
@@ -12,8 +12,7 @@ email as an extension of your long-term memory, Sup is for you.
12
12
  Sup makes it easy to:
13
13
  - Handle massive amounts of email.
14
14
 
15
- - Mix email from different sources: mbox files (even across different
16
- machines), Maildir directories, IMAP folders, and GMail accounts.
15
+ - Mix email from different sources: mbox files and Maildirs.
17
16
 
18
17
  - Instantaneously search over your entire email collection. Search over
19
18
  body text, or use a query language to combine search predicates in any
@@ -39,7 +38,7 @@ Features:
39
38
  operability, regardless of how much amount of email you have.
40
39
 
41
40
  - Immediate full-text search of your entire email archive, using the
42
- Ferret query language. Search over message bodies, labels, from: and
41
+ Xapian query language. Search over message bodies, labels, from: and
43
42
  to: fields, or any combination thereof.
44
43
 
45
44
  - Thread-centrism. Operations are performed at the thread, not the
@@ -73,13 +72,6 @@ Current limitations which will be fixed:
73
72
  source (read, move, delete, etc) with another client Sup will punish
74
73
  you with a lengthy reindexing process.
75
74
 
76
- - Support for mbox, Maildir, and IMAP only at this point. No support for
77
- POP or mh.
78
-
79
- - IMAP support is very slow due mostly to Ruby's IMAP library. You may
80
- consider something like offlineimap to mirror your IMAP folders with
81
- local Maildir ones.
82
-
83
75
  - Unix-centrism in MIME attachment handling and in sendmail invocation.
84
76
 
85
77
  == SYNOPSYS:
@@ -96,7 +88,7 @@ Current limitations which will be fixed:
96
88
 
97
89
  == REQUIREMENTS:
98
90
 
99
- - ferret >= 0.11.6
91
+ - xapian-full >= 1.1.3.2
100
92
  - ncurses >= 0.9.1
101
93
  - rmail >= 0.17
102
94
  - highline
@@ -1,3 +1,19 @@
1
+ Release 0.11:
2
+
3
+ The deprecated Ferret index has been removed.
4
+
5
+ Remote sources (IMAP, IMAPS, and mbox+ssh) have been deprecated and will be
6
+ removed in 0.12. Tools like offlineimap, fetchmail, and rsync provide a much
7
+ better user experience for these mail sources than Sup would ever be able to by
8
+ itself.
9
+
10
+ If your terminal supports it you can now use 256 colors in your colorscheme. Run
11
+ the contrib/colorpicker.rb program to get the color names to put in colors.yaml.
12
+
13
+ Saved searches are now supported. Hit '%' in search-results-mode to save the
14
+ current search, and enter an empty search string to open the list of saved
15
+ searches.
16
+
1
17
  Release 0.10:
2
18
 
3
19
  The Xapian backend is now the default. Convert your old, crash-prone Ferret
data/bin/sup CHANGED
@@ -12,10 +12,15 @@ end
12
12
 
13
13
  require 'fileutils'
14
14
  require 'trollop'
15
- require "sup"; Redwood::check_library_version_against "0.10.2"
15
+ require "sup"; Redwood::check_library_version_against "0.11"
16
+
17
+ if ENV['SUP_PROFILE']
18
+ require 'ruby-prof'
19
+ RubyProf.start
20
+ end
16
21
 
17
22
  if no_ncursesw
18
- debug "No 'ncursesw' gem detected. Install it for wide character support."
23
+ info "No 'ncursesw' gem detected. Install it for wide character support."
19
24
  end
20
25
 
21
26
  $opts = Trollop::options do
@@ -34,7 +39,6 @@ EOS
34
39
  opt :search, "Search for this query upon startup", :type => String
35
40
  opt :compose, "Compose message to this recipient upon startup", :type => String
36
41
  opt :subject, "When composing, use this subject", :type => String, :short => "j"
37
- opt :index, "Use this index type ('auto' for autodetect)", :default => "auto"
38
42
  end
39
43
 
40
44
  Trollop::die :subject, "requires --compose" if $opts[:subject] && !$opts[:compose]
@@ -83,7 +87,15 @@ global_keymap = Keymap.new do |k|
83
87
  k.add :recall_draft, "Edit most recent draft message", 'R'
84
88
  k.add :show_inbox, "Show the Inbox buffer", 'I'
85
89
  k.add :show_console, "Show the Console buffer", '~'
90
+
91
+ ## Submap for less often used keybindings
92
+ k.add_multi "reload (c)olors, rerun (k)eybindings hook", 'O' do |kk|
93
+ kk.add :reload_colors, "Reload colors", 'c'
94
+ kk.add :run_keybindings_hook, "Rerun keybindings hook", 'k'
95
+ end
86
96
  end
97
+
98
+ Redwood::Keymap.run_hook global_keymap
87
99
 
88
100
  ## the following magic enables wide characters when used with a ruby
89
101
  ## ncurses.so that's been compiled against libncursesw. (note the w.) why
@@ -134,40 +146,33 @@ def stop_cursing
134
146
  end
135
147
  module_function :start_cursing, :stop_cursing
136
148
 
137
- Index.init $opts[:index]
149
+ Index.init
138
150
  Index.lock_interactively or exit
139
151
 
140
- if Index.is_a_deprecated_ferret_index?
141
- FERRET_DEPRECATION_WARNING_FN = File.join BASE_DIR, "you-have-been-warned-about-ferret-deprecation"
142
- unless File.exist? FERRET_DEPRECATION_WARNING_FN
143
- $stderr.puts <<EOS
144
- Warning! Your 30-day trial period for using Sup is almost over!
145
-
146
- To purchase the full version of Sup, please see http://sup.rubyforge.org/.
147
-
148
- Just kidding. BUT! You are using an old Ferret index. The Ferret backend is
149
- deprecated and support will be removed in the next version of Sup.
152
+ begin
153
+ Redwood::start
154
+ Index.load
155
+ Index.start_sync_worker unless $opts[:no_threads]
150
156
 
151
- You should convert to Xapian before that happens.
157
+ if Redwood::SourceManager.sources.any? { |x| x.is_a? Redwood::MBox::SSHLoader }
158
+ $stderr.puts <<EOS
159
+ mbox+ssh sources are deprecated and will be removed in the next release.
160
+ Running rsync in your before-poll hook is a good alternative.
152
161
 
153
- The conversion process may take several hours. It is safe and interruptable.
154
- You can start it at any point by typing:
162
+ Press enter to continue.
163
+ EOS
164
+ $stdin.gets
165
+ end
155
166
 
156
- sup-convert-ferret-index
167
+ if Redwood::SourceManager.sources.any? { |x| x.is_a? Redwood::IMAP }
168
+ $stderr.puts <<EOS
169
+ IMAP sources are deprecated and will be removed in the next release.
170
+ Running offlineimap or fetchmail in your before-poll hook is a good alternative.
157
171
 
158
- Press enter to continue and be on your way. You won't see this message
159
- again, just a brief reminder at shutdown.
172
+ Press enter to continue.
160
173
  EOS
161
-
162
174
  $stdin.gets
163
- FileUtils.touch FERRET_DEPRECATION_WARNING_FN
164
175
  end
165
- end
166
-
167
- begin
168
- Redwood::start
169
- Index.load
170
- Index.start_sync_worker unless $opts[:no_threads]
171
176
 
172
177
  $die = false
173
178
  trap("TERM") { |x| $die = true }
@@ -234,6 +239,7 @@ begin
234
239
 
235
240
  unless $opts[:no_threads]
236
241
  PollManager.start
242
+ IdleManager.start
237
243
  Index.start_lock_update_thread
238
244
  end
239
245
 
@@ -258,6 +264,8 @@ begin
258
264
  next
259
265
  end
260
266
 
267
+ IdleManager.ping
268
+
261
269
  if c == 410
262
270
  ## this is ncurses's way of telling us it's detected a refresh.
263
271
  ## since we have our own sigwinch handler, we don't do anything.
@@ -266,15 +274,16 @@ begin
266
274
 
267
275
  bm.erase_flash
268
276
 
269
- action = begin
270
- if bm.handle_input c
277
+ action =
278
+ begin
279
+ if bm.handle_input c
280
+ :nothing
281
+ else
282
+ bm.resolve_input_with_keymap c, global_keymap
283
+ end
284
+ rescue InputSequenceAborted
271
285
  :nothing
272
- else
273
- bm.resolve_input_with_keymap c, global_keymap
274
286
  end
275
- rescue InputSequenceAborted
276
- :nothing
277
- end
278
287
  case action
279
288
  when :quit_now
280
289
  break if bm.kill_all_buffers_safely
@@ -297,9 +306,14 @@ begin
297
306
  b, new = bm.spawn_unless_exists("Contact List") { ContactListMode.new }
298
307
  b.mode.load_in_background if new
299
308
  when :search
300
- query = BufferManager.ask :search, "search all messages: "
301
- next unless query && query !~ /^\s*$/
302
- SearchResultsMode.spawn_from_query query
309
+ query = BufferManager.ask :search, "Search all messages (enter for saved searches): "
310
+ unless query.nil?
311
+ if query.empty?
312
+ bm.spawn_unless_exists("Saved searches") { SearchListMode.new }
313
+ else
314
+ SearchResultsMode.spawn_from_query query
315
+ end
316
+ end
303
317
  when :search_unread
304
318
  SearchResultsMode.spawn_from_query "is:unread"
305
319
  when :list_labels
@@ -339,6 +353,15 @@ begin
339
353
  when :show_console
340
354
  b, new = bm.spawn_unless_exists("Console", :system => true) { ConsoleMode.new }
341
355
  b.mode.run
356
+ when :reload_colors
357
+ Colormap.reset
358
+ Colormap.populate_colormap
359
+ bm.completely_redraw_screen
360
+ bm.flash "reloaded colors"
361
+ when :run_keybindings_hook
362
+ HookManager.clear_one 'keybindings'
363
+ Keymap.run_hook global_keymap
364
+ bm.flash "keybindings hook run"
342
365
  when :nothing, InputSequenceAborted
343
366
  when :redraw
344
367
  bm.completely_redraw_screen
@@ -355,6 +378,7 @@ rescue Exception => e
355
378
  ensure
356
379
  unless $opts[:no_threads]
357
380
  PollManager.stop if PollManager.instantiated?
381
+ IdleManager.stop if IdleManager.instantiated?
358
382
  Index.stop_lock_update_thread
359
383
  end
360
384
 
@@ -379,6 +403,11 @@ ensure
379
403
  end
380
404
 
381
405
  Index.unlock
406
+
407
+ if (fn = ENV['SUP_PROFILE'])
408
+ result = RubyProf.stop
409
+ File.open(fn, 'w') { |io| RubyProf::CallTreePrinter.new(result).print(io) }
410
+ end
382
411
  end
383
412
 
384
413
  unless Redwood::exceptions.empty?
@@ -406,8 +435,4 @@ EOS
406
435
  end
407
436
  end
408
437
 
409
- if Index.is_a_deprecated_ferret_index?
410
- puts "Reminder: to update your Ferret index to Xapian, run sup-convert-ferret-index."
411
- end
412
-
413
438
  end
@@ -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.10.2"
7
+ require "sup"; Redwood::check_library_version_against "0.11"
8
8
 
9
9
  $opts = Trollop::options do
10
10
  version "sup-add (sup #{Redwood::VERSION})"
@@ -20,15 +20,6 @@ For mbox files on local disk, use the form:
20
20
  mbox:<path to mbox file>, or
21
21
  mbox://<path to mbox file>
22
22
 
23
- For mbox files on remote machines, use the form:
24
- mbox+ssh://<machine name>/<path to mbox file>
25
-
26
- For IMAP folders, use the form (note no username or password!):
27
- imap://<machine name>/ # unsecure, "INBOX" folder
28
- imap://<machine name>/<folder> # unsecure, arbitrary
29
- imaps://<machine name>/ # secure, "INBOX" folder
30
- imaps://<machine name>/<folder> # secure, arbitrary folder
31
-
32
23
  For Maildir folders, use the form:
33
24
  maildir:<path to Maildir directory>; or
34
25
  maildir://<path to Maildir directory>
@@ -40,7 +31,6 @@ EOS
40
31
  opt :labels, "A comma-separated set of labels to apply to all messages from this source", :type => String
41
32
  opt :force_new, "Create a new account for this source, even if one already exists."
42
33
  opt :force_account, "Reuse previously defined account user@hostname.", :type => String
43
- opt :index, "Use this index type ('auto' for autodetect)", :default => "auto"
44
34
  end
45
35
 
46
36
  Trollop::die "require one or more sources" if ARGV.empty?
@@ -86,7 +76,7 @@ end
86
76
 
87
77
  $terminal.wrap_at = :auto
88
78
  Redwood::start
89
- index = Redwood::Index.init $opts[:index]
79
+ index = Redwood::Index.init
90
80
  index.load
91
81
 
92
82
  index.lock_interactively or exit
@@ -106,14 +96,6 @@ begin
106
96
 
107
97
  source =
108
98
  case parsed_uri.scheme
109
- when "mbox+ssh"
110
- say "For SSH connections, if you will use public key authentication, you may leave the username and password blank."
111
- say ""
112
- username, password = get_login_info uri, Redwood::SourceManager.sources
113
- Redwood::MBox::SSHLoader.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
114
- when "imap", "imaps"
115
- username, password = get_login_info uri, Redwood::SourceManager.sources
116
- Redwood::IMAP.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
117
99
  when "maildir"
118
100
  Redwood::Maildir.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
119
101
  when "mbox"
@@ -44,9 +44,6 @@ def add_source
44
44
  menu.prompt = "What type of mail source is it? "
45
45
  menu.choice("mbox file") { type = :mbox }
46
46
  menu.choice("maildir directory") { type = :maildir }
47
- menu.choice("remote mbox file (accessible via ssh)") { type = :mboxssh }
48
- menu.choice("IMAP server (secure)") { type = :imaps }
49
- menu.choice("IMAP server (unsecure)") { type = :imap }
50
47
  menu.choice("Get me out of here!") { return }
51
48
  end
52
49
 
@@ -70,37 +67,6 @@ def add_source
70
67
  $last_fn = fn
71
68
  [Redwood::Maildir.suggest_labels_for(fn),
72
69
  { :scheme => "maildir", :path => fn }]
73
- when :mboxssh
74
- $last_server ||= "localhost"
75
- srv = axe "What machine is the mbox file located on?", $last_server
76
- return if srv.nil? || srv.empty?
77
- $last_server = srv
78
-
79
- fn = axe "What's the path to the mbox file?", $last_fn
80
- return if fn.nil? || fn.empty?
81
- $last_fn = fn
82
- fn = "/#{fn}" # lame
83
- [Redwood::MBox::SSHLoader.suggest_labels_for(fn),
84
- { :scheme => "mbox+ssh", :host => srv, :path => fn }]
85
- when :imap, :imaps
86
- $last_server ||= "localhost"
87
- srv = axe "What is the IMAP server (host, or host:port notation)?", $last_server
88
- return if srv.nil? || srv.empty?
89
- $last_server = srv
90
-
91
- $last_folder ||= "INBOX"
92
- fn = axe "What's the folder path?", $last_folder
93
- return if fn.nil? || fn.empty?
94
- $last_folder = fn
95
-
96
- fn = "/#{fn}"
97
- if srv =~ /^(\S+):(\d+)$/
98
- host, port = $1, $2.to_i
99
- else
100
- host, port = srv, nil
101
- end
102
- [Redwood::IMAP.suggest_labels_for(fn),
103
- { :scheme => type.to_s, :host => host, :port => port, :path => fn }]
104
70
  end
105
71
 
106
72
  uri = begin
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'trollop'
5
- require "sup"; Redwood::check_library_version_against "0.10.2"
5
+ require "sup"; Redwood::check_library_version_against "0.11"
6
6
 
7
7
  $opts = Trollop::options do
8
8
  version "sup-dump (sup #{Redwood::VERSION})"
@@ -16,13 +16,10 @@ the index format. This happened, for example, at Ferret version 0.11.
16
16
  Usage:
17
17
  sup-dump > <filename>
18
18
  sup-dump | bzip2 > <filename> # even better
19
-
20
- Options:
21
19
  EOS
22
- opt :index, "Use this index type ('auto' for autodetect)", :default => "auto"
23
20
  end
24
21
 
25
- index = Redwood::Index.init $opts[:index]
22
+ index = Redwood::Index.init
26
23
  Redwood::SourceManager.init
27
24
  index.load
28
25