[sup-devel] [PATCH] fix reference to EncodingUnsupportedError

2010-06-29 Thread Sascha Silbe
This fixes the following error: ./lib/sup/message.rb:473:in `message_to_chunks': uninitialized constant Redwood::Message::EncodingUnsupportedError (NameError) Signed-off-by: Sascha Silbe --- lib/sup/message.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/li

[sup-devel] [PATCH] Don't choke when scanning message with unknown encoding

2010-06-29 Thread Sascha Silbe
er 0.60 Signed-off-by: Sascha Silbe --- lib/sup/message.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 1385585..a13fc0c 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -259,7 +259,7 @@ class Message

[sup-devel] [PATCH] fix crash in sup-dump if the default sent source is used

2010-06-29 Thread Sascha Silbe
This fixes a crash in sup-dump if the index contains a "sent" message and no "sent" folder has been explicitly configured in the config file (so it hasn't been added to sources.yaml). Signed-off-by: Sascha Silbe --- bin/sup-dump |7 +++ 1 files changed, 7 i

[sup-devel] Will sup blow up after adding 10k sources?

2010-06-29 Thread Sascha Silbe
Hi! While fixing the sup-dump vs. default sent source bug (see posted patch) I stumbled over the following pieces of code: 1. SentManager uses source_id of 9998 for the default sent source (lib/sup/sent.rb:52) 2. DraftManager uses a fixed source_id of (lib/sup/draft.rb:13,49) 3. Source

[sup-devel] [PATCH] parse_header: don't use empty or invalid Message-ID header

2010-07-01 Thread Sascha Silbe
If Message-ID contains only invalid characters (or none at all), sanitize_message_id will return an empty string. As Message.parse_header only checked for header existance, not validity, sup-dump could produce a dump file that sup-sync would choke on. We now fall back to a fake id for both missing

Re: [sup-devel] [PATCH] parse_header: don't use empty or invalid Message-ID header

2010-07-01 Thread Sascha Silbe
Excerpts from Ben Walton's message of Thu Jul 01 14:33:22 + 2010: > > + #from = header["from"] > > This patch looks good, but why include the commented line? I just commented out a line that was only useful in combination with the line directly below it that was already commented out. If

Re: [sup-devel] [PATCH] parse_header: don't use empty or invalid Message-ID header

2010-07-03 Thread Sascha Silbe
[several patches from this and other threads] > Applied to master. Thanks! Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/m

Re: [sup-devel] [PATCH] parse_header: don't use empty or invalid Message-ID header

2010-07-03 Thread Sascha Silbe
Excerpts from Ben Walton's message of Thu Jul 01 20:11:08 + 2010: > I'd resubmit with the lines removed. It keeps the history cleaner. Since the patch has already been merged in its current form, I won't post a new one. It's no change in program behaviour or output and the comments are not in

[sup-devel] [PATCH] don't leak fds for mbox sources

2010-07-03 Thread Sascha Silbe
Only open the mbox when it's actually used and close it again once we're finished iterating over it. Adds a method go_idle to Source to inform the source we're unlikely to use it in the near future so it can do internal clean-up as appropriate. Signed-off-by: Sascha Silbe ---

[sup-devel] [PATCH] mbox: fix date format

2010-07-08 Thread Sascha Silbe
. References: http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html http://www.qmail.org/man/man5/mbox.html Signed-off-by: Sascha Silbe --- lib/sup/mbox.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb index

[sup-devel] [PATCH] fix crash in sup-sync if the default sent source is used

2010-07-08 Thread Sascha Silbe
This fixes a crash in sup-sync when syncing a folder that contains a copy of a "sent" message and no "sent" folder has been explicitly configured in the config file (so it hasn't been added to sources.yaml). Signed-off-by: Sascha Silbe --- bin/sup-sync |6 +

[sup-devel] [PATCH] fix crash during poll if Maildir has been emptied

2010-07-08 Thread Sascha Silbe
.rb:171:in `end_offset' /home/sascha.silbe/src/sup/lib/sup/source.rb:90:in `done?' [...] Signed-off-by: Sascha Silbe --- lib/sup/maildir.rb |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index ef3b318..0b2fd5e 100644 ---

[sup-devel] [PATCH] don't leak fds for mbox sources

2010-07-08 Thread Sascha Silbe
Only open the mbox when it's actually used and close it again once we're finished iterating over it. Adds a method go_idle to Source to inform the source we're unlikely to use it in the near future so it can do internal clean-up as appropriate. Signed-off-by: Sascha Silbe ---

[sup-devel] alternative for sup-sync option --restored?

2010-08-06 Thread Sascha Silbe
Hi! I'm reading and writing my mails on both my desktop (which has the entire archive, totalling ~ 16GB) and my laptop (recent mails and partial archive, ~ 1-2GB). Up to now I used sup-dump and sup-sync --restored to synchronize the two (every time I switched between them, since it's a full dum

[sup-devel] [issue116] TypeError when trying to send a PGP signed email with attachments

2010-08-16 Thread Sascha Silbe
New submission from Sascha Silbe : When trying to send an email that is going to get PGP signed and has two attachments (haven't tried with just one), the following exception occurs: --- TypeError from thread: main can't convert Array into String ./lib/sup/modes/edit-message-mode

Re: [sup-devel] Label colors support

2010-08-19 Thread Sascha Silbe
Excerpts from Matias Aguirre's message of Wed Aug 04 00:14:13 +0200 2010: > Attached is a patch (first ruby code in a lot of time) with needed > changes to allow colors by label and produces a good and quick feedback. Nice idea! Would you mind prefixing (or suffixing) the color name with "label" t

Re: [sup-devel] alternative for sup-sync option --restored?

2010-08-22 Thread Sascha Silbe
Excerpts from Sascha Silbe's message of Fri Aug 06 11:13:42 +0200 2010: > I'm reading and writing my mails on both my desktop (which has the entire > archive, totalling ~ 16GB) and my laptop (recent mails and partial archive, ~ > 1-2GB). > Up to now I used sup-dump and sup-sync --restored to syn

[sup-devel] [issue122] editing labels in thread view mode messes up labels of all messages in thread, even after undo

2010-09-29 Thread Sascha Silbe
New submission from Sascha Silbe : When changing labels in thread view mode (and probably also in thread index / inbox mode), labels for _all_ messages of the thread are set to be exactly the same. Apart from not being what the user expects, it also messes up special labels like :attachment

[sup-devel] [PATCH] fix searching for non-lowercase labels

2010-09-29 Thread Sascha Silbe
lowercase, which it now does. Signed-off-by: Sascha Silbe --- lib/sup/index.rb |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/sup/index.rb b/lib/sup/index.rb index a72bec6..f90d0d9 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -346,6 +346,12 @@ EOS

[sup-devel] [PATCH] add sendmail hook

2010-09-29 Thread Sascha Silbe
Add a hook that is run in place of the sendmail command. This allows last-minute adjustments including sending a separate copy to each recipient and setting the envelope sender, i.e. VERP (variable envelope return path). Signed-off-by: Sascha Silbe --- lib/sup/modes/edit-message-mode.rb | 25

[sup-devel] [PATCH] fix handling of multiple label: terms in search

2010-09-29 Thread Sascha Silbe
t are guaranteed to be unique. Signed-off-by: Sascha Silbe --- lib/sup/index.rb | 74 +++--- 1 files changed, 37 insertions(+), 37 deletions(-) Tested on Debian Squeeze with Ruby 1.8.7.302 and Xapian 1.2.3. diff --git a/lib/sup/index.rb b/lib/sup/ind

[sup-devel] [PATCH] fix GPG "hang" on malformed PGP message (detached signature)

2010-10-05 Thread Sascha Silbe
ntered and tested with message [1] on the git mailing list. [1] http://marc.info/?l=git&m=128623349711269&q=raw Signed-off-by: Sascha Silbe --- lib/sup/crypto.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index 289fb0e..

Re: [sup-devel] [PATCH] Fixed inline gpg crash when the end marker is missing

2010-10-05 Thread Sascha Silbe
Excerpts from Michael Hamann's message of Sat Sep 04 23:51:46 +0200 2010: > lines.between() does not check if the end marker actually exists, but > later it is assumed the marker exists. This change introduces a check > for the end marker and doesn't decrypt messages in which the end marker > is m

Re: [sup-devel] my list subscription is broken

2010-10-07 Thread Sascha Silbe
Excerpts from Rich Lane's message of Thu Oct 07 05:21:15 +0200 2010: > If there are any bugfixes I haven't responded to please resubmit them. I have collected all my pending patches (including any discussion) plus one important fix from Michael Hamann in an mbox [1]. You can add it to sup using s

[sup-devel] ongoing SPAM attack on the bug tracker

2011-01-08 Thread Sascha Silbe
The bug tracker keeps getting spammed for more than a few days now. Maybe "anonymous" contributions should be deactivated, at least until better anti-SPAM measures are in place? Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature _

[sup-devel] [PATCH] use gpg2 (GnuPG 2.x) instead of gpg (GnuPG 1.x)

2011-01-11 Thread Sascha Silbe
g gpg-agent is particularly convenient when using sup via ssh as gpg-agent would need to be started manually otherwise (for local X sessions OTOH it's often started automatically by distro scripts). Signed-off-by: Sascha Silbe --- lib/sup/crypto.rb |2 +- 1 files changed, 1 insert

Re: [sup-devel] [PATCH] use gpg2 (GnuPG 2.x) instead of gpg (GnuPG 1.x)

2011-01-11 Thread Sascha Silbe
Excerpts from Alvaro Herrera's message of Tue Jan 11 16:45:09 +0100 2011: > I think it should fall back to using `which gpg` in case gpg2 is not > available. Good point. Will post a new version. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP sign

[sup-devel] [PATCH v2] prefer gpg2 (GnuPG 2.x) over gpg (GnuPG 1.x)

2011-01-11 Thread Sascha Silbe
g gpg-agent is particularly convenient when using sup via ssh as gpg-agent would need to be started manually (for local X sessions OTOH it's often started automatically by distro scripts). Signed-off-by: Sascha Silbe --- lib/sup/crypto.rb |7 --- 1 files changed, 4 insertions(+), 3

[sup-devel] [PATCH] fix EOL spaces

2011-01-18 Thread Sascha Silbe
Trailing spaces can make dealing with patches a pain for some developers. Signed-off-by: Sascha Silbe --- My editor is configured to automatically strip EOL spaces as that's the policy for some other projects I'm contributing to. As the sup code base contains a large number of EOL spac

[sup-devel] [PATCH v2] don't leak fds for mbox sources

2011-01-18 Thread Sascha Silbe
Only open the mbox when it's actually used and close it again once we're finished iterating over it. Adds a method go_idle to Source to inform the source we're unlikely to use it in the near future so it can do internal clean-up as appropriate. Signed-off-by: Sascha Silbe --- v1-

[sup-devel] [PATCH] gen_sign_user_opts: fall back to default account if no account matches sender

2011-01-18 Thread Sascha Silbe
odes/edit-message-mode.rb:411:in `send' ./lib/sup/modes/edit-message-mode.rb:411:in `build_message' ./lib/sup/modes/edit-message-mode.rb:354:in `send_message' ./lib/sup/mode.rb:59:in `send' ./lib/sup/mode.rb:59:in `handle_input' ./lib/sup/buffer.rb:277:in `handle_input&

[sup-devel] [PATCH] poll: fix message update vs. already-imported detection

2011-01-18 Thread Sascha Silbe
poll_from prepends existing locations to the "new" message, so we can't use just the first location. While using the last location would work, calculating the difference should be fast and is more robust in the face of future changes to poll_from. Signed-off-by: Sascha Silb

[sup-devel] [PATCH] sup-sync: only show message id of deleted messages in verbose mode

2011-01-18 Thread Sascha Silbe
We show message ids for added messages in verbose mode only, so we should do the same for deleted messages. Signed-off-by: Sascha Silbe --- bin/sup-sync |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bin/sup-sync b/bin/sup-sync index 1d1fda1..b4d5cba 100755 --- a/bin

[sup-devel] [PATCH] sources.yaml: consistent label ordering

2011-01-18 Thread Sascha Silbe
Sort labels in sources.yaml so the ordering doesn't change betweeen saves. This is useful when tracking sources.yaml with a VCS (e.g. git). Signed-off-by: Sascha Silbe --- lib/sup/source.rb |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/source.rb b/li

[sup-devel] [PATCH 2/2] {config, sources}.yaml: preserve symlinks and permissions

2011-01-18 Thread Sascha Silbe
If config.yaml resp. sources.yaml already exists, preserve the permissions. Also alter the save algorithm to overwrite the file in-place, thus leaving symlinks intact. Signed-off-by: Sascha Silbe --- All invocations of save_yaml_obj now use the "backup" mode, so maybe we should just h

[sup-devel] [PATCH] buffer: throw "friendly" exception if question is too long

2011-01-18 Thread Sascha Silbe
If a question is too long to fit on screen, the buffer manager currently throws a hard-to-understand exception deep down in the buffer logic. Explicitly checking for this condition and throwing a descriptive exception makes life easier for hook authors. Signed-off-by: Sascha Silbe --- lib/sup

Re: [sup-devel] [PATCH] fix handling of multiple label: terms in search

2011-01-18 Thread Sascha Silbe
Excerpts from Rich Lane's message of Mon Jan 17 07:20:08 +0100 2011: > Excerpts from Sascha Silbe's message of Wed Sep 29 10:16:02 -0400 2010: > > By default Xapian will join query terms with the same prefix with OR instead > > of AND, so searching for multiple labels doesn't return the expected >

[sup-devel] [PATCH v2] prefer gpg2 (GnuPG 2.x) over gpg (GnuPG 1.x)

2011-01-18 Thread Sascha Silbe
g gpg-agent is particularly convenient when using sup via ssh as gpg-agent would need to be started manually (for local X sessions OTOH it's often started automatically by distro scripts). Signed-off-by: Sascha Silbe --- v1->v2: rebase on next lib/sup/crypto.rb |5 + 1 fil

[sup-devel] [PATCH] sup-sync: show progress for message deletion

2011-01-18 Thread Sascha Silbe
When moving lots of messages across folders, deleting can take a lot of time so we should display progress information for deletion. Signed-off-by: Sascha Silbe --- bin/sup-sync | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/sup-sync b/bin

[sup-devel] [PATCH] pre-expand source URIs

2011-01-18 Thread Sascha Silbe
Expand the URI for each source resp. each CLI argument only once. This brings down the time taken by sup-sync for parsing source arguments from 45s to less than 2 seconds for a list of 13 sources on my XO-1.5. Signed-off-by: Sascha Silbe --- lib/sup/maildir.rb |5 +++-- lib/sup/mbox.rb

[sup-devel] [PATCH 1/2] ensure sources.yaml gets flushed to disk

2011-01-18 Thread Sascha Silbe
Before renaming sources.yaml we need to fsync() it, otherwise we could end up with an empty file in case of a crash [1]. [1] http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/ Signed-off-by: Sascha Silbe --- lib/sup.rb | 10 -- 1 files

Re: [sup-devel] console gem 0.3

2011-01-18 Thread Sascha Silbe
Excerpts from William Morgan's message of Tue Jan 18 21:05:58 +0100 2011: > If you are a non-i386 Linux user, please try `gem install console` and > report the result (success/failure) along with your OS version and your > ruby version. Builds fine on an OpenRD (armel) running Debian Squeeze / Li

Re: [sup-devel] [PATCH 2/2] {config, sources}.yaml: preserve symlinks and permissions

2011-01-19 Thread Sascha Silbe
Excerpts from Rich Lane's message of Wed Jan 19 04:41:53 +0100 2011: > Both patches applied to master. [as well as a whole bunch of other patches from me] Thanks! Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature __

[sup-devel] [PATCH] add sup-import-dump: import message state in sup-dump format

2011-01-19 Thread Sascha Silbe
44s user+system Hot cache, no updates: 43s real time, 41s user+system Signed-off-by: Sascha Silbe --- bin/sup-import-dump | 99 +++ lib/sup/index.rb| 15 2 files changed, 114 insertions(+), 0 deletions(-) diff --git a/bin/sup-import-

Re: [sup-devel] [PATCH 2/2] {config, sources}.yaml: preserve symlinks and permissions

2011-01-19 Thread Sascha Silbe
Excerpts from William Morgan's message of Wed Jan 19 16:38:11 +0100 2011: > Reformatted excerpts from Sascha Silbe's message of 2011-01-18: > > + unless File.exists?(backup_fn) && File.size(fn) == 0 > > This line is giving me some problems when fn doesn't exist (e.g. when > running sup-sync

Re: [sup-devel] [PATCH] add sup-import-dump: import message state in sup-dump format

2011-01-21 Thread Sascha Silbe
Excerpts from Nicolas Pouillard's message of Thu Jan 20 16:28:17 +0100 2011: > So it does not clear the index, right? It only assign the set of labels to the > given message. Just what I need to upgrade my sup index with my notmuch index. Yes, that's exactly the purpose (except that I'm using it

[sup-devel] [PATCH] Delete messages from index if there is no location left

2011-02-11 Thread Sascha Silbe
delete the message from all locations? The drawback is that messages that were moved between sources need to be either scanned in a single sup-sync run or the new location must be scanned first. But that isn't a regression from behaviour before the maildir branch was merged. Signed-off-b

Re: [sup-devel] sup-server revisited

2011-03-03 Thread Sascha Silbe
Excerpts from William Morgan's message of Wed Feb 23 19:43:34 +0100 2011: > - Individual messages have "state", including unread, starred, and all the > other things you've mentioned. Are you going to support user-defined "states"? I have quite a few labels that would make much more sense on th

Re: [sup-devel] call for new maintainers

2011-03-04 Thread Sascha Silbe
Excerpts from William Morgan's message of Wed Jan 26 16:18:59 +0100 2011: > So let's try this. Michael, Tero, Sascha, Edward, and everyone else > who's had code make it into Sup successfully... if you send me your > Gitorious usernames, I will add you to the Sup group and you will have > push acce

Re: [sup-devel] call for new maintainers

2011-03-04 Thread Sascha Silbe
Excerpts from Sascha Silbe's message of Fri Mar 04 13:16:41 +0100 2011: > I've finally created a gitorious account. And of course forgot to mention the account name: silbe. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature

Re: [sup-devel] [PATCHES] Add an account selector in edit-mode

2011-03-13 Thread Sascha Silbe
Excerpts from Damien Leone's message of Sun Mar 13 17:13:05 +0100 2011: > Sup guys, > > Please see commit messages for detailed informations. > Attachment: 0001-reply-mode-improve-the-way-headers-are-handled.patch This one would possibly break my workflow. My From address is chosen in the befor

Re: [sup-devel] Query for largest msg_id?

2011-05-18 Thread Sascha Silbe
Excerpts from William Morgan's message of Wed May 18 06:59:05 +0200 2011: > Reformatted excerpts from Horacio Sanson's message of 2011-05-16: > > When UIDVALIDITY differs I will simply re-scan the whole mailbox and > > feed it to Heliotrope. I trust Heliotrope won't add duplicates. > > The REST a

Re: [sup-devel] [PATCHES] Add an account selector in edit-mode

2011-06-20 Thread Sascha Silbe
Excerpts from Hamish's message of Sun Jun 19 23:48:40 +0200 2011: > I've not heard anything for a bit, so I've pushed this into next for > wider testing, with the guard so that the account selector will only > appear if you have more than one email address. Shout out if it causes > any problems.

[sup-devel] [PATCH] Catch errors while saving a message to disk for editing

2011-07-02 Thread Sascha Silbe
#x27; /usr/lib/ruby/1.8/tempfile.rb:112:in `close' ./lib/sup/modes/edit-message-mode.rb:180:in `edit_message' ./lib/sup/mode.rb:59:in `send' ./lib/sup/mode.rb:59:in `handle_input' ./lib/sup/buffer.rb:278:in `handle_input' bin/sup:271 Signed-off-by: Sascha Silbe --- lib/su

Re: [sup-devel] [PATCH] Catch errors while saving a message to disk for editing

2011-07-02 Thread Sascha Silbe
Excerpts from Alexander Shulgin's message of Sat Jul 02 22:28:27 +0200 2011: > > -  def edit_message > > -    @file = Tempfile.new "sup.#{self.class.name.gsub(/.*::/, > > '').camel_to_hyphy}" > > +  def save_message_to_file > > Didn't you mean 'write_message_to_file' here instead? Oops, yes. I

[sup-devel] [PATCH v2] Catch errors while saving a message to disk for editing

2011-07-02 Thread Sascha Silbe
#x27; /usr/lib/ruby/1.8/tempfile.rb:112:in `close' ./lib/sup/modes/edit-message-mode.rb:180:in `edit_message' ./lib/sup/mode.rb:59:in `send' ./lib/sup/mode.rb:59:in `handle_input' ./lib/sup/buffer.rb:278:in `handle_input' bin/sup:271 Signed-off-by: Sascha Silbe --- v1->