]> git.cworth.org Git - sup/log
sup
14 years agoMerge branch 'preemptive-loading' into next
William Morgan [Thu, 3 Sep 2009 17:53:47 +0000 (13:53 -0400)]
Merge branch 'preemptive-loading' into next

14 years agomake load-more callbacks use a queue and be thread-safe
William Morgan [Thu, 3 Sep 2009 17:49:17 +0000 (13:49 -0400)]
make load-more callbacks use a queue and be thread-safe

Replaced previous insane implementation with something that actually
makes sense.

14 years agoui responsiveness tweaks
Rich Lane [Sun, 23 Aug 2009 18:46:11 +0000 (11:46 -0700)]
ui responsiveness tweaks

14 years agopreemptively load messages when scrolling
Rich Lane [Sun, 23 Aug 2009 18:46:10 +0000 (11:46 -0700)]
preemptively load messages when scrolling

14 years agoMerge branch 'alignment-tweaks' into next
William Morgan [Thu, 3 Sep 2009 17:09:45 +0000 (13:09 -0400)]
Merge branch 'alignment-tweaks' into next

14 years agorejigger alignment of messages when using 'n' and 'p'
William Morgan [Thu, 3 Sep 2009 17:08:29 +0000 (13:08 -0400)]
rejigger alignment of messages when using 'n' and 'p'

minimize horizontal movement. 'z' can be used to force alignment of
current message with left column.

14 years agomove open3 require to correct file
William Morgan [Thu, 3 Sep 2009 16:35:23 +0000 (12:35 -0400)]
move open3 require to correct file

14 years agoMerge branch 'master' into next
William Morgan [Thu, 3 Sep 2009 15:23:05 +0000 (11:23 -0400)]
Merge branch 'master' into next

14 years agosup-sync: restore state on messages that don't already exist
Rich Lane [Sun, 23 Aug 2009 18:36:59 +0000 (11:36 -0700)]
sup-sync: restore state on messages that don't already exist

14 years agoRevert "Merge branch 'after-add-message-hook' into next"
William Morgan [Wed, 2 Sep 2009 13:45:11 +0000 (09:45 -0400)]
Revert "Merge branch 'after-add-message-hook' into next"

This reverts commit 67214e30d648ac9351b9898f8e1587d065264787.

This hook was causing sup-sync to fail on large mailboxes,
because it was keeping every message around in memory.

14 years agoMerge branch 'xapian-updates' into next
William Morgan [Tue, 1 Sep 2009 03:15:47 +0000 (23:15 -0400)]
Merge branch 'xapian-updates' into next

14 years agoremove use of Object#tap
Rich Lane [Sun, 30 Aug 2009 20:28:55 +0000 (13:28 -0700)]
remove use of Object#tap

14 years agoMerge branch 'logging' into next
William Morgan [Tue, 1 Sep 2009 03:04:05 +0000 (23:04 -0400)]
Merge branch 'logging' into next

14 years agomake SUP_LOG_LEVEL self-documenting
Carl Worth [Wed, 26 Aug 2009 21:35:25 +0000 (14:35 -0700)]
make SUP_LOG_LEVEL self-documenting

The idea here is that if someone is looking at the log and not seeing
the information of interest, then the log itself should tell them
how to get more information, (by suggesting to set SUP_LOG_LEVEL
to the next lower level).

14 years agoMerge branch 'master' into next
William Morgan [Tue, 1 Sep 2009 02:59:24 +0000 (22:59 -0400)]
Merge branch 'master' into next

14 years agoadd UTF-8 encoding string for ArchLinux systems
Israel Herraiz [Tue, 25 Aug 2009 09:29:01 +0000 (11:29 +0200)]
add UTF-8 encoding string for ArchLinux systems

in ArchLinux, UTF-8 encoding is identified by "utf8" instead of
"UTF-8".

14 years agoMerge branch 'reply-all-keybindings' into next
William Morgan [Tue, 1 Sep 2009 02:47:37 +0000 (22:47 -0400)]
Merge branch 'reply-all-keybindings' into next

14 years agoreply all keybindings
Rich Lane [Sun, 23 Aug 2009 18:49:02 +0000 (11:49 -0700)]
reply all keybindings

14 years agoMerge branch 'logging' into next
William Morgan [Tue, 1 Sep 2009 02:38:15 +0000 (22:38 -0400)]
Merge branch 'logging' into next

Conflicts:
lib/sup/hook.rb

14 years agominor: move hook load messages from info to debug
William Morgan [Tue, 1 Sep 2009 02:37:35 +0000 (22:37 -0400)]
minor: move hook load messages from info to debug

14 years agoMerge branch 'hook-local-vars' into next
William Morgan [Tue, 1 Sep 2009 02:33:10 +0000 (22:33 -0400)]
Merge branch 'hook-local-vars' into next

14 years agobugfix: clear cached lambda hook locals after hook call
William Morgan [Tue, 1 Sep 2009 02:32:56 +0000 (22:32 -0400)]
bugfix: clear cached lambda hook locals after hook call

14 years agoMerge branch 'master' into next
William Morgan [Tue, 25 Aug 2009 14:07:10 +0000 (10:07 -0400)]
Merge branch 'master' into next

14 years agoremove obsolete Manifest.txt
William Morgan [Tue, 25 Aug 2009 14:04:49 +0000 (10:04 -0400)]
remove obsolete Manifest.txt

14 years agoMerge branch 'run-mailcap-fixes'
William Morgan [Tue, 25 Aug 2009 13:53:36 +0000 (09:53 -0400)]
Merge branch 'run-mailcap-fixes'

Conflicts:
lib/sup/message-chunks.rb

14 years agoMerge branch 'buffer-rolling'
William Morgan [Tue, 25 Aug 2009 13:53:04 +0000 (09:53 -0400)]
Merge branch 'buffer-rolling'

14 years agoMerge branch 'locking-refactor'
William Morgan [Tue, 25 Aug 2009 13:51:15 +0000 (09:51 -0400)]
Merge branch 'locking-refactor'

Conflicts:
bin/sup
bin/sup-sync-back
bin/sup-tweak-labels
lib/sup.rb
lib/sup/suicide.rb

14 years agoMerge branch 'ncurses-fixes'
William Morgan [Tue, 25 Aug 2009 13:39:18 +0000 (09:39 -0400)]
Merge branch 'ncurses-fixes'

Conflicts:
lib/sup/buffer.rb

14 years agoMerge branch 'various-api-refactors'
William Morgan [Tue, 25 Aug 2009 13:38:45 +0000 (09:38 -0400)]
Merge branch 'various-api-refactors'

14 years agoMerge branch 'logging'
William Morgan [Tue, 25 Aug 2009 13:38:33 +0000 (09:38 -0400)]
Merge branch 'logging'

14 years agoMerge branch 'xapian-updates' into next
William Morgan [Mon, 24 Aug 2009 23:21:22 +0000 (19:21 -0400)]
Merge branch 'xapian-updates' into next

14 years agoMerge branch 'after-add-message-hook' into next
William Morgan [Mon, 24 Aug 2009 22:44:13 +0000 (18:44 -0400)]
Merge branch 'after-add-message-hook' into next

Conflicts:

lib/sup/poll.rb

14 years agoadd Message#load_from_index! shortcut
Rich Lane [Sat, 22 Aug 2009 18:28:15 +0000 (11:28 -0700)]
add Message#load_from_index! shortcut

Message#parse_header is slow, taking up to 2/3 of the time spent loading
threads in thread-index-mode. This patch adds a shortcut method that the index
can use to efficiently initialize a message.

14 years agoadd an after-add-message hook
Kevin Riggle [Fri, 21 Aug 2009 01:57:42 +0000 (21:57 -0400)]
add an after-add-message hook

I want to do some unrelated processing on each message I receive, but I
don't want to block the message being added to the index.  This patch
adds a hook which runs /after/ the message is added to the index.

14 years agoMerge branch 'hook-local-vars' into next
William Morgan [Mon, 24 Aug 2009 22:35:37 +0000 (18:35 -0400)]
Merge branch 'hook-local-vars' into next

14 years agofix proc locals, which must use the old method trick
William Morgan [Mon, 24 Aug 2009 22:32:39 +0000 (18:32 -0400)]
fix proc locals, which must use the old method trick

For hook locals that are specified as procs (usually for performance
reasons), use methods instead of local variables. Sadly you don't get
all the regular variable semantics, but it is the only option for
delayed evaluation AFAICT.

14 years agoconvert a couple of arrays to sets for labels
Carl Worth [Thu, 20 Aug 2009 00:21:59 +0000 (17:21 -0700)]
convert a couple of arrays to sets for labels

This fixes some crashes when using 'l' in thread-view-mode that
have been present since commit 7aea418a8a62b7070eee764475fcfc0bdd8d58dd
("maintain labels as Sets rather than arrays").

14 years agoMerge branch 'hook-local-vars' into next
William Morgan [Sun, 23 Aug 2009 17:24:59 +0000 (13:24 -0400)]
Merge branch 'hook-local-vars' into next

Conflicts:
lib/sup/hook.rb

14 years agorewrite hookmanager to use eval for locals
William Morgan [Sun, 23 Aug 2009 17:11:14 +0000 (13:11 -0400)]
rewrite hookmanager to use eval for locals

This should fix all the issues that were cropping up when locals were faked
with method calls (the setter issue and the nil issue).

14 years agoMerge branch 'master' into next
William Morgan [Sat, 22 Aug 2009 14:56:15 +0000 (10:56 -0400)]
Merge branch 'master' into next

14 years agofix garbaged text in textfield when using ncursesw
Benoît PIERRE [Wed, 19 Aug 2009 20:56:55 +0000 (22:56 +0200)]
fix garbaged text in textfield when using ncursesw

Apparently, field_buffer content is not initialized to blanks when using
the wide-character version of ncurses. Forcing a call to
set_field_buffer fix the problem.

14 years agoMerge branch 'master' into next
William Morgan [Sat, 22 Aug 2009 14:49:59 +0000 (10:49 -0400)]
Merge branch 'master' into next

14 years agofix a thread merging bug introduced by refactoring in 59f8fc2
Alex Vandiver [Tue, 18 Aug 2009 18:30:00 +0000 (14:30 -0400)]
fix a thread merging bug introduced by refactoring in 59f8fc2

Signed-off-by: Alex Vandiver <alex@chmrr.net>
14 years agoMerge branch 'logging' into next
William Morgan [Sat, 22 Aug 2009 14:33:41 +0000 (10:33 -0400)]
Merge branch 'logging' into next

14 years agoswitch non-error imap messages to info from debug
William Morgan [Sat, 22 Aug 2009 14:33:19 +0000 (10:33 -0400)]
switch non-error imap messages to info from debug

14 years agominor logging output tweak
William Morgan [Sat, 22 Aug 2009 14:24:11 +0000 (10:24 -0400)]
minor logging output tweak

14 years agoMerge branch 'xapian-updates' into next
William Morgan [Sat, 22 Aug 2009 14:17:02 +0000 (10:17 -0400)]
Merge branch 'xapian-updates' into next

14 years agoxapian index format versioning
Rich Lane [Sun, 16 Aug 2009 20:28:56 +0000 (16:28 -0400)]
xapian index format versioning

14 years agomove all GDBM data into Xapian
Rich Lane [Sun, 16 Aug 2009 19:35:30 +0000 (12:35 -0700)]
move all GDBM data into Xapian

Keeping everything in Xapian means much better consistency in case of a crash.
Thread killing is now supported.

14 years agoMerge branch 'various-api-refactors' into next
William Morgan [Wed, 19 Aug 2009 18:34:34 +0000 (14:34 -0400)]
Merge branch 'various-api-refactors' into next

14 years agominor misc code tweaks
William Morgan [Wed, 19 Aug 2009 18:34:27 +0000 (14:34 -0400)]
minor misc code tweaks

14 years agohave mbox, maildir and imap sources (de)serialize labels nicely
William Morgan [Wed, 19 Aug 2009 18:32:46 +0000 (14:32 -0400)]
have mbox, maildir and imap sources (de)serialize labels nicely

At output time, rather than emitting a YAML Set (which is nasty), emit an array
of strings. At input time, normalize into a Set of labels.

14 years agoadd hooks for before- and after- yaml marshalling
William Morgan [Wed, 19 Aug 2009 18:31:25 +0000 (14:31 -0400)]
add hooks for before- and after- yaml marshalling

14 years agoMerge branch 'console-mode' into next
William Morgan [Tue, 18 Aug 2009 18:36:23 +0000 (14:36 -0400)]
Merge branch 'console-mode' into next

Conflicts:
lib/sup/modes/console-mode.rb

14 years agoadd intro help text and 'e' command to console mode
William Morgan [Tue, 18 Aug 2009 18:33:04 +0000 (14:33 -0400)]
add intro help text and 'e' command to console mode

'e' restarts evaluation once you've stopped it with ctrl-g.

14 years agoMerge branch 'console-mode' into next
William Morgan [Tue, 18 Aug 2009 18:01:06 +0000 (14:01 -0400)]
Merge branch 'console-mode' into next

Conflicts:
bin/sup

14 years agoconsole: clear_hooks
Rich Lane [Mon, 17 Aug 2009 06:39:15 +0000 (23:39 -0700)]
console: clear_hooks

14 years agoconsole: reload
Rich Lane [Mon, 17 Aug 2009 06:39:14 +0000 (23:39 -0700)]
console: reload

14 years agoconsole: index internals accessor
Rich Lane [Mon, 17 Aug 2009 06:39:13 +0000 (23:39 -0700)]
console: index internals accessor

14 years agoconsole: add/remove labels
Rich Lane [Mon, 17 Aug 2009 06:39:12 +0000 (23:39 -0700)]
console: add/remove labels

14 years agoconsole mode
Rich Lane [Mon, 17 Aug 2009 06:39:11 +0000 (23:39 -0700)]
console mode

14 years agoMerge branch 'master' into next
William Morgan [Tue, 18 Aug 2009 17:38:17 +0000 (13:38 -0400)]
Merge branch 'master' into next

14 years agoadd 'I' keybinding to raise Inbox buffer
Rich Lane [Sun, 16 Aug 2009 19:36:08 +0000 (12:36 -0700)]
add 'I' keybinding to raise Inbox buffer

14 years agoMerge branch 'buffer-rolling' into next
William Morgan [Tue, 18 Aug 2009 17:35:00 +0000 (13:35 -0400)]
Merge branch 'buffer-rolling' into next

14 years agoskip system buffers when rolling
Rich Lane [Sun, 16 Aug 2009 19:35:59 +0000 (12:35 -0700)]
skip system buffers when rolling

14 years agoMerge branch 'master' into next
William Morgan [Tue, 18 Aug 2009 17:30:38 +0000 (13:30 -0400)]
Merge branch 'master' into next

14 years agomaildir: allow ', ' in the unique-name portion of a maildir filename
Carl Worth [Sat, 15 Aug 2009 04:29:43 +0000 (21:29 -0700)]
maildir: allow ', ' in the unique-name portion of a maildir filename

The maildir specification says the following about unique names:

    A unique name can be anything that doesn't contain a colon (or
    slash) and doesn't start with a dot.

    [http://cr.yp.to/proto/maildir.html]

So disallowing a unique name to have a comma breaks maildir import on
systems where there is a comma in the names.

14 years agoMerge branch 'ncurses-fixes' into next
William Morgan [Tue, 18 Aug 2009 16:07:54 +0000 (09:07 -0700)]
Merge branch 'ncurses-fixes' into next

14 years agoncurses cursor pops on after refresh. disable that.
William Morgan [Tue, 18 Aug 2009 16:07:28 +0000 (09:07 -0700)]
ncurses cursor pops on after refresh. disable that.

Yet more shotgun programming.

14 years agoMerge branch 'logging' into next
William Morgan [Tue, 18 Aug 2009 02:29:11 +0000 (19:29 -0700)]
Merge branch 'logging' into next

14 years agobugfix:relay event when new message is added to index
William Morgan [Tue, 18 Aug 2009 02:28:35 +0000 (19:28 -0700)]
bugfix:relay event when new message is added to index

made this fancy method, and then i forgot to use it!

14 years agoclean up some minor conflict mis-resolutions
William Morgan [Mon, 17 Aug 2009 20:32:57 +0000 (13:32 -0700)]
clean up some minor conflict mis-resolutions

14 years agoMerge branch 'logging' into next
William Morgan [Mon, 17 Aug 2009 19:24:26 +0000 (15:24 -0400)]
Merge branch 'logging' into next

Conflicts:
bin/sup
bin/sup-sync-back
bin/sup-tweak-labels
lib/sup.rb
lib/sup/buffer.rb
lib/sup/message-chunks.rb
lib/sup/suicide.rb

14 years agorewrite logging to have multiple levels: debug, info, etc.
William Morgan [Mon, 17 Aug 2009 15:47:20 +0000 (11:47 -0400)]
rewrite logging to have multiple levels: debug, info, etc.

Level is now set by SUP_LOG_LEVEL environment variable.

Big patch here, but most of it is replacing the old Redwood::log calls.

Some work on poll-mode, which subclasses log-mode. Remind me never to use
inheritance again.

14 years agorewrite Singleton to not require i_am_the_instance
William Morgan [Wed, 12 Aug 2009 17:14:34 +0000 (13:14 -0400)]
rewrite Singleton to not require i_am_the_instance

The flip side is that you have to use .init instead of .new.

14 years agominor code style tweaks and whitespace removals
William Morgan [Mon, 3 Aug 2009 16:27:14 +0000 (12:27 -0400)]
minor code style tweaks and whitespace removals

14 years agorefactor index access into three methods and rewrite PollManager#each_message_from
William Morgan [Tue, 11 Aug 2009 19:34:50 +0000 (15:34 -0400)]
refactor index access into three methods and rewrite PollManager#each_message_from

Couple big changes in this commit, but they're all tied together.

Index.sync_message is refactored into three separate methods: add_message,
update_message and update_message_state. The intention is that add_message is
called for new messages only, update_message is called for changing the method
body on disk (e.g. when we see multiple copies of the same message, or by
DraftManager when the text of a draft is changes), and update_message_state is
called when the labels on a message change. So indexes that differentiate those
operations can exhibit more natural performance characteristics.

Also, PollManager.add_messages_from has been renamed to each_message_from and
changed significantly. It now *only* yields successive messages; it does not
load the index version of the message, and it does not auto-add the message to
the index.  (In fact, it ignores the result of the block.) There's also a new
method called add_new_message that calls Index.add_message and then relays the
update to other GUI elements.

There was a lot of refactoring of sup-sync that was part of this. Probably
not strictly necessary but it was too hard to untangle the changes.

14 years agomaintain labels as Sets rather than arrays
William Morgan [Tue, 11 Aug 2009 20:00:52 +0000 (16:00 -0400)]
maintain labels as Sets rather than arrays

14 years agoMerge branch 'ncurses-fixes' into next
William Morgan [Sun, 16 Aug 2009 22:00:10 +0000 (18:00 -0400)]
Merge branch 'ncurses-fixes' into next

14 years agorestore keypad mode after we force ncurses to refresh the whole screen
Benoît PIERRE [Fri, 14 Aug 2009 23:08:48 +0000 (01:08 +0200)]
restore keypad mode after we force ncurses to refresh the whole screen

This also happen to fix a regression after a call to run-mailcap, since
for some reason a screen resize event is triggered when we get control
back...

14 years agoMerge branch 'master' into next
William Morgan [Sun, 16 Aug 2009 21:02:25 +0000 (17:02 -0400)]
Merge branch 'master' into next

14 years agowhen writing mbox files, output From_ line date as utc
William Morgan [Sun, 16 Aug 2009 21:01:45 +0000 (17:01 -0400)]
when writing mbox files, output From_ line date as utc

Otherwise, parsing the From_ lines later will fail!

14 years agoMerge branch 'run-mailcap-fixes' into next
William Morgan [Fri, 14 Aug 2009 20:13:33 +0000 (13:13 -0700)]
Merge branch 'run-mailcap-fixes' into next

14 years agouse BufferManager.shell_out to call run-mailcap instead of system
Benoît PIERRE [Tue, 11 Aug 2009 22:09:41 +0000 (00:09 +0200)]
use BufferManager.shell_out to call run-mailcap instead of system

This ensure ncurses state is correctly restored upon command completion.

14 years agodon't redirect stderr to /dev/null when calling run-mailcap
Benoît PIERRE [Tue, 11 Aug 2009 22:09:40 +0000 (00:09 +0200)]
don't redirect stderr to /dev/null when calling run-mailcap

Some programs will fail to work correctly if this is done, like for
example: w3m --dump, to view HTML files.

14 years agoMerge branch 'master' into next
William Morgan [Tue, 11 Aug 2009 20:16:07 +0000 (16:16 -0400)]
Merge branch 'master' into next

14 years agomove xapian index loading into load_index
Rich Lane [Thu, 6 Aug 2009 19:32:44 +0000 (12:32 -0700)]
move xapian index loading into load_index

14 years agoMerge branch 'master' into next
William Morgan [Tue, 11 Aug 2009 20:02:30 +0000 (16:02 -0400)]
Merge branch 'master' into next

14 years agoallow sup-sync to use --start-at with --restored
William Morgan [Mon, 3 Aug 2009 16:24:10 +0000 (12:24 -0400)]
allow sup-sync to use --start-at with --restored

14 years agoMerge branch 'locking-refactor' into next
William Morgan [Fri, 7 Aug 2009 01:36:36 +0000 (21:36 -0400)]
Merge branch 'locking-refactor' into next

14 years agoMerge branch 'ncurses-fixes' into next
William Morgan [Fri, 7 Aug 2009 01:36:22 +0000 (21:36 -0400)]
Merge branch 'ncurses-fixes' into next

14 years agorefactor index locking interaction and replace suicidemanager
William Morgan [Fri, 7 Aug 2009 01:33:19 +0000 (21:33 -0400)]
refactor index locking interaction and replace suicidemanager

Since SIGTERM now works, we have a better way of killing a remote
process than SuicideManager. So replace that with a $die global.
Also refactor the interactive locking code into a separate module
so as not to pollute index.rb with such trivial concerns.

14 years agodie gracefully upon SIGKILL
William Morgan [Fri, 7 Aug 2009 00:25:41 +0000 (20:25 -0400)]
die gracefully upon SIGKILL

14 years agoMerge branch 'ncurses-fixes' into next
William Morgan [Thu, 6 Aug 2009 18:30:12 +0000 (14:30 -0400)]
Merge branch 'ncurses-fixes' into next

Conflicts:
bin/sup
lib/sup/buffer.rb

14 years agorewrap getch in select, handle sigwinch manually
William Morgan [Thu, 6 Aug 2009 16:21:46 +0000 (12:21 -0400)]
rewrap getch in select, handle sigwinch manually

This is necessary to operate with many versions of the ruby ncurses library,
all of which block threads when getch is being called. But this means we can't
use getch to determine a sigwich, since we won't see it until an actual key is
pressed. so we handle sigwinch ourselves.

14 years agoRevert "Merge branch 'ncurses-fixes' into next"
William Morgan [Wed, 5 Aug 2009 20:39:15 +0000 (16:39 -0400)]
Revert "Merge branch 'ncurses-fixes' into next"

This reverts commit 96b55e2fd39105679dcbb2aa1449a2a09ed5a8c8.

14 years agoMerge branch 'ncurses-fixes' into next
William Morgan [Wed, 5 Aug 2009 19:55:47 +0000 (15:55 -0400)]
Merge branch 'ncurses-fixes' into next

14 years agoMerge branch 'master' into next
William Morgan [Wed, 5 Aug 2009 19:55:42 +0000 (15:55 -0400)]
Merge branch 'master' into next

14 years agotrap term
William Morgan [Wed, 5 Aug 2009 19:41:45 +0000 (15:41 -0400)]
trap term

14 years agoimprove ncurses key handling for sigwinch and sigint
William Morgan [Wed, 5 Aug 2009 19:40:02 +0000 (15:40 -0400)]
improve ncurses key handling for sigwinch and sigint

see comments. adding a nodelay call before each getch means we don't need a
select() call, which means that we can get sigwinch and sigint signals from
ncurses.