From manish@gslab.com Fri Feb 1 03:49:52 2008 From: manish@gslab.com (Manish Sapariya) Date: Fri, 01 Feb 2008 14:19:52 +0530 Subject: [sup-talk] wup In-Reply-To: <1194487545-sup-8478@south> References: <1194487545-sup-8478@south> Message-ID: <47A2DD30.6040502@gslab.com> Hi, Did anyone tried this. When I run merb it says [manish at alioth app]$ merb You are not in the root of a merb application... I tried running it from various directories but did not help. Thanks and Regards, Manish William Morgan wrote: > Hi Suppers, > > My friend Leslie has hacked together "wup", a web interface on top of > Sup: http://jinsync.com/?q=node/16. > > 75 lines of code gets you quite a lot! > > From manish@gslab.com Fri Feb 1 04:08:37 2008 From: manish@gslab.com (Manish Sapariya) Date: Fri, 01 Feb 2008 14:38:37 +0530 Subject: [sup-talk] not all labels are shown in the list of labels first time Message-ID: <47A2E195.1060704@gslab.com> Hi All, I reindexed my mail box after writing all the filter rules that I had to. I was expecting label list to show all the labels that I had applied using filter hook. However I dont see all of them. They are shown in the list once I search for that lable and view the label list again it shows in the list. Regards, Manish From wmorgan-sup@masanjin.net Sat Feb 2 19:58:26 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 16:58:26 -0800 Subject: [sup-talk] [PATCH] return sources in id-order, with non-archived sources first In-Reply-To: <1201272768-sup-3795@spooky.local> References: <1200675726-sup-4860@spooky.local> <1201238649-sup-7598@south> <1201272768-sup-3795@spooky.local> Message-ID: <1202000192-sup-2543@south> Reformatted excerpts from Grant Hollingworth's message of 2008-01-25: > How about changing @sources to an array? The id is important (it's stored directly in the index), so I don't want removing a source to change the id of all following sources. I've merged this into next. -- William From wmorgan-sup@masanjin.net Sat Feb 2 20:06:59 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 17:06:59 -0800 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) In-Reply-To: <1201119167-sup-8440@tomsk> References: <1200768101-sup-3312@tomsk> <1200768474-sup-7396@tomsk> <1200769080-sup-4420@tomsk> <1201114113-sup-1607@south> <1201119167-sup-8440@tomsk> Message-ID: <1202000591-sup-8570@south> Reformatted excerpts from Marcus Williams's message of 2008-01-23: > My feeling was it wasnt obvious that you could cancel the operation > without it. If there was some way of making that more obvious > somewhere then the message could be removed. I didnt even realise I > could use ^G elsewhere until fairly recently! After trying it, I do like it better without the extra messages, so next currently has them removed. I could make ^G more promiment in the new user's guide... -- William From wmorgan-sup@masanjin.net Sat Feb 2 20:28:41 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 17:28:41 -0800 Subject: [sup-talk] crash on attachments with ~ In-Reply-To: <1201326444-sup-243@buckwheat> References: <1201326444-sup-243@buckwheat> Message-ID: <1202002106-sup-2745@south> Reformatted excerpts from Daniel Wagner's message of 2008-01-25: > If I type in a filename that starts with ~ at the attachment prompt, > sup crashes. Fixed in next. Thanks. -- William From wmorgan-sup@masanjin.net Sat Feb 2 21:20:50 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 18:20:50 -0800 Subject: [sup-talk] [PATCH] expand file paths and rescue enoent exceptions when adding attachments In-Reply-To: <21aa9f0801261935i12a36782o85030b24078e7dd7@mail.gmail.com> References: <21aa9f0801261918j2890aee2yeb52484a95b786c3@mail.gmail.com> <21aa9f0801261935i12a36782o85030b24078e7dd7@mail.gmail.com> Message-ID: <1202005201-sup-3249@south> I had already come up with a patch for this. Sorry! git diff master..019854 if you're curious. -- William From wmorgan-sup@masanjin.net Sat Feb 2 21:34:02 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 18:34:02 -0800 Subject: [sup-talk] [PATCH] fixed crasher when refining search and updated keybinding In-Reply-To: <1201325529-812-1-git-send-email-chrisw@rice.edu> References: <1201325529-812-1-git-send-email-chrisw@rice.edu> Message-ID: <1202005927-sup-5664@south> Reformatted excerpts from Christopher Warrington's message of 2008-01-25: > Refine search no longer crashes. This seems fine. At first I thought it was a little weird that the extra_opts are being discarded on refinement, but now I think that's actually the right thing to do. One minor tweak request: can you split this into two patches, one for the keybinding change and one for the bugfix? Thanks! -- William From wmorgan-sup@masanjin.net Sat Feb 2 21:35:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 18:35:28 -0800 Subject: [sup-talk] [PATCH] fixed crasher when refining search and updated keybinding In-Reply-To: <1201453197-sup-1113@tangerine.lanl.gov> References: <1201325529-812-1-git-send-email-chrisw@rice.edu> <1201453197-sup-1113@tangerine.lanl.gov> Message-ID: <1202006046-sup-3057@south> Reformatted excerpts from John Bent's message of 2008-01-27: > Refine search is very nice. Something else which might be nice would > be a persistent search history which could be scrolled through with > the up and down arrow keys. That feature would then include refine > search. There is a non-persistent (but contextually-aware!) search history accessible via up and down keys now. Persisting that to disk wouldn't be very hard at all. -- William From wmorgan-sup@masanjin.net Sat Feb 2 21:56:40 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 18:56:40 -0800 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message In-Reply-To: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com> References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com> Message-ID: <1202007092-sup-19@south> Reformatted excerpts from brabuhr's message of 2008-01-29: > This adds a new key binding to the thread-view mode (L) to assist with > loading URIs from the body of the message. This first pass will pull > the URIs from the message text and loop through them while asking if > that URI should be loaded. Currently, there is no code to actually > perform the load. Looks good. I have a slight preference for a "if uris.size == 0" block that flashes a message and returns, so that the meat of the method doesn't have to be too indented. My limited research indicates that there isn't a standard way (like mailcap) of viewing a URL. So probably a "view-url" hook is the best way to approach the actual viewing code. -- William From wmorgan-sup@masanjin.net Sat Feb 2 22:01:25 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 19:01:25 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201718069-sup-9900@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> <1201714011-sup-6178@south> <1201715536-sup-6254@tangerine.lanl.gov> <1201717294-sup-1892@south> <1201718069-sup-9900@tangerine.lanl.gov> Message-ID: <1202007682-sup-2115@south> Reformatted excerpts from John Bent's message of 2008-01-30: > Ah. But > system "open '#{filename}'" > false > > works perfectly! (not sure that's expected but I'm happy!) The only explanation is that you are living in a bizarro world where true is false and false is true. Seriously. That makes no sense. -- William From chrisw@rice.edu Sat Feb 2 22:49:04 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sat, 2 Feb 2008 21:49:04 -0600 Subject: [sup-talk] [PATCH] fixed crasher when refining search In-Reply-To: <1202005927-sup-5664@south> References: <1202005927-sup-5664@south> Message-ID: <1202010544-816-1-git-send-email-chrisw@rice.edu> Refine Search no longer crashes. --- lib/sup/modes/search-results-mode.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) mode change 100644 => 100755 lib/sup/modes/search-results-mode.rb diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb old mode 100644 new mode 100755 index f64a227..a03f0a2 --- a/lib/sup/modes/search-results-mode.rb +++ b/lib/sup/modes/search-results-mode.rb @@ -15,7 +15,7 @@ class SearchResultsMode < ThreadIndexMode def refine_search query = BufferManager.ask :search, "query: ", (@qobj.to_s + " ") return unless query && query !~ /^\s*$/ - SearchResultsMode.spawn_from_query query, @qopts + SearchResultsMode.spawn_from_query query end ## a proper is_relevant? method requires some way of asking ferret -- 1.5.3.8 From chrisw@rice.edu Sat Feb 2 22:49:19 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sat, 2 Feb 2008 21:49:19 -0600 Subject: [sup-talk] [PATCH] tweaked Refine Search keybinding In-Reply-To: <1202005927-sup-5664@south> References: <1202005927-sup-5664@south> Message-ID: <1202010559-3708-1-git-send-email-chrisw@rice.edu> Refine Search is now bound to |. On most standard 104-key keyboards, this appears to be shifted \, which fits in nicely since \ is global search now. --- lib/sup/modes/search-results-mode.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb index a03f0a2..6fdc58a 100755 --- a/lib/sup/modes/search-results-mode.rb +++ b/lib/sup/modes/search-results-mode.rb @@ -9,11 +9,11 @@ class SearchResultsMode < ThreadIndexMode end register_keymap do |k| - k.add :refine_search, "Refine search", '.' + k.add :refine_search, "Refine search", '|' end def refine_search - query = BufferManager.ask :search, "query: ", (@qobj.to_s + " ") + query = BufferManager.ask :search, "refine query: ", (@qobj.to_s + " ") return unless query && query !~ /^\s*$/ SearchResultsMode.spawn_from_query query end -- 1.5.3.8 From wmorgan-sup@masanjin.net Sat Feb 2 23:24:51 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:24:51 -0800 Subject: [sup-talk] Is sup slow on cygwin In-Reply-To: <479C0534.30602@gslab.com> References: <479AF45A.6060007@gslab.com> <1201376227-sup-7884@chris-tablet> <479C0534.30602@gslab.com> Message-ID: <1202012673-sup-6840@south> Manish, Did you ever resolve this? -- William From wmorgan-sup@masanjin.net Sat Feb 2 23:26:36 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:26:36 -0800 Subject: [sup-talk] [BUG] When marking a spam, the mail don't disappear In-Reply-To: <1201596013-sup-3324@port-ext5.ensta.fr> References: <1201596013-sup-3324@port-ext5.ensta.fr> Message-ID: <1202012696-sup-7790@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-29: > I've hit a bug when marking a spam in thread-view-mode (using ",s") > and then going to inbox (using "x"), the spam seems still there, > but in fact it was already deleted, just not remove from the list > (hitting "$@" is my current workaroud). I believe I've fixed this in next. I've also just made the dispatch-and-something changes (,whatever and .whatever) NOT automatically write to the index. So now they're consistent with the rest of Sup---changes are only saved once you close the corresponding thread-index-mode, or hit $. -- William From wmorgan-sup@masanjin.net Sat Feb 2 23:31:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:31:00 -0800 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1201681010-sup-3463@archie> References: <1201681010-sup-3463@archie> Message-ID: <1202012826-sup-1965@south> Reformatted excerpts from its.jeff.balogh's message of 2008-01-30: > When you're on the last thread of a ThreadSet and press ',', > nothing happens, but you can't '.' since @dying == true. This > patch changes :next to :kill if there is no next thread. I made a parallel change to do this: e47f9dabca0349a1fff046232961b38d900d4445. It's all withing ThreadIndexMode#launch_next_thread_after, which I think is a little cleaner. As I mentioned in the previous email, I also just changed these operations so that they don't automatically save state to disk, so as to be consistent with the rest of Sup. -- William From wmorgan-sup@masanjin.net Sat Feb 2 23:35:33 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:35:33 -0800 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1201732604-sup-4815@archie> References: <1201681010-sup-3463@archie> <1201732604-sup-4815@archie> Message-ID: <1202013064-sup-8151@south> Reformatted excerpts from its.jeff.balogh's message of 2008-01-30: > The :next case guards against this exception with 'if block_given? && > yield'. If I put that in the :kill case, those two lines will be > exact duplicates of the lines above. > > Is there a clean way to handle this? I'm learning Ruby as I go along, > so please forgive me if the answer is obvious. To answer your question, depends what you mean by clean. We can capture the shared lines in a closure with lambda { ... }, or we can move them to a function and call the function, but that's basically the extent of the control flow power we have here. (Well, unless we want to start using continuations!) In the latest version of the code, the shared lines are now exactly the same, and are simply duplicated. Maybe once a :prev branch is added a refactor will be necessary. -- William From wmorgan-sup@masanjin.net Sat Feb 2 23:44:41 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:44:41 -0800 Subject: [sup-talk] can't remove draft label In-Reply-To: <1201759596-sup-4274@tangerine.lanl.gov> References: <1201716067-sup-3586@tangerine.lanl.gov> <1201754138-sup-7276@chris-tablet> <1201759596-sup-4274@tangerine.lanl.gov> Message-ID: <1202013739-sup-550@south> Reformatted excerpts from John Bent's message of 2008-01-30: > But that was just the message I'd previously deleted from the drafts > dir. The false draft is still there... I'm not sure why that label would be there, but you can perform some index surgery to remove it. $ sh devel/console.sh irb(main):001:0> r=Index.ferret.search("message_id:1201759596-sup-4274 at tangerine.lanl.gov") => #], max_score=10.82630443573, searcher=#> irb(main):002:0> id=r.hits.first.doc => 92571 irb(main):003:0> m = Index.build_message id [...] irb(main):004:0> m.remove_label :draft => true irb(main):005:0> m.save Index => false irb(main):006:0> exit Something like that. Plug in the correct message-id above. -- William From wmorgan-sup@masanjin.net Sat Feb 2 23:54:04 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 20:54:04 -0800 Subject: [sup-talk] [PATCH] spelling error In-Reply-To: <1201803937-sup-5871@red> References: <1201803937-sup-5871@red> Message-ID: <1202014434-sup-5831@south> Applied, thanks! -- William From wmorgan-sup@masanjin.net Sun Feb 3 00:09:17 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 02 Feb 2008 21:09:17 -0800 Subject: [sup-talk] [PATCH] tweaked Refine Search keybinding In-Reply-To: <1202010559-3708-1-git-send-email-chrisw@rice.edu> References: <1202005927-sup-5664@south> <1202010559-3708-1-git-send-email-chrisw@rice.edu> Message-ID: <1202015348-sup-9371@south> Both in next. Thanks! -- William From chrisw@rice.edu Sun Feb 3 03:11:11 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sun, 3 Feb 2008 02:11:11 -0600 Subject: [sup-talk] Possible fix for ferret "Permission denied" errors Message-ID: <1202026272-3432-1-git-send-email-chrisw@rice.edu> In the forthcoming patch, I have proposed a possible fix for the ferret "Permission denied" error some have been getting. I run sup under Cygwin. Before, when I was composing an e-mail and sup did a background poll and found new messages, sup would crash with the ferret error "Permission denied". I think that this has to do with Windows different file sharing semantics. I've been running with this patch for a while now and not had another "Permission denied" error. However, I have not been able to test it on a non-Cygwin setup. I also don't know if this is the proper way to address this issue. To me, it seems mery much like a hack. Is there a clean way to either close all open files, get a list of FDs in use, or get the maximum FD allowed? Comments welcome and encouraged! From chrisw@rice.edu Sun Feb 3 03:11:12 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sun, 3 Feb 2008 02:11:12 -0600 Subject: [sup-talk] [PATCH] shell commands are now run in a child process Message-ID: <1202026272-3432-2-git-send-email-chrisw@rice.edu> When shelling out, the external command is now run in a child process. Before the external command is run, all (I hope) of sup's open files are closed first. This should fix the ferret "Permission denied" errors on Windows. --- lib/sup/buffer.rb | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index 4374fa8..7768011 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -696,11 +696,36 @@ EOS draw_screen :refresh => true end + ## There is no good way that I can find the get the maximum fd allowed. + ## On the POSIX systems I have played with, 500 seems to be the maximum. On Windows, + ## 2048 is the documented maximum (for the C Runtime Library). + MAX_FD = 2048 + def shell_out command @shelled = true Ncurses.sync do Ncurses.endwin - system command + + child_pid = fork + if child_pid == nil + ## child process + + start_fd = 1 + [STDIN.fileno, STDOUT.fileno, STDERR.fileno].max # don't close these + start_fd.upto(MAX_FD) do |fd| + begin + IO.for_fd(fd).close + rescue Errno::EBADF + ## fd is not open: ignore and move on + end + end + + exec(command) + ## never gets here + else + ## sup process + Process.waitpid(child_pid, Process::WUNTRACED) # catch an already dead child + end + Ncurses.refresh Ncurses.curs_set 0 end -- 1.5.3.8 From nicolas.pouillard@gmail.com Sun Feb 3 06:15:53 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sun, 03 Feb 2008 12:15:53 +0100 Subject: [sup-talk] [BUG] When marking a spam, the mail don't disappear In-Reply-To: <1202012696-sup-7790@south> References: <1201596013-sup-3324@port-ext5.ensta.fr> <1202012696-sup-7790@south> Message-ID: <1202037178-sup-2704@ausone.local> Excerpts from William Morgan's message of Sun Feb 03 05:26:36 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-29: > > I've hit a bug when marking a spam in thread-view-mode (using ",s") > > and then going to inbox (using "x"), the spam seems still there, > > but in fact it was already deleted, just not remove from the list > > (hitting "$@" is my current workaroud). > > I believe I've fixed this in next. Thanks! > I've also just made the dispatch-and-something changes (,whatever and > .whatever) NOT automatically write to the index. So now they're > consistent with the rest of Sup---changes are only saved once you close > the corresponding thread-index-mode, or hit $. That's not completely convenient since '$' is not available in thread-view-mode. Moreover it's bound to "moving to the last line", which is not that useful since there is already two other bindings for that. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080203/99274f2d/attachment.bin From manish@gslab.com Mon Feb 4 00:12:34 2008 From: manish@gslab.com (Manish Sapariya) Date: Mon, 04 Feb 2008 10:42:34 +0530 Subject: [sup-talk] Is sup slow on cygwin In-Reply-To: <1202012673-sup-6840@south> References: <479AF45A.6060007@gslab.com> <1201376227-sup-7884@chris-tablet> <479C0534.30602@gslab.com> <1202012673-sup-6840@south> Message-ID: <47A69EC2.8060707@gslab.com> Hi William, I could not resolve it when working with Thunderbird mbox files. However then I moved to fetchmail and procmail, with maildir mail box and things are working fine. Just to add more context, I had nightmare getting sup working with thunderbird mbox files (even on linux) and eventually I decided to go for fetchmail to fetch my mails and things are working perfectly fine. However if you are curious to know what goes wrong when working with Thunderbird mbox file, I may try out again and post the results. Thanks and Regards, Manish William Morgan wrote: > Manish, > > Did you ever resolve this? > > From manish@gslab.com Mon Feb 4 04:34:51 2008 From: manish@gslab.com (Manish Sapariya) Date: Mon, 04 Feb 2008 15:04:51 +0530 Subject: [sup-talk] Need help to use/customize sup Message-ID: <47A6DC3B.4090808@gslab.com> Hi all, Essentially I want to know: - How can I mark all marked/tagged mails/threads as read. - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox label. This is the way I operate Thunderbird and I wanted to keep my workflow same for both. Thanks and Regards, Manish From manish@gslab.com Mon Feb 4 04:51:27 2008 From: manish@gslab.com (Manish Sapariya) Date: Mon, 04 Feb 2008 15:21:27 +0530 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <47A6DC3B.4090808@gslab.com> References: <47A6DC3B.4090808@gslab.com> Message-ID: <47A6E01F.3020506@gslab.com> One more things is that when I press @ to refresh the inbox view, I see many other threads which do not have inbox label in it. Do I have to take any extra action on all those messages? I believe they are all unread messages? Is this the case? Thanks, Manish Manish Sapariya wrote: > Hi all, > Essentially I want to know: > - How can I mark all marked/tagged mails/threads as read. > - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox > label. > > This is the way I operate Thunderbird and I wanted to keep my workflow > same for both. > > Thanks and Regards, > Manish > > _______________________________________________ > sup-talk mailing list > sup-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/sup-talk > > From chrisw@rice.edu Mon Feb 4 06:04:42 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Mon, 04 Feb 2008 05:04:42 -0600 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <47A6DC3B.4090808@gslab.com> References: <47A6DC3B.4090808@gslab.com> Message-ID: <1202122974-sup-1896@chris-tablet> Excerpts from Manish Sapariya's message of Mon Feb 04 03:34:51 -0600 2008: > - How can I mark all marked/tagged mails/threads as read. Tag threads with 't', press ';' for apply, press 'N' to toggle from unread to read. If you have a search that includes both read and unread threads, you can select only the unread threads by including "is:unread" in your query. You can use tag and apply with other commands too, like delete and label. > - Can I tell sup, to not show any mail/thread in inbox, if mail has no inbox > label. That's what it does already. However, in the inbox view, the "inbox" label is not shown. It IS shown in other views, like the search results view. If you don't want a thread to reappear in the inbox when a new message arrives, kill it with '&' instead of archiving it with 'a'. -- Christopher Warrington Jones College From chrisw@rice.edu Mon Feb 4 06:07:35 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Mon, 04 Feb 2008 05:07:35 -0600 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <47A6E01F.3020506@gslab.com> References: <47A6DC3B.4090808@gslab.com> <47A6E01F.3020506@gslab.com> Message-ID: <1202123094-sup-752@chris-tablet> Excerpts from Manish Sapariya's message of Mon Feb 04 03:51:27 -0600 2008: > One more things is that when I press @ to refresh the inbox view, I > see many other threads which do not have inbox label in it. Do I have > to take any extra action on all those messages? I believe they are all > unread messages? Is this the case? This is a bug (I think) in recent version. Initially, these threads are not displayed because of sup's 20 message result limit. Re-running the query with @ pulls in all threads. I could be wrong about the above: I'm not looking at the code right now. All the messages have the inbox label. As I said in my other message, you just don't see it in the inbox view. Open the thread and you will see inbox in the list of labels. -- Christopher Warrington Jones College From manish@gslab.com Mon Feb 4 07:53:35 2008 From: manish@gslab.com (Manish Sapariya) Date: Mon, 04 Feb 2008 18:23:35 +0530 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <1202122974-sup-1896@chris-tablet> References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet> Message-ID: <47A70ACF.4090005@gslab.com> Hi Chris, I have some comments inline. Christopher Warrington wrote: > Tag threads with 't', press ';' for apply, press 'N' to toggle from > unread to read. > > If you have a search that includes both read and unread threads, you can > select only the unread threads by including "is:unread" in your query. > is:unread is very good trick. Thanks. > You can use tag and apply with other commands too, like delete and label. > I am not sure if I am missing something here, but I could not delete labels from all tagged threads. I could remove label from single though. > If you don't want a thread to reappear in the inbox when a new message > arrives, kill it with '&' instead of archiving it with 'a'. > > Just so that I understand it, kill will remove the thread from appearing from inbox, but in my search results it will show up? Thanks and Regards, Manish From manish@gslab.com Mon Feb 4 08:13:25 2008 From: manish@gslab.com (Manish Sapariya) Date: Mon, 04 Feb 2008 18:43:25 +0530 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <1202122974-sup-1896@chris-tablet> References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet> Message-ID: <47A70F75.4020006@gslab.com> Also, Is there anything using which I can load all messages? I have to do M to load all messages until it says no messages found. Thanks, Manish From gsf@fruct.us Mon Feb 4 10:12:21 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Mon, 4 Feb 2008 10:12:21 -0500 Subject: [sup-talk] Persistence between IMAP clients Message-ID: <20080204151221.GA29477@manheim.library.drexel.edu> Is there a way to persist the labels applied from an instance of sup IMAPing from one machine to another instance on another machine? I check my mail from four different computers on a regular basis, and I haven't figured out, for example, how to delete emails when checking with one machine and see them as deleted (that is, *not* see them in my inbox) when checking with another. Gabriel From marcus-sup@bar-coded.net Mon Feb 4 12:12:55 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 04 Feb 2008 17:12:55 +0000 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <47A70F75.4020006@gslab.com> References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet> <47A70F75.4020006@gslab.com> Message-ID: <1202145050-sup-9087@tomsk> On 4.2.2008, Manish Sapariya wrote: > Also, > Is there anything using which I can load all messages? I have to do > M to load all messages until it says no messages found. depending on the version of sup you are running, "!!" should do it. Hit ctrl-g to stop the operation (as getting all threads in some circumstances is going to hurt if you've got a large mailbox) Marcus From johnbent@lanl.gov Mon Feb 4 13:46:16 2008 From: johnbent@lanl.gov (John Bent) Date: Mon, 04 Feb 2008 11:46:16 -0700 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <20080204151221.GA29477@manheim.library.drexel.edu> References: <20080204151221.GA29477@manheim.library.drexel.edu> Message-ID: <1202149761-sup-2303@tangerine.lanl.gov> Excerpts from Gabriel Sean Farrell's message of Mon Feb 04 08:12:21 -0700 2008: > Is there a way to persist the labels applied from an instance of sup > IMAPing from one machine to another instance on another machine? I > check my mail from four different computers on a regular basis, and I > haven't figured out, for example, how to delete emails when checking > with one machine and see them as deleted (that is, *not* see them in my > inbox) when checking with another. > This isn't really answering your question but ... the reason I use sup is because I can then use multiple computers to check email but have a persistent view (exactly like what you want). However, the way I do this is not by figuring out how to maintain consistent labeling state across the multiple instances but rather by only actually running sup from one machine. I then can check email from multiple computers by always ssh'ing to that machine. That's why I like sup: it's console based and lends itself perfectly to this approach. Even though this probably wasn't the answer you were looking for, I fear it might be the best one you get. sup isn't designed to actually modify any of your existing mail folders. It only reads them and then maintains its own external state. So, for example, you can't configure sup to delete emails from an IMAP server. What you can do is configure an external program like fetchmail to pull the emails (and delete them from the IMAP server) and put them into a local mbox on your machine which sup can then read. That might work for you; however, you'll splinter your emails. Emails which are read on one machine won't appear on your other three. What you want is for sup to just read from the IMAP server and leave them there and then for the four multiple instances of sup to share their state with each other. But they have no mechanism for doing so - they'd need some server somewhere to help them and they'd also need a bunch of code to implement that functionality. You could try to get that functionality transparently by using a distributed file system shared across the four machines in which you keep your .sup folder. That should work (unless maybe there is binary data kept in the .sup files and you have endian incompatibility across the four machines). You could try to approximate the shared file system thing by using something like cvs or git, but that would be a big silly hassle. Unless anyone else thinks of something better, I think the ssh approach is your best bet. My only remaining limitation with the ssh scheme is that my primary machine is my desktop so I am not able to slurp down a bunch of new emails onto my laptop and work on them from the plane... (the answer of course is to make the laptop be the primary machine but that doesn't work for a couple of other various reasons). John From manish@gslab.com Tue Feb 5 04:30:01 2008 From: manish@gslab.com (Manish Sapariya) Date: Tue, 05 Feb 2008 15:00:01 +0530 Subject: [sup-talk] Need help to use/customize sup In-Reply-To: <1202122974-sup-1896@chris-tablet> References: <47A6DC3B.4090808@gslab.com> <1202122974-sup-1896@chris-tablet> Message-ID: <1202203637-sup-4581@alioth.gs-lab.com> > If you don't want a thread to reappear in the inbox when a new message > arrives, kill it with '&' instead of archiving it with 'a'. > I hope I not missing something obvious, but I am seeing messages killed again in my inbox. It does have killed label. By the way, thanks for all the help. I am now using sup for all my mail communication. It does crash once in a while, mostly when I do some quick operation of loading messages and opening them and most of the issues seems to be while accessing the index. Thanks and Regards, -Manish From patroclo7@gmail.com Tue Feb 5 04:56:33 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 05 Feb 2008 10:56:33 +0100 Subject: [sup-talk] upgrade to gettext 1.90.0 breaks encodings Message-ID: <1202205301-sup-5725@clarabella.clarabella> After upgrading with gem to the recent gettext 1.90.0, my encoding was not anymore identified and it defaulted to UTF8. Downgrading again to gettext 1.10.0 fixes the issue -- Giorgio Lando From wmorgan-sup@masanjin.net Tue Feb 5 11:42:03 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 08:42:03 -0800 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <20080204151221.GA29477@manheim.library.drexel.edu> References: <20080204151221.GA29477@manheim.library.drexel.edu> Message-ID: <1202229600-sup-4858@south> Reformatted excerpts from Gabriel Sean Farrell's message of 2008-02-04: > Is there a way to persist the labels applied from an instance of sup > IMAPing from one machine to another instance on another machine? I > check my mail from four different computers on a regular basis, and I > haven't figured out, for example, how to delete emails when checking > with one machine and see them as deleted (that is, *not* see them in my > inbox) when checking with another. There is no good way to do this. There are bad ways (you can dump all your labels with sup-dump, send them over, and apply them with sup-sync). Sup will probably never work well in this kind of setup. -- William From wmorgan-sup@masanjin.net Tue Feb 5 12:27:26 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 09:27:26 -0800 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1201707688-sup-6637@tangerine.lanl.gov> References: <1201681010-sup-3463@archie> <1201707688-sup-6637@tangerine.lanl.gov> Message-ID: <1202232384-sup-1186@south> Reformatted excerpts from John Bent's message of 2008-01-30: > Perhaps I should just change my habits but I like to traverse my inbox in > chronological order (i.e. bottom up instead of top down). If anyone could > make a patch that does ,a or ,n but moves it up instead of down, I'd very > much appreciate it. I do this too, often. Try ']' in next. I really need a better keybinding. Wonder if I just should bite the bullet and do < and > for previous and next instead of , and ]. -- William From patroclo7@gmail.com Tue Feb 5 12:31:14 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 5 Feb 2008 18:31:14 +0100 Subject: [sup-talk] [PATCH] allow user to make a gem with a specific version number Message-ID: <1202232674-20414-1-git-send-email-patroclo7@gmail.com> If one want to make a gem from a git version of sup, he can also want to define a version number (e.g. in the form .1, so that when a new version is released the gem will be updated nonetheless). With this patch the version can be defined with the REL environment variable (as in ferret Rakefile) --- Rakefile | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index f99246f..289da64 100644 --- a/Rakefile +++ b/Rakefile @@ -9,9 +9,13 @@ end # thanks to "Mike H" ## allow people who use development versions by running "rake gem" ## and installing the resulting gem it to be able to do this. (gem -## versions must be in dotted-digit notation only). -version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION - +## versions must be in dotted-digit notation only and can be passed +## with the REL environment variable to "rake gem"). +if ENV['REL'] + version = ENV['REL'] +else + version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION +end Hoe.new('sup', version) do |p| p.rubyforge_name = 'sup' p.author = "William Morgan" -- 1.5.4 From wmorgan-sup@masanjin.net Tue Feb 5 12:34:12 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 09:34:12 -0800 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1202026272-3432-2-git-send-email-chrisw@rice.edu> References: <1202026272-3432-2-git-send-email-chrisw@rice.edu> Message-ID: <1202232814-sup-1005@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-03: > When shelling out, the external command is now run in a child process. > Before the external command is run, all (I hope) of sup's open files > are closed first. This seems crazy. Do mbox sources even continue to function properly once this has happened? It seems like they'd crash with their file handles closed from under them. If the issue is that Windows has bad behavior when Sup polls while you're editing a message, another option might be to turn off polling when Sup is shelled out. Something like (although this doesn't prevent you from starting an editor while a background poll is in progress): diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index d40a626..96f676b 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -137,6 +137,7 @@ class BufferManager include Singleton attr_reader :focus_buf + bool_reader :shelled ## we have to define the key used to continue in-buffer search here, because ## it has special semantics that BufferManager deals with---current searches diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index 2dd9150..a67e801 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -45,7 +45,8 @@ EOS end def poll - return if @polling + return if @polling || BufferManager.shelled? + @polling = true HookManager.run "before-poll" -- William From wmorgan-sup@masanjin.net Tue Feb 5 12:50:33 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 09:50:33 -0800 Subject: [sup-talk] [PATCH] allow user to make a gem with a specific version number In-Reply-To: <1202232674-20414-1-git-send-email-patroclo7@gmail.com> References: <1202232674-20414-1-git-send-email-patroclo7@gmail.com> Message-ID: <1202233803-sup-1311@south> Reformatted excerpts from Giorgio Lando's message of 2008-02-05: > If one want to make a gem from a git version of sup, he can also want > to define a version number (e.g. in the form release>.1, so that when a new version is released the gem will be > updated nonetheless). With this patch the version can be defined with > the REL environment variable (as in ferret Rakefile) Applied, thanks! -- William From magnus@therning.org Tue Feb 5 14:12:10 2008 From: magnus@therning.org (Magnus Therning) Date: Tue, 05 Feb 2008 19:12:10 +0000 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202229600-sup-4858@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> Message-ID: <47A8B50A.3030302@therning.org> William Morgan wrote: > Reformatted excerpts from Gabriel Sean Farrell's message of 2008-02-04: >> Is there a way to persist the labels applied from an instance of sup >> IMAPing from one machine to another instance on another machine? I >> check my mail from four different computers on a regular basis, and I >> haven't figured out, for example, how to delete emails when checking >> with one machine and see them as deleted (that is, *not* see them in my >> inbox) when checking with another. > > There is no good way to do this. There are bad ways (you can dump all > your labels with sup-dump, send them over, and apply them with > sup-sync). > > Sup will probably never work well in this kind of setup. Would it be possible to simply use unison to synchronise the machines? As long as you can make sure to avoid conflicts and you can make sure system-specific settings (such as file locations and server settings) are the same it /could/ work. Please note that I've never tried it with sup, but other MUAs have worked fine this way. /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus?therning?org Jabber: magnus?therning?gmail?com http://therning.org/magnus What if I don't want to obey the laws? Do they throw me in jail with the other bad monads? -- Daveman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: OpenPGP digital signature Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080205/27dda927/attachment.bin From chrisw@rice.edu Tue Feb 5 14:29:19 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Tue, 05 Feb 2008 13:29:19 -0600 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1202232814-sup-1005@south> References: <1202026272-3432-2-git-send-email-chrisw@rice.edu> <1202232814-sup-1005@south> Message-ID: <1202239755-sup-3523@chris-tablet> Excerpts from William Morgan's message of Tue Feb 05 11:34:12 -0600 2008: >> When shelling out, the external command is now run in a child >> process. Before the external command is run, all (I hope) of sup's >> open files are closed first. > This seems crazy. Do mbox sources even continue to function properly > once this has happened? It seems like they'd crash with their file > handles closed from under them. No, it's not elegant at all. mbox sources do still work, though. I only close the files in the child process. They remain open in sup's main process. Setting the file descriptors to FD_CLOEXEC would be a cleaner solution, but I don't think that this works on Cygwin (or is accessible via Ruby). > If the issue is that Windows has bad behavior when Sup polls while > you're editing a message, another option might be to turn off polling > when Sup is shelled out. That's a thought. If I get some time, I may be able to dig into this. -- Christopher Warrington From wmorgan-sup@masanjin.net Tue Feb 5 14:51:08 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 11:51:08 -0800 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <47A8B50A.3030302@therning.org> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <47A8B50A.3030302@therning.org> Message-ID: <1202240647-sup-2072@south> Reformatted excerpts from Magnus Therning's message of 2008-02-05: > Would it be possible to simply use unison to synchronise the machines? If ~/.sup/sources.yaml and ~/.sup/ferret are both synchronized, that should basically work. Of course, unless Unison does sub-file synchronization, synchronizing the ferret index could be slow. And conflicts won't really be mergeable; you'll have to pick one version or the other. -- William From wmorgan-sup@masanjin.net Tue Feb 5 15:12:23 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 12:12:23 -0800 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1202239755-sup-3523@chris-tablet> References: <1202026272-3432-2-git-send-email-chrisw@rice.edu> <1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet> Message-ID: <1202241831-sup-1777@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-05: > No, it's not elegant at all. mbox sources do still work, though. I > only close the files in the child process. They remain open in sup's > main process. Oh, I see. Sorry, I misread the patch. It would be good to understand this a bit more. Why are the Ferret errors caused by open filehandles? And Windows supports fork now? I thought that didn't work. -- William From gsf@fruct.us Tue Feb 5 16:03:42 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Tue, 5 Feb 2008 16:03:42 -0500 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202149761-sup-2303@tangerine.lanl.gov> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202149761-sup-2303@tangerine.lanl.gov> Message-ID: <20080205210342.GA4870@manheim.library.drexel.edu> On Mon, Feb 04, 2008 at 11:46:16AM -0700, John Bent wrote: > Excerpts from Gabriel Sean Farrell's message of Mon Feb 04 08:12:21 -0700 2008: > > Is there a way to persist the labels applied from an instance of sup > > IMAPing from one machine to another instance on another machine? I > > check my mail from four different computers on a regular basis, and I > > haven't figured out, for example, how to delete emails when checking > > with one machine and see them as deleted (that is, *not* see them in my > > inbox) when checking with another. > > > This isn't really answering your question but ... the reason I use sup is > because I can then use multiple computers to check email but have a > persistent view (exactly like what you want). However, the way I do this > is not by figuring out how to maintain consistent labeling state across > the multiple instances but rather by only actually running sup from one > machine. I then can check email from multiple computers by always ssh'ing > to that machine. That's why I like sup: it's console based and lends itself > perfectly to this approach. > > Even though this probably wasn't the answer you were looking for, I fear it > might be the best one you get. sup isn't designed to actually modify any of > your existing mail folders. It only reads them and then maintains its own > external state. So, for example, you can't configure sup to delete emails from > an IMAP server. What you can do is configure an external program like > fetchmail to pull the emails (and delete them from the IMAP server) and put > them into a local mbox on your machine which sup can then read. That might > work for you; however, you'll splinter your emails. Emails which are read on > one machine won't appear on your other three. What you want is for sup to just > read from the IMAP server and leave them there and then for the four multiple > instances of sup to share their state with each other. But they have no > mechanism for doing so - they'd need some server somewhere to help them and > they'd also need a bunch of code to implement that functionality. You could > try to get that functionality transparently by using a distributed file system > shared across the four machines in which you keep your .sup folder. That > should work (unless maybe there is binary data kept in the .sup files and you > have endian incompatibility across the four machines). You could try to > approximate the shared file system thing by using something like cvs or git, > but that would be a big silly hassle. Unless anyone else thinks of something > better, I think the ssh approach is your best bet. > > My only remaining limitation with the ssh scheme is that my primary machine is > my desktop so I am not able to slurp down a bunch of new emails onto my laptop > and work on them from the plane... (the answer of course is to make the laptop > be the primary machine but that doesn't work for a couple of other various > reasons). Thanks for the thoughtful response. I have checked my mail over ssh for a long time (with mutt), but within the last year I've come to really appreciate IMAP. I use a combination of ssh and screen to work on all of my servers, but it's nice to be able to avoid it when checking email on a spotty connection (no more network stuttering while I edit a response!). Also, attachments are easier to deal with. An IMAP setup allows me to check in with the client on my phone occasionally as well. In short, I like to have one place that handles the storage (which is why I don't use POP3) *and* the status of my email. It occurs to me now that Sup, when used with IMAP, follows a paradigm wherein the status (maybe "metadata" would be a better word) for each email is shared between the server and client. Maybe my preference is due to assumptions from my years of mutt use. After all, the difference doesn't matter if you only use one client. It is the reason Sup doesn't play well with others, however, or with other instances of itself. Gabriel From gsf@fruct.us Tue Feb 5 16:11:41 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Tue, 5 Feb 2008 16:11:41 -0500 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202229600-sup-4858@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> Message-ID: <20080205211141.GB4870@manheim.library.drexel.edu> On Tue, Feb 05, 2008 at 08:42:03AM -0800, William Morgan wrote: > Sup will probably never work well in this kind of setup. Agreed. Thanks for the honest assessment. From wmorgan-sup@masanjin.net Tue Feb 5 17:02:37 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 05 Feb 2008 14:02:37 -0800 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202229600-sup-4858@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> Message-ID: <1202248916-sup-1460@south> Reformatted excerpts from William Morgan's message of 2008-02-05: > Sup will probably never work well in this kind of setup. Until we make SupServer! -- William From johnbent@lanl.gov Wed Feb 6 11:21:37 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 06 Feb 2008 09:21:37 -0700 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1202232384-sup-1186@south> References: <1201681010-sup-3463@archie> <1201707688-sup-6637@tangerine.lanl.gov> <1202232384-sup-1186@south> Message-ID: <1202314746-sup-2532@tangerine.lanl.gov> Excerpts from William Morgan's message of Tue Feb 05 10:27:26 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-30: > > Perhaps I should just change my habits but I like to traverse my inbox in > > chronological order (i.e. bottom up instead of top down). If anyone could > > make a patch that does ,a or ,n but moves it up instead of down, I'd very > > much appreciate it. > > I do this too, often. Try ']' in next. > That's great! Thanks. > I really need a better keybinding. Wonder if I just should bite the > bullet and do < and > for previous and next instead of , and ]. > That'd be nice too (and probably more intuitive). Or maybe it's really hard but user-defined macros or shortcuts. So people could map < to ,n and > to ]n. Or did I get the order wrong? Also, if we had macros, I'd map something to |muttprint. From gsf@fruct.us Wed Feb 6 17:37:33 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 6 Feb 2008 17:37:33 -0500 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202248916-sup-1460@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <1202248916-sup-1460@south> Message-ID: <20080206223733.GA13929@manheim.library.drexel.edu> On Tue, Feb 05, 2008 at 02:02:37PM -0800, William Morgan wrote: > Reformatted excerpts from William Morgan's message of 2008-02-05: > > Sup will probably never work well in this kind of setup. > > Until we make SupServer! > Something like SupServer could be exciting. Along with its shortcomings in the display department, mutt also suffers in a multiple-client-IMAP setup. For example, I see no reason why I should keep aliases and list subscriptions for each client. From marcus-sup@bar-coded.net Thu Feb 7 03:45:33 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 07 Feb 2008 08:45:33 +0000 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202248916-sup-1460@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <1202248916-sup-1460@south> Message-ID: <1202373660-sup-5293@tomsk> On 5.2.2008, William Morgan wrote: > Reformatted excerpts from William Morgan's message of 2008-02-05: > > Sup will probably never work well in this kind of setup. > > Until we make SupServer! I never know if you're joking when you say stuff like this :) Joking aside though, if you treat sup as a frontend for a database (which is basically what it is forgetting the email client side) all you actually need is to get ferret to run as a server.... and if thats all you need perhaps we can use the work on the DRb server for the RoR act_as_ferret plugin and have a remote index that sup can then be a client of. This then leads me to a wishlist item - perhaps the contacts stuff should be moved into a ferret db. That way sup can be a searchable contacts db as well (and it can be remote so shared across clients). Any thoughts? Marcus From wmorgan-sup@masanjin.net Thu Feb 7 13:12:43 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 07 Feb 2008 10:12:43 -0800 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202373660-sup-5293@tomsk> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <1202248916-sup-1460@south> <1202373660-sup-5293@tomsk> Message-ID: <1202407800-sup-6982@south> Reformatted excerpts from Marcus Williams's message of 2008-02-07: > Any thoughts? Why is it that people are so excited about having an email clients with this crazy client/server architecture? We don't demand that of any other console program we use. If you can run a sup server somewhere, surely you can run sshd there instead. The only difference would be UI lag on slow connections. Is that the big win? -- William From wmorgan-sup@masanjin.net Thu Feb 7 13:40:17 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 07 Feb 2008 10:40:17 -0800 Subject: [sup-talk] new in git next: maildir speedups Message-ID: <1202409514-sup-9247@south> I believe I've fixed the issue of maildir directory rescanning in next. Now the directory is only scanned rescanned when polling. Try it out! -- William From gsf@fruct.us Thu Feb 7 15:12:34 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Thu, 7 Feb 2008 15:12:34 -0500 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202407800-sup-6982@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <1202248916-sup-1460@south> <1202373660-sup-5293@tomsk> <1202407800-sup-6982@south> Message-ID: <20080207201234.GB18001@manheim.library.drexel.edu> On Thu, Feb 07, 2008 at 10:12:43AM -0800, William Morgan wrote: > Why is it that people are so excited about having an email clients with > this crazy client/server architecture? We don't demand that of any other > console program we use. Let's see, what console programs do I have open right now? Mutt, irssi, lynx, tintin++, and btlaunchmanycurses. We've already discussed Mutt. irssi is a great example of a console program that acts as a client to a server. lynx is an example of the most commonly understood client/server relationship today. tintin++ is a mud client, and the improvements it has over simple telnet clients in the specific domain of muds could serve as a model for others that rely on ssh/sftp/etc for other domains. btlaunchmanycurses is a curses bittorrent client and, being bittorrent, connects to other clients instead of a server. Nonetheless, it demonstrates another protocol that I choose a console UI for. Even Vim provides the option of editing via sftp and scp, essentially creating a client connection to files on a server. It's a pretty fantastic feature that I recommend you try out if you haven't done so already. > If you can run a sup server somewhere, surely you can run sshd there > instead. The only difference would be UI lag on slow connections. Is > that the big win? The ability to access these programs over ssh is part of the reason I use them, but I prefer running them on the local box because UI lag and dropped connections have frustrated me enough that I'd rather not deal with them when I don't have to. From patroclo7@gmail.com Thu Feb 7 13:47:56 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 07 Feb 2008 19:47:56 +0100 Subject: [sup-talk] new in git next: maildir speedups In-Reply-To: <1202409514-sup-9247@south> References: <1202409514-sup-9247@south> Message-ID: <1202410054-sup-9855@clarabella.clarabella> Excerpts from William Morgan's message of Thu Feb 07 19:40:17 +0100 2008: > I believe I've fixed the issue of maildir directory rescanning in next. > Now the directory is only scanned rescanned when polling. Try it out! Yes, the speedup is noticeable! -- Giorgio Lando From marcus-sup@bar-coded.net Thu Feb 7 16:09:05 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 07 Feb 2008 21:09:05 +0000 Subject: [sup-talk] Persistence between IMAP clients In-Reply-To: <1202407800-sup-6982@south> References: <20080204151221.GA29477@manheim.library.drexel.edu> <1202229600-sup-4858@south> <1202248916-sup-1460@south> <1202373660-sup-5293@tomsk> <1202407800-sup-6982@south> Message-ID: <1202417630-sup-9601@tomsk> On 7.2.2008, William Morgan wrote: > If you can run a sup server somewhere, surely you can run sshd there > instead. The only difference would be UI lag on slow connections. Is > that the big win? Man, your throw away suggestions should come with "warning, bear trap ahead" notices :) For me, the biggest draw of having it as a service is multi-app usage. I treat sup as a view upon my email but I use my email for a whole lot of things and sup doesnt (yet) give me views of this data if you see what I mean. For instance - I might mark emails as todos via the message hooks so I can email myself todos. I dont need to see who these are from or the date of these email, just the snippet. Also I dont really want to go into sup to get these I'd rather have them available via http. I can do this read only now, but if I want to do any interactions with this "view" I need to go via sup really. Also I cant do this when sup is open on my machine as its got the index open and I'm not sure ferret lets you do multi-user access to the index. Console access is great when you've got it, but its not so good on a phone/pda (I am determined to get it running locally on my n800 though!) - so accessing the index through other ways would be useful here. Also, sup *is already* a client/server console tool - you're accessing imap or maildir-over-ssh as a client. The beauty of IMAP (_not_ the protocol which I have to agree sucks) is the fact I can use any client I want *locally* and have the same view upon my email anywhere. I dont have to save an attachment to a disk on my imap server, open winscp to go to that server pick up the attachment and save locally to view it on my machine at work or battle with x11 auth and install x11/gnome packages on my server so I can view it over X11 over ssh. Dont get me wrong, for my biggest usage sup doesnt need to use the index over a networked service, I could write most stuff as ruby cgis or RoR that access the ferret index because most of the time sup wont be running so wont care. Its just I wouldnt have to worry about it if it was networked :) and I think it would open up more possibilities of the use of the index (again, I'm thinking "views" upon my data not necessarily sup's usage). Marcus From wmorgan-sup@masanjin.net Thu Feb 7 20:09:37 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 07 Feb 2008 17:09:37 -0800 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201785683-sup-4356@clarabella.clarabella> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> <1201260309-sup-8211@ausone.local> <1201785683-sup-4356@clarabella.clarabella> Message-ID: <1202432955-sup-4239@south> Reformatted excerpts from Giorgio Lando's message of 2008-01-31: > I would like to add a further feature request: sup could accept an > email address as a command line argument, going directly to prompt for > a subject or a CC and then passing to the editor. This would be nice > for interaction with browsers, when clicking on a certain address open > a program designated to treat the mailto protocol. This is in. Use -c. -- William From sup-talk@gurski.org Thu Feb 7 12:27:26 2008 From: sup-talk@gurski.org (Michael Gurski) Date: Thu, 7 Feb 2008 12:27:26 -0500 Subject: [sup-talk] Crash on startup, "wrong id called on nil" Message-ID: <20080207172725.GA9157@gurski.org> It's been a while since I launched sup, and updating today from master, I get a crash on startup: --- RuntimeError from thread: load threads for thread-index-mode wrong id called on nil IIRC, this was also happening maybe a month or so ago, and I just didn't have the time to deal with it then. Dumping the index, rebuilding, etc, seem to not affect this at all. The full exception log is: $ cat sup-exception-log.txt --- RuntimeError from thread: load threads for thread-index-mode wrong id called on nil ./lib/sup.rb:13:in `id' ./lib/sup/modes/thread-index-mode.rb:183:in `update' ./lib/sup/hook.rb:123:in `sort_by' ./lib/sup/modes/thread-index-mode.rb:183:in `each' ./lib/sup/modes/thread-index-mode.rb:183:in `sort_by' ./lib/sup/modes/thread-index-mode.rb:183:in `update' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' ./lib/sup/modes/thread-index-mode.rb:181:in `update' ./lib/sup/modes/thread-index-mode.rb:466:in `__unprotected_load_n_threads' ./lib/sup/thread.rb:332:in `load_n_threads' ./lib/sup/index.rb:224:in `each_id_by_date' ./lib/sup/index.rb:224:in `each' ./lib/sup/index.rb:224:in `each_id_by_date' ./lib/sup/thread.rb:326:in `load_n_threads' ./lib/sup/modes/thread-index-mode.rb:463:in `__unprotected_load_n_threads' (eval):12:in `load_n_threads' ./lib/sup/modes/thread-index-mode.rb:452:in `load_n_threads_background' ./lib/sup.rb:60:in `reporting_thread' ./lib/sup.rb:58:in `initialize' ./lib/sup.rb:58:in `new' ./lib/sup.rb:58:in `reporting_thread' ./lib/sup/modes/thread-index-mode.rb:451:in `load_n_threads_background' ./lib/sup/modes/thread-index-mode.rb:502:in `__unprotected_load_threads' (eval):12:in `load_threads' bin/sup:199 --- SystemExit from thread: main wrong id called on nil ./lib/sup.rb:64:in `select' ./lib/sup/buffer.rb:31:in `nonblocking_getch' bin/sup:212 -- Michael A. Gurski (opt. [first].)[last]@pobox.com http://www.pobox.com/~[last] 1024R/39B5BADD PGP: 34 93 A9 94 B1 59 48 B7 17 57 1E 4E 62 56 45 70 1024D/1166213E GPG: 628F 37A4 62AF 1475 45DB AD81 ADC9 E606 1166 213E 4096R/C0B4F04B GPG: 5B3E 75D7 43CF CF34 4042 7788 1DCE B5EE C0B4 F04B Views expressed by the host do not reflect the staff, management or sponsors. From patroclo7@gmail.com Fri Feb 8 03:42:33 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Fri, 08 Feb 2008 09:42:33 +0100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1202432955-sup-4239@south> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> <1201260309-sup-8211@ausone.local> <1201785683-sup-4356@clarabella.clarabella> <1202432955-sup-4239@south> Message-ID: <1202460092-sup-5021@clarabella.clarabella> Excerpts from William Morgan's message of Fri Feb 08 02:09:37 +0100 2008: > Reformatted excerpts from Giorgio Lando's message of 2008-01-31: > > I would like to add a further feature request: sup could accept an > > email address as a command line argument, going directly to prompt for > > a subject or a CC and then passing to the editor. This would be nice > > for interaction with browsers, when clicking on a certain address open > > a program designated to treat the mailto protocol. > > This is in. Use -c. > Thank you a lot! -- Giorgio Lando From chrisw@rice.edu Fri Feb 8 04:40:55 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Fri, 08 Feb 2008 03:40:55 -0600 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1202241831-sup-1777@south> References: <1202026272-3432-2-git-send-email-chrisw@rice.edu> <1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet> <1202241831-sup-1777@south> Message-ID: <1202462044-sup-3129@chris-tablet> Excerpts from William Morgan's message of Tue Feb 05 14:12:23 -0600 2008: > It would be good to understand this a bit more. Why are the Ferret > errors caused by open filehandles? It is an odd interplay between Cygwin and Windows. Sometimes, when ferret updates the index, it needs to delete (or rename, I'm not sure) one of its files. So, ferret deletes the file and then checks that it has been deleted (in fs_exists() from ferret-.../ext/fs_store.c:70). To do the delete, unlink() is called. Cygwin maps this to a series of Windows kernel calls that 1) open the file, 2) set the delete-on-close flag, and 3) close the file. (See unline_nt() in http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/syscalls.cc?rev=1.469&content-type=text/x-cvsweb-markup&cvsroot=src) If only sup is running, the file is closed and deleted. The file no longer exists, so the open() in fs_exists fails with ENOENT. This is to be expected. If the editor is also running, things happen a little differently. The editor has inherited all of sup's file handles. When the unlink() is called this time, the same three kernel calls are made: 1) open, 2) set delete-on-close flag, 3) close file. However, there are still an open handle for the file (the editor has it), so the file enters the DELETE_PENDING state. This causes the open() call in fs_exists to fail with EACCES, triggering the exception. I have a Process Monitor log of what's going on and the exception log if you think that that would be helpful. > And Windows supports fork now? I thought that didn't work. No. But Cygwin does. This still causes the file handle duplication, so I close all the open files except STDIN, STDOUT, and STDERR. That way, the ferret file never enters the DELETE_PENDING state. I don't think that this would be an issue if I were running sup natively on Windows. The editor would NOT inherit sup's file handlers. However, I have not been able to get ncurses (or the Ruby gem, I can't remember) to compile for Windows. So, I'm stuck in Cygwin bizzaro-land. -- Christopher Warrington From patroclo7@gmail.com Fri Feb 8 17:10:07 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Fri, 08 Feb 2008 23:10:07 +0100 Subject: [sup-talk] the num_inbox_unread variable Message-ID: <1202508462-sup-2051@clarabella.clarabella> Hi, I have a small problem with the num_inbox_unread variable, which is used for example in the status-bar-text.rb: in the number of unread messages the messages belonging to killed threads are included, but, from the name of the variable, I do not think that this is the expected behaviour (they are unread, but they are not the inbox. -- Giorgio Lando From brabuhr@gmail.com Fri Feb 8 21:01:31 2008 From: brabuhr@gmail.com (brabuhr at gmail.com) Date: Fri, 8 Feb 2008 21:01:31 -0500 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message In-Reply-To: <1202007092-sup-19@south> References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com> <1202007092-sup-19@south> Message-ID: <55fa96700802081801mfc27b6axd68a3d640175dddd@mail.gmail.com> On Feb 2, 2008 9:56 PM, William Morgan wrote: > Reformatted excerpts from brabuhr's message of 2008-01-29: > > This adds a new key binding to the thread-view mode (L) to assist with > > loading URIs from the body of the message. This first pass will pull > > the URIs from the message text and loop through them while asking if > > that URI should be loaded. Currently, there is no code to actually > > perform the load. > > Looks good. I have a slight preference for a "if uris.size == 0" block > that flashes a message and returns, so that the meat of the method > doesn't have to be too indented. I was also thinking that it would be better to display the discovered URIs in a list instead of the prompting, but I wasn't sure how to implement that. Another problem I see is that the extractor is too-greedy and will pull in the punctuation following the URL; so, perhaps the list should allow line editing before calling the view-url hook? From manish@gslab.com Fri Feb 8 23:39:42 2008 From: manish@gslab.com (Manish Sapariya) Date: Sat, 09 Feb 2008 10:09:42 +0530 Subject: [sup-talk] Exception while composing message from lable list buffer Message-ID: <1202531797-sup-97@alioth.gs-lab.com> Hi, I ran into this once, next time I tried it did not happen. in inbox window, I pressed L to check mails against each lable, from that window I pressed c to compose new mail and it blasted. --- NoMethodError from thread: main undefined method `<=>' for nil:NilClass /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:494:in `sort' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:494:in `ask_for_contacts' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/compose-mode.rb:23:in `spawn_nicely' /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:259 /usr/bin/sup:16:in `load' /usr/bin/sup:16 Regards, Manish From nicolas.pouillard@gmail.com Sat Feb 9 07:05:29 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sat, 9 Feb 2008 13:05:29 +0100 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode. In-Reply-To: <1201112451-sup-5510@south> References: <1201112451-sup-5510@south> Message-ID: <12025587293812-git-send-email-nicolas.pouillard@gmail.com> This patch would help to think about finishing drafts. --- bin/sup | 2 ++ lib/sup/modes/inbox-mode.rb | 2 +- lib/sup/modes/thread-index-mode.rb | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/sup b/bin/sup index 84fd77c..f536da6 100644 --- a/bin/sup +++ b/bin/sup @@ -138,6 +138,8 @@ begin Ncurses::A_BOLD c.add :index_starred_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD + c.add :index_draft_color, Ncurses::COLOR_RED, Ncurses::COLOR_BLACK, + Ncurses::A_BOLD c.add :labellist_old_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK c.add :labellist_new_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK, Ncurses::A_BOLD diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb index a2de13f..f156b69 100644 --- a/lib/sup/modes/inbox-mode.rb +++ b/lib/sup/modes/inbox-mode.rb @@ -9,7 +9,7 @@ class InboxMode < ThreadIndexMode end def initialize - super [:inbox, :sent], { :label => :inbox, :skip_killed => true } + super [:inbox, :sent, :draft], { :label => :inbox, :skip_killed => true } raise "can't have more than one!" if defined? @@instance @@instance = self end diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index e24d7e0..7a0b815 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -655,7 +655,6 @@ protected date = t.date.to_nice_s - new = t.has_label?(:unread) starred = t.has_label?(:starred) ## format the from column @@ -692,7 +691,9 @@ protected p = dp || t.participants.any? { |p| AccountManager.is_account? p } subj_color = - if new + if t.has_label?(:draft) + :index_draft_color + elsif t.has_label?(:unread) :index_new_color elsif starred :index_starred_color -- 1.5.3.1.109.gacd69 From mdk@mdk.am Mon Feb 11 18:57:37 2008 From: mdk@mdk.am (Michael Dominic K.) Date: Tue, 12 Feb 2008 00:57:37 +0100 Subject: [sup-talk] Backspace key? Message-ID: <1202774257.8173.4.camel@localhost.localdomain> Hello, I just gave a test-drive to sup. So far it looks absolutely great -- two thumbs up to the authors! I'm having one trivial problem though -- my backspace key doesn't work in all entry fields (del works). It's been a while since I fixed del/backspace issues in linux... any help/hints/config switch? I'm running: [Tue Feb 12 00:56:17 +0100 2008] using character set encoding "utf8" sup v0.4 ...installed via gems. My terminal standard gnome-terminal. Thanks in advance, -- Michael From patroclo7@gmail.com Tue Feb 12 03:25:43 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 12 Feb 2008 09:25:43 +0100 Subject: [sup-talk] Backspace key? In-Reply-To: <1202774257.8173.4.camel@localhost.localdomain> References: <1202774257.8173.4.camel@localhost.localdomain> Message-ID: <1202804371-sup-2434@clarabella.clarabella> Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008: > I'm having one trivial problem though -- my backspace key doesn't work > in all entry fields (del works). It's been a while since I fixed > del/backspace issues in linux... any help/hints/config switch? I do not use the gnome-terminal, but in my case the working string for backspace in sup is ^h, while my terminals (all rxvt derivatives) sent ^? by default. From the large literature about the topic, I think that other terminal settings could adjust the behaviour also with ^?, but setting ^h has no negative side effect for me. So look in the configuration of gnome-terminal for something like backspaceKey or string... -- Giorgio Lando From nicolas.pouillard@gmail.com Tue Feb 12 04:48:49 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 12 Feb 2008 10:48:49 +0100 Subject: [sup-talk] Backspace key? In-Reply-To: <1202774257.8173.4.camel@localhost.localdomain> References: <1202774257.8173.4.camel@localhost.localdomain> Message-ID: <1202809606-sup-7188@port-ext6.ensta.fr> Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008: > Hello, Hello, [...] > I'm having one trivial problem though -- my backspace key doesn't work > in all entry fields (del works). It's been a while since I fixed > del/backspace issues in linux... any help/hints/config switch? I had the same issue, as a workaround hitting CTRL-BACKSPACE worked for me. However I've made up an ugly change to handle this, perhaps it can help you. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Handle-the-keycode-127-like-KEY_BACKSPACE.patch Type: application/octet-stream Size: 822 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080212/46e95e95/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080212/46e95e95/attachment.bin From marko.myllymaki@iki.fi Tue Feb 12 14:30:42 2008 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi) Date: Tue, 12 Feb 2008 21:30:42 +0200 Subject: [sup-talk] how to browse archived? Message-ID: <1202844150-sup-5784@sieni> Sup 0.4 works fine! Only one wish at the moment: It would be nice to be able to browse archived messages (there is no such label in L list). Sometimes you just forget what actual words to search in some previous emails (which have no labels). So they are difficult to search but by browsing them you would find them. Funny... at the moment Delete seems to do the right thing for me (because "Deleted" appears in the label list for browsing :) From johannes@antiklimax.com Tue Feb 12 14:36:44 2008 From: johannes@antiklimax.com (Johannes Martinsson) Date: Tue, 12 Feb 2008 20:36:44 +0100 Subject: [sup-talk] how to browse archived? In-Reply-To: <1202844150-sup-5784@sieni> References: <1202844150-sup-5784@sieni> Message-ID: <1202844988-sup-7181@banana> > It would be nice to be able to browse archived messages (there is no > such label in L list). Sometimes you just forget what actual words to > search in some previous emails (which have no labels). So they are > difficult to search but by browsing them you would find them. Have you tried searching (\) for '*', that seems to show all archived messages. -- Johannes Martinsson johannes at antiklimax.se 0736 - 345 661 From chrisw@rice.edu Tue Feb 12 15:10:32 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Tue, 12 Feb 2008 14:10:32 -0600 Subject: [sup-talk] how to browse archived? In-Reply-To: <1202844150-sup-5784@sieni> References: <1202844150-sup-5784@sieni> Message-ID: <1202846964-sup-7866@chris-tablet> Excerpts from Marko MyllymXXki's message of Tue Feb 12 13:30:42 -0600 2008: > It would be nice to be able to browse archived messages (there is no > such label in L list). Sometimes you just forget what actual words > to search in some previous emails (which have no labels). So they > are difficult to search but by browsing them you would find them. Search for "-label:inbox" -- Christopher Warrington From marko.myllymaki@iki.fi Wed Feb 13 02:16:18 2008 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi) Date: Wed, 13 Feb 2008 09:16:18 +0200 Subject: [sup-talk] how to browse archived? In-Reply-To: <1202844988-sup-7181@banana> References: <1202844150-sup-5784@sieni> <1202844988-sup-7181@banana> Message-ID: <1202886942-sup-6585@sieni> Excerpts from Johannes Martinsson's message of Tue Feb 12 21:36:44 +0200 2008: > Have you tried searching (\) for '*', that seems to show all archived > messages. Thanks -this does the trick! From mdk@mdk.am Wed Feb 13 18:08:57 2008 From: mdk@mdk.am (Michael Dominic K.) Date: Thu, 14 Feb 2008 00:08:57 +0100 Subject: [sup-talk] Backspace key? In-Reply-To: <1202804371-sup-2434@clarabella.clarabella> References: <1202774257.8173.4.camel@localhost.localdomain> <1202804371-sup-2434@clarabella.clarabella> Message-ID: <67ed228e0802131508y19d94e55h2ba3b41bd748e758@mail.gmail.com> On Feb 12, 2008 9:25 AM, Giorgio Lando wrote: > Excerpts from Michael Dominic K.'s message of Tue Feb 12 00:57:37 +0100 2008: > > I'm having one trivial problem though -- my backspace key doesn't work > > in all entry fields (del works). It's been a while since I fixed > > del/backspace issues in linux... any help/hints/config switch? > > I do not use the gnome-terminal, but in my case the working string for > backspace in sup is ^h, while my terminals (all rxvt derivatives) sent > ^? by default. From the large literature about the topic, I think that > other terminal settings could adjust the behaviour also with ^?, but > setting ^h has no negative side effect for me. So look in the > configuration of gnome-terminal for something like backspaceKey or > string... Thanks, that worked for me (^h). Actually gnome terminal has a special configuration in the "compatibility section" that allows you to choose what is sent for backspace. However, I belive this is a bit of a workaround. I haven't noticed anything breaking with ^h except... sup-config. Where, again, backspace doesn't work with ^h on. -- Michael. From johannes@antiklimax.com Tue Feb 12 13:10:27 2008 From: johannes@antiklimax.com (Johannes Martinsson) Date: Tue, 12 Feb 2008 19:10:27 +0100 Subject: [sup-talk] [PATCH] Changed all (but one) occurrences of redwood to sup. Message-ID: <1202839827-11975-1-git-send-email-johannes@antiklimax.com> * Changed all occurrences of redwood to sup, but left out the one in the FAQ (What are all these "Red...). --- Rakefile | 2 +- bin/sup | 34 ++++++++-------- bin/sup-add | 16 ++++---- bin/sup-config | 18 ++++---- bin/sup-dump | 4 +- bin/sup-recover-sources | 10 ++-- bin/sup-sync | 12 +++--- bin/sup-sync-back | 14 +++--- bin/sup-tweak-labels | 8 ++-- devel/load-index.rb | 2 +- devel/profile.rb | 4 +- devel/start-console.rb | 2 +- doc/FAQ.txt | 2 +- lib/sup.rb | 54 +++++++++++++------------- lib/sup/account.rb | 2 +- lib/sup/buffer.rb | 4 +- lib/sup/colormap.rb | 6 +- lib/sup/contact.rb | 2 +- lib/sup/crypto.rb | 20 +++++----- lib/sup/draft.rb | 4 +- lib/sup/hook.rb | 6 +- lib/sup/horizontal-selector.rb | 2 +- lib/sup/imap.rb | 16 ++++---- lib/sup/index.rb | 54 +++++++++++++------------- lib/sup/keymap.rb | 2 +- lib/sup/label.rb | 2 +- lib/sup/logger.rb | 2 +- lib/sup/maildir.rb | 2 +- lib/sup/mbox.rb | 4 +- lib/sup/mbox/loader.rb | 2 +- lib/sup/mbox/ssh-file.rb | 6 +- lib/sup/mbox/ssh-loader.rb | 2 +- lib/sup/message-chunks.rb | 4 +- lib/sup/message.rb | 34 ++++++++-------- lib/sup/mode.rb | 6 +- lib/sup/modes/buffer-list-mode.rb | 2 +- lib/sup/modes/completion-mode.rb | 2 +- lib/sup/modes/compose-mode.rb | 2 +- lib/sup/modes/contact-list-mode.rb | 4 +- lib/sup/modes/edit-message-mode.rb | 8 ++-- lib/sup/modes/file-browser-mode.rb | 2 +- lib/sup/modes/forward-mode.rb | 2 +- lib/sup/modes/help-mode.rb | 2 +- lib/sup/modes/inbox-mode.rb | 2 +- lib/sup/modes/label-list-mode.rb | 4 +- lib/sup/modes/label-search-results-mode.rb | 2 +- lib/sup/modes/line-cursor-mode.rb | 2 +- lib/sup/modes/log-mode.rb | 2 +- lib/sup/modes/person-search-results-mode.rb | 2 +- lib/sup/modes/poll-mode.rb | 2 +- lib/sup/modes/reply-mode.rb | 2 +- lib/sup/modes/resume-mode.rb | 2 +- lib/sup/modes/scroll-mode.rb | 2 +- lib/sup/modes/search-results-mode.rb | 2 +- lib/sup/modes/text-mode.rb | 2 +- lib/sup/modes/thread-index-mode.rb | 6 +- lib/sup/modes/thread-view-mode.rb | 2 +- lib/sup/person.rb | 2 +- lib/sup/poll.rb | 16 ++++---- lib/sup/sent.rb | 4 +- lib/sup/source.rb | 2 +- lib/sup/suicide.rb | 4 +- lib/sup/tagger.rb | 2 +- lib/sup/textfield.rb | 6 +- lib/sup/thread.rb | 2 +- lib/sup/update.rb | 2 +- test/dummy_source.rb | 2 +- test/test_message.rb | 10 ++-- 68 files changed, 237 insertions(+), 237 deletions(-) diff --git a/Rakefile b/Rakefile index f99246f..3940e4d 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ end # thanks to "Mike H" ## allow people who use development versions by running "rake gem" ## and installing the resulting gem it to be able to do this. (gem ## versions must be in dotted-digit notation only). -version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION +version = Sup::VERSION == "git" ? "999" : Sup::VERSION Hoe.new('sup', version) do |p| p.rubyforge_name = 'sup' diff --git a/bin/sup b/bin/sup index 95b0af7..d0e3472 100644 --- a/bin/sup +++ b/bin/sup @@ -9,12 +9,12 @@ require "sup" BIN_VERSION = "git" -unless Redwood::VERSION == BIN_VERSION +unless Sup::VERSION == BIN_VERSION $stderr.puts < e case h.ask("Should I ask that process to kill itself? ") when /^\s*y\s*$/i h.say "Ok, suggesting seppuku..." - FileUtils.touch Redwood::SUICIDE_FN + FileUtils.touch Sup::SUICIDE_FN sleep SuicideManager::DELAY * 2 - FileUtils.rm_f Redwood::SUICIDE_FN + FileUtils.rm_f Sup::SUICIDE_FN h.say "Let's try that again." retry else @@ -110,20 +110,20 @@ EOS end begin - Redwood::start + Sup::start Index.load if(s = Index.source_for DraftManager.source_name) DraftManager.source = s else - Redwood::log "no draft source, auto-adding..." + Sup::log "no draft source, auto-adding..." Index.add_source DraftManager.new_source end if(s = Index.source_for SentManager.source_name) SentManager.source = s else - Redwood::log "no sent mail source, auto-adding..." + Sup::log "no sent mail source, auto-adding..." Index.add_source SentManager.new_source end @@ -191,7 +191,7 @@ begin begin s.connect rescue SourceError => e - Redwood::log "fatal error loading from #{s}: #{e.message}" + Sup::log "fatal error loading from #{s}: #{e.message}" end end end unless $opts[:no_initial_poll] @@ -293,19 +293,19 @@ ensure Index.stop_lock_update_thread end - Redwood::finish + Sup::finish stop_cursing - Redwood::log "stopped cursing" + Sup::log "stopped cursing" if SuicideManager.instantiated? && SuicideManager.die? - Redwood::log "I've been ordered to commit seppuku. I obey!" + Sup::log "I've been ordered to commit seppuku. I obey!" end if $exceptions.empty? - Redwood::log "no fatal errors. good job, william." + Sup::log "no fatal errors. good job, william." Index.save else - Redwood::log "oh crap, an exception" + Sup::log "oh crap, an exception" end Index.unlock diff --git a/bin/sup-add b/bin/sup-add index 50bbb29..b78963f 100644 --- a/bin/sup-add +++ b/bin/sup-add @@ -7,7 +7,7 @@ require 'trollop' require "sup" $opts = Trollop::options do - version "sup-add (sup #{Redwood::VERSION})" + version "sup-add (sup #{Sup::VERSION})" banner < "mbox", :path => fn }] when :maildir $last_fn ||= ENV["MAIL"] @@ -70,7 +70,7 @@ def add_source return if fn.nil? || fn.empty? $last_fn = fn - [Redwood::Maildir.suggest_labels_for(fn), + [Sup::Maildir.suggest_labels_for(fn), { :scheme => "maildir", :path => fn }] when :mboxssh $last_server ||= "localhost" @@ -82,7 +82,7 @@ def add_source return if fn.nil? || fn.empty? $last_fn = fn fn = "/#{fn}" # lame - [Redwood::MBox::SSHLoader.suggest_labels_for(fn), + [Sup::MBox::SSHLoader.suggest_labels_for(fn), { :scheme => "mbox+ssh", :host => srv, :path => fn }] when :imap, :imaps $last_server ||= "localhost" @@ -101,7 +101,7 @@ def add_source else host, port = srv, nil end - [Redwood::IMAP.suggest_labels_for(fn), + [Sup::IMAP.suggest_labels_for(fn), { :scheme => type.to_s, :host => host, :port => port, :path => fn }] end @@ -150,8 +150,8 @@ def add_source end $terminal.wrap_at = :auto -Redwood::start -index = Redwood::Index.new +Sup::start +index = Sup::Index.new index.load_sources say < to recover the index. @@ -21,7 +21,7 @@ No options. EOS end -index = Redwood::Index.new +index = Sup::Index.new index.load (1 ... index.index.reader.max_doc).each do |i| diff --git a/bin/sup-recover-sources b/bin/sup-recover-sources index af39b7d..33b1a65 100644 --- a/bin/sup-recover-sources +++ b/bin/sup-recover-sources @@ -49,7 +49,7 @@ end.parse(ARGV) require "sup" puts "loading index..." -index = Redwood::Index.new +index = Sup::Index.new index.load puts "loaded index of #{index.size} messages" @@ -64,16 +64,16 @@ ARGV.each do |fn| username = $stdin.gets.chomp print "Password for #{fn} (warning: cleartext): " password = $stdin.gets.chomp - Redwood::IMAP.new(fn, username, password, nil, !$opts[:unusual], $opts[:archive]) + Sup::IMAP.new(fn, username, password, nil, !$opts[:unusual], $opts[:archive]) else - Redwood::MBox::Loader.new(fn, nil, !$opts[:unusual], $opts[:archive]) + Sup::MBox::Loader.new(fn, nil, !$opts[:unusual], $opts[:archive]) end source_ids = {} count = 0 source.each do |offset, labels| begin - m = Redwood::Message.new :source => source, :source_info => offset + m = Sup::Message.new :source => source, :source_info => offset docid, entry = index.load_entry_for_id m.id next unless entry #puts "# #{source} #{offset} #{entry[:source_id]}" @@ -81,7 +81,7 @@ ARGV.each do |fn| source_ids[entry[:source_id]] = (source_ids[entry[:source_id]] || 0) + 1 count += 1 break if count == $opts[:scan_num] - rescue Redwood::MessageFormatError => e + rescue Sup::MessageFormatError => e puts "# #{e.message}" end end diff --git a/bin/sup-sync b/bin/sup-sync index 4a05257..9cb44c4 100644 --- a/bin/sup-sync +++ b/bin/sup-sync @@ -26,7 +26,7 @@ def time end opts = Trollop::options do - version "sup-sync (sup #{Redwood::VERSION})" + version "sup-sync (sup #{Sup::VERSION})" banner < e +rescue Sup::FatalSourceError => e $stderr.puts "Sorry, I couldn't communicate with a source: #{e.message}" rescue Exception => e File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace } raise ensure - Redwood::finish + Sup::finish index.unlock end diff --git a/bin/sup-sync-back b/bin/sup-sync-back index 57bebbe..8beb614 100644 --- a/bin/sup-sync-back +++ b/bin/sup-sync-back @@ -16,7 +16,7 @@ def die msg end opts = Trollop::options do - version "sup-sync-back (sup #{Redwood::VERSION})" + version "sup-sync-back (sup #{Sup::VERSION})" banner < e File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace } raise ensure - Redwood::finish + Sup::finish index.unlock end diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels index 21e766c..eba76f7 100644 --- a/bin/sup-tweak-labels +++ b/bin/sup-tweak-labels @@ -25,7 +25,7 @@ def time end opts = Trollop::options do - version "sup-tweak-labels (sup #{Redwood::VERSION})" + version "sup-tweak-labels (sup #{Sup::VERSION})" banner < e raise ensure index.save - Redwood::finish + Sup::finish index.unlock end diff --git a/devel/load-index.rb b/devel/load-index.rb index 858c8b5..8fa5861 100644 --- a/devel/load-index.rb +++ b/devel/load-index.rb @@ -1,7 +1,7 @@ require 'sup' puts "loading index..." - at index = Redwood::Index.new + at index = Sup::Index.new @index.load @i = @index.index puts "loaded index of #{@i.size} messages" diff --git a/devel/profile.rb b/devel/profile.rb index 67b6b08..e2d6b25 100644 --- a/devel/profile.rb +++ b/devel/profile.rb @@ -1,9 +1,9 @@ require 'rubygems' require 'ruby-prof' -require "redwood" +require "sup" result = RubyProf.profile do - Redwood::ThreadSet.new(ARGV.map { |fn| Redwood::MBox::Scanner.new fn }).load_n_threads 100 + Sup::ThreadSet.new(ARGV.map { |fn| Sup::MBox::Scanner.new fn }).load_n_threads 100 end printer = RubyProf::GraphHtmlPrinter.new(result) diff --git a/devel/start-console.rb b/devel/start-console.rb index 2d7de10..ab7224f 100644 --- a/devel/start-console.rb +++ b/devel/start-console.rb @@ -1,5 +1,5 @@ require 'sup' -include Redwood +include Sup start Index.new Index.load diff --git a/doc/FAQ.txt b/doc/FAQ.txt index 3b65330..1ca093e 100644 --- a/doc/FAQ.txt +++ b/doc/FAQ.txt @@ -88,7 +88,7 @@ A: Move the messages from the source to the target using whatever tool states will be lost when you sync the other source. So do them both in one go. -Q: What are all these "Redwood" references I see in the code? +Q: What are all these "sup" references I see in the code? A: That was Sup's original name. (Think pine, elm. Although I was a Mutt user, I couldn't think of a good progression there.) But it was taken by another project on RubyForge, and wasn't that diff --git a/lib/sup.rb b/lib/sup.rb index cec36b6..05ba6c4 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -23,16 +23,16 @@ class Module klass.instance_eval do define_method(:to_yaml_properties) { vars } - define_method(:to_yaml_type) { "!#{Redwood::YAML_DOMAIN},#{Redwood::YAML_DATE}/#{path}" } + define_method(:to_yaml_type) { "!#{Sup::YAML_DOMAIN},#{Sup::YAML_DATE}/#{path}" } end - YAML.add_domain_type("#{Redwood::YAML_DOMAIN},#{Redwood::YAML_DATE}", path) do |type, val| + YAML.add_domain_type("#{Sup::YAML_DOMAIN},#{Sup::YAML_DATE}", path) do |type, val| klass.new(*props.map { |p| val[p] }) end end end -module Redwood +module Sup VERSION = "git" BASE_DIR = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup") @@ -91,23 +91,23 @@ module Redwood end def start - Redwood::PersonManager.new Redwood::PERSON_FN - Redwood::SentManager.new Redwood::SENT_FN - Redwood::ContactManager.new Redwood::CONTACT_FN - Redwood::LabelManager.new Redwood::LABEL_FN - Redwood::AccountManager.new $config[:accounts] - Redwood::DraftManager.new Redwood::DRAFT_DIR - Redwood::UpdateManager.new - Redwood::PollManager.new - Redwood::SuicideManager.new Redwood::SUICIDE_FN - Redwood::CryptoManager.new + Sup::PersonManager.new Sup::PERSON_FN + Sup::SentManager.new Sup::SENT_FN + Sup::ContactManager.new Sup::CONTACT_FN + Sup::LabelManager.new Sup::LABEL_FN + Sup::AccountManager.new $config[:accounts] + Sup::DraftManager.new Sup::DRAFT_DIR + Sup::UpdateManager.new + Sup::PollManager.new + Sup::SuicideManager.new Sup::SUICIDE_FN + Sup::CryptoManager.new end def finish - Redwood::LabelManager.save if Redwood::LabelManager.instantiated? - Redwood::ContactManager.save if Redwood::ContactManager.instantiated? - Redwood::PersonManager.save if Redwood::PersonManager.instantiated? - Redwood::BufferManager.deinstantiate! if Redwood::BufferManager.instantiated? + Sup::LabelManager.save if Sup::LabelManager.instantiated? + Sup::ContactManager.save if Sup::ContactManager.instantiated? + Sup::PersonManager.save if Sup::PersonManager.instantiated? + Sup::BufferManager.deinstantiate! if Sup::BufferManager.instantiated? end ## not really a good place for this, so I'll just dump it here. @@ -164,8 +164,8 @@ EOM end ## set up default configuration file -if File.exists? Redwood::CONFIG_FN - $config = Redwood::load_yaml_obj Redwood::CONFIG_FN +if File.exists? Sup::CONFIG_FN + $config = Sup::load_yaml_obj Sup::CONFIG_FN else require 'etc' require 'socket' @@ -198,8 +198,8 @@ else :discard_snippets_from_encrypted_messages => false, } begin - FileUtils.mkdir_p Redwood::BASE_DIR - Redwood::save_yaml_obj $config, Redwood::CONFIG_FN + FileUtils.mkdir_p Sup::BASE_DIR + Sup::save_yaml_obj $config, Sup::CONFIG_FN rescue StandardError => e $stderr.puts "warning: #{e.message}" end @@ -211,7 +211,7 @@ require "sup/hook" ## we have to initialize this guy first, because other classes must ## reference it in order to register hooks, and they do that at parse ## time. -Redwood::HookManager.new Redwood::HOOK_DIR +Sup::HookManager.new Sup::HOOK_DIR ## everything we need to get logging working require "sup/buffer" @@ -221,7 +221,7 @@ require "sup/modes/scroll-mode" require "sup/modes/text-mode" require "sup/modes/log-mode" require "sup/logger" -module Redwood +module Sup def log s; Logger.log s; end module_function :log end @@ -229,13 +229,13 @@ end ## determine encoding and character set $encoding = Locale.current.charset if $encoding - Redwood::log "using character set encoding #{$encoding.inspect}" + Sup::log "using character set encoding #{$encoding.inspect}" else - Redwood::log "warning: can't find character set by using locale, defaulting to utf-8" + Sup::log "warning: can't find character set by using locale, defaulting to utf-8" $encoding = "utf-8" end -## now everything else (which can feel free to call Redwood::log at load time) +## now everything else (which can feel free to call Sup::log at load time) require "sup/update" require "sup/suicide" require "sup/message-chunks" @@ -280,5 +280,5 @@ require "sup/sent" $:.each do |base| d = File.join base, "sup/share/modes/" - Redwood::Mode.load_all_modes d if File.directory? d + Sup::Mode.load_all_modes d if File.directory? d end diff --git a/lib/sup/account.rb b/lib/sup/account.rb index f8ac0fc..30a8a31 100644 --- a/lib/sup/account.rb +++ b/lib/sup/account.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Account < Person attr_accessor :sendmail, :signature diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index 4374fa8..6fa659f 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -46,7 +46,7 @@ module Ncurses end end -module Redwood +module Sup class InputSequenceAborted < StandardError; end @@ -713,7 +713,7 @@ private end def default_terminal_title buf - "Sup #{Redwood::VERSION} :: #{buf.title}" + "Sup #{Sup::VERSION} :: #{buf.title}" end def get_status_and_title buf diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb index 9c6869a..941de40 100644 --- a/lib/sup/colormap.rb +++ b/lib/sup/colormap.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Colormap @@instance = nil @@ -86,7 +86,7 @@ class Colormap @next_id = (@next_id + 1) % NUM_COLORS @next_id += 1 if @next_id == 0 # 0 is always white on black id = @next_id - Redwood::log "colormap: for color #{sym}, using id #{id} -> #{fg}, #{bg}" + Sup::log "colormap: for color #{sym}, using id #{id} -> #{fg}, #{bg}" Curses.init_pair id, fg, bg or raise ArgumentError, "couldn't initialize curses color pair #{fg}, #{bg} (key #{id})" @@ -94,7 +94,7 @@ class Colormap ## delete the old mapping, if it exists if @users[cp] @users[cp].each do |usym| - Redwood::log "dropping color #{usym} (#{id})" + Sup::log "dropping color #{usym} (#{id})" @entries[usym][3] = nil end @users[cp] = [] diff --git a/lib/sup/contact.rb b/lib/sup/contact.rb index 8050c06..8bea99d 100644 --- a/lib/sup/contact.rb +++ b/lib/sup/contact.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ContactManager include Singleton diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index 9e16132..82174bd 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class CryptoManager include Singleton @@ -20,10 +20,10 @@ class CryptoManager @cmd = case bin when /\S/ - Redwood::log "crypto: detected gpg binary in #{bin}" + Sup::log "crypto: detected gpg binary in #{bin}" "#{bin} --quiet --batch --no-verbose --logger-fd 1 --use-agent" else - Redwood::log "crypto: no gpg binary detected" + Sup::log "crypto: no gpg binary detected" nil end end @@ -31,7 +31,7 @@ class CryptoManager def have_crypto?; !@cmd.nil? end def sign from, to, payload - payload_fn = Tempfile.new "redwood.payload" + payload_fn = Tempfile.new "sup.payload" payload_fn.write format_payload(payload) payload_fn.close @@ -49,7 +49,7 @@ class CryptoManager end def encrypt from, to, payload, sign=false - payload_fn = Tempfile.new "redwood.payload" + payload_fn = Tempfile.new "sup.payload" payload_fn.write format_payload(payload) payload_fn.close @@ -83,11 +83,11 @@ class CryptoManager def verify payload, signature # both RubyMail::Message objects return unknown_status(cant_find_binary) unless @cmd - payload_fn = Tempfile.new "redwood.payload" + payload_fn = Tempfile.new "sup.payload" payload_fn.write format_payload(payload) payload_fn.close - signature_fn = Tempfile.new "redwood.signature" + signature_fn = Tempfile.new "sup.signature" signature_fn.write signature.decode signature_fn.close @@ -109,7 +109,7 @@ class CryptoManager def decrypt payload # a RubyMail::Message object return unknown_status(cant_find_binary) unless @cmd - payload_fn = Tempfile.new "redwood.payload" + payload_fn = Tempfile.new "sup.payload" payload_fn.write payload.to_s payload_fn.close @@ -156,9 +156,9 @@ private def run_gpg args cmd = "#{@cmd} #{args} 2> /dev/null" - #Redwood::log "crypto: running: #{cmd}" + #Sup::log "crypto: running: #{cmd}" output = `#{cmd}` - #Redwood::log "crypto: output: #{output.inspect}" unless $?.success? + #Sup::log "crypto: output: #{output.inspect}" unless $?.success? output end end diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb index 81c0044..87af878 100644 --- a/lib/sup/draft.rb +++ b/lib/sup/draft.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class DraftManager include Singleton @@ -45,7 +45,7 @@ class DraftLoader < Source yaml_properties :cur_offset def initialize cur_offset=0 - dir = Redwood::DRAFT_DIR + dir = Sup::DRAFT_DIR Dir.mkdir dir unless File.exists? dir super DraftManager.source_name, cur_offset, true, false @dir = dir diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb index 98fcf57..c3f018e 100644 --- a/lib/sup/hook.rb +++ b/lib/sup/hook.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class HookManager ## there's probably a better way to do this, but to evaluate a hook @@ -40,7 +40,7 @@ class HookManager end def log s - Redwood::log "hook[#@__name]: #{s}" + Sup::log "hook[#@__name]: #{s}" end def ask_yes_or_no q @@ -137,7 +137,7 @@ private end def log m - Redwood::log("hook: " + m) + Sup::log("hook: " + m) end end diff --git a/lib/sup/horizontal-selector.rb b/lib/sup/horizontal-selector.rb index aef16d4..5d09321 100644 --- a/lib/sup/horizontal-selector.rb +++ b/lib/sup/horizontal-selector.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class HorizontalSelector attr_accessor :label diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb index e785597..b21cebc 100644 --- a/lib/sup/imap.rb +++ b/lib/sup/imap.rb @@ -41,7 +41,7 @@ require 'cgi' ## ## fuck you, imap committee. you managed to design something nearly as ## shitty as mbox but goddamn THIRTY YEARS LATER. -module Redwood +module Sup class IMAP < Source SCAN_INTERVAL = 60 # seconds @@ -131,13 +131,13 @@ class IMAP < Source return if last_id == @ids.length range = (@ids.length + 1) .. last_id - Redwood::log "fetching IMAP headers #{range}" + Sup::log "fetching IMAP headers #{range}" fetch(range, ['RFC822.SIZE', 'INTERNALDATE', 'FLAGS']).each do |v| id = make_id v @ids << id @imap_state[id] = { :id => v.seqno, :flags => v.attr["FLAGS"] } end - Redwood::log "done fetching IMAP headers" + Sup::log "done fetching IMAP headers" end synchronized :scan_mailbox @@ -196,7 +196,7 @@ private if good_results.empty? raise FatalSourceError, "no IMAP response for #{ids} containing all fields #{fields.join(', ')} (got #{results.size} results)" elsif good_results.size < results.size - Redwood::log "Your IMAP server sucks. It sent #{results.size} results for a request for #{good_results.size} messages. What are you using, Binc?" + Sup::log "Your IMAP server sucks. It sent #{results.size} results for a request for #{good_results.size} messages. What are you using, Binc?" end good_results @@ -224,12 +224,12 @@ private raise Net::IMAP::NoResponseError unless @imap.capability().member? "AUTH=CRAM-MD5" @imap.authenticate 'CRAM-MD5', @username, @password rescue Net::IMAP::BadResponseError, Net::IMAP::NoResponseError => e - Redwood::log "CRAM-MD5 authentication failed: #{e.class}. Trying LOGIN auth..." + Sup::log "CRAM-MD5 authentication failed: #{e.class}. Trying LOGIN auth..." begin raise Net::IMAP::NoResponseError unless @imap.capability().member? "AUTH=LOGIN" @imap.authenticate 'LOGIN', @username, @password rescue Net::IMAP::BadResponseError, Net::IMAP::NoResponseError => e - Redwood::log "LOGIN authentication failed: #{e.class}. Trying plain-text LOGIN..." + Sup::log "LOGIN authentication failed: #{e.class}. Trying plain-text LOGIN..." @imap.login @username, @password end end @@ -246,7 +246,7 @@ private def say s @say_id = BufferManager.say s, @say_id if BufferManager.instantiated? - Redwood::log s + Sup::log s end def shutup @@ -303,7 +303,7 @@ private rescue *RECOVERABLE_ERRORS => e if (retries += 1) <= 3 @imap = nil - Redwood::log "got #{e.class.name}: #{e.message.inspect}" + Sup::log "got #{e.class.name}: #{e.message.inspect}" sleep 2 retry end diff --git a/lib/sup/index.rb b/lib/sup/index.rb index cf2ac6d..b634b63 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -1,4 +1,4 @@ -## the index structure for redwood. interacts with ferret. +## the index structure for sup. interacts with ferret. require 'fileutils' require 'ferret' @@ -6,11 +6,11 @@ begin require 'chronic' $have_chronic = true rescue LoadError => e - Redwood::log "optional 'chronic' library not found (run 'gem install chronic' to install)" + Sup::log "optional 'chronic' library not found (run 'gem install chronic' to install)" $have_chronic = false end -module Redwood +module Sup class Index class LockError < StandardError @@ -44,7 +44,7 @@ class Index def lockfile; File.join @dir, "lock" end def lock - Redwood::log "locking #{lockfile}..." + Sup::log "locking #{lockfile}..." begin @lock.lock rescue Lockfile::MaxTriesLockError @@ -53,7 +53,7 @@ class Index end def start_lock_update_thread - @lock_update_thread = Redwood::reporting_thread("lock update") do + @lock_update_thread = Sup::reporting_thread("lock update") do while true sleep 30 @lock.touch_yourself @@ -99,7 +99,7 @@ EOS def unlock if @lock && @lock.locked? - Redwood::log "unlocking #{lockfile}..." + Sup::log "unlocking #{lockfile}..." @lock.unlock end end @@ -110,7 +110,7 @@ EOS end def save - Redwood::log "saving index and sources..." + Sup::log "saving index and sources..." FileUtils.mkdir_p @dir unless File.exists? @dir save_sources save_index @@ -131,11 +131,11 @@ EOS def load_index dir=File.join(@dir, "ferret") if File.exists? dir - Redwood::log "loading index..." + Sup::log "loading index..." @index = Ferret::Index::Index.new(:path => dir, :analyzer => @analyzer) - Redwood::log "loaded index of #{@index.size} messages" + Sup::log "loaded index of #{@index.size} messages" else - Redwood::log "creating index..." + Sup::log "creating index..." field_infos = Ferret::Index::FieldInfos.new :store => :yes field_infos.add_field :message_id field_infos.add_field :source_id @@ -220,7 +220,7 @@ EOS offset = 0 while true results = @index.search(query, :sort => "date DESC", :limit => EACH_BY_DATE_NUM, :offset => offset) - Redwood::log "got #{results.total_hits} results for query (offset #{offset}) #{query.inspect}" + Sup::log "got #{results.total_hits} results for query (offset #{offset}) #{query.inspect}" results.hits.each { |hit| yield @index[hit.doc][:message_id], lambda { build_message hit.doc } } break if offset >= results.total_hits - EACH_BY_DATE_NUM offset += EACH_BY_DATE_NUM @@ -245,7 +245,7 @@ EOS SAME_SUBJECT_DATE_LIMIT = 7 MAX_CLAUSES = 1000 def each_message_in_thread_for m, opts={} - #Redwood::log "Building thread for #{m.id}: #{m.subj}" + #Sup::log "Building thread for #{m.id}: #{m.subj}" messages = {} searched = {} num_queries = 0 @@ -265,7 +265,7 @@ EOS q = build_query :qobj => q pending = @index.search(q).hits.map { |hit| @index[hit.doc][:message_id] } - Redwood::log "found #{pending.size} results for subject query #{q}" + Sup::log "found #{pending.size} results for subject query #{q}" else pending = [m.id] end @@ -295,7 +295,7 @@ EOS end mid = @index[docid][:message_id] unless messages.member?(mid) - #Redwood::log "got #{mid} as a child of #{id}" + #Sup::log "got #{mid} as a child of #{id}" messages[mid] ||= lambda { build_message docid } refs = @index[docid][:refs].split(" ") pending += refs.select { |id| !searched[id] } @@ -304,10 +304,10 @@ EOS end if killed - Redwood::log "thread for #{m.id} is killed, ignoring" + Sup::log "thread for #{m.id} is killed, ignoring" false else - Redwood::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}: #{m.subj}" if num_queries > 0 + Sup::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}: #{m.subj}" if num_queries > 0 messages.each { |mid, builder| yield mid, builder } true end @@ -357,12 +357,12 @@ EOS end q.add_query Ferret::Search::TermQuery.new(:label, "spam"), :must_not - Redwood::log "contact search: #{q}" + Sup::log "contact search: #{q}" contacts = {} num = h[:num] || 20 @index.search_each(q, :sort => "date DESC", :limit => :all) do |docid, score| break if contacts.size >= num - #Redwood::log "got message #{docid} to: #{@index[docid][:to].inspect} and from: #{@index[docid][:from].inspect}" + #Sup::log "got message #{docid} to: #{@index[docid][:to].inspect} and from: #{@index[docid][:from].inspect}" f = @index[docid][:from] t = @index[docid][:to] @@ -376,8 +376,8 @@ EOS contacts.keys.compact end - def load_sources fn=Redwood::SOURCE_FN - source_array = (Redwood::load_yaml_obj(fn) || []).map { |o| Recoverable.new o } + def load_sources fn=Sup::SOURCE_FN + source_array = (Sup::load_yaml_obj(fn) || []).map { |o| Recoverable.new o } @sources = Hash[*(source_array).map { |s| [s.id, s] }.flatten] @sources_dirty = false end @@ -405,7 +405,7 @@ protected ## the string with Ferret, and return the resulting query object. norms = @qparser.parse(s).to_s - Redwood::log "normalized #{s.inspect} to #{norms.inspect}" unless s == norms + Sup::log "normalized #{s.inspect} to #{norms.inspect}" unless s == norms subs = norms.gsub(/\b(to|from):(\S+)\b/) do field, name = $1, $2 @@ -460,13 +460,13 @@ protected if realdate case field when "after" - Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate.end}" + Sup::log "chronic: translated #{field}:#{datestr} to #{realdate.end}" "date:(>= #{sprintf "%012d", realdate.end.to_i})" when "before" - Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate.begin}" + Sup::log "chronic: translated #{field}:#{datestr} to #{realdate.begin}" "date:(<= #{sprintf "%012d", realdate.begin.to_i})" else - Redwood::log "chronic: translated #{field}:#{datestr} to #{realdate}" + Sup::log "chronic: translated #{field}:#{datestr} to #{realdate}" "date:(<= #{sprintf "%012d", realdate.end.to_i}) date:(>= #{sprintf "%012d", realdate.begin.to_i})" end else @@ -477,7 +477,7 @@ protected subs = nil if chronic_failure end - Redwood::log "translated #{norms.inspect} to #{subs.inspect}" unless subs == norms + Sup::log "translated #{norms.inspect} to #{subs.inspect}" unless subs == norms if subs [@qparser.parse(subs), extraopts] else @@ -505,14 +505,14 @@ protected query end - def save_sources fn=Redwood::SOURCE_FN + def save_sources fn=Sup::SOURCE_FN if @sources_dirty || @sources.any? { |id, s| s.dirty? } bakfn = fn + ".bak" if File.exists? fn File.chmod 0600, fn FileUtils.mv fn, bakfn, :force => true unless File.exists?(bakfn) && File.size(fn) == 0 end - Redwood::save_yaml_obj @sources.values.sort_by { |s| s.id.to_i }, fn, true + Sup::save_yaml_obj @sources.values.sort_by { |s| s.id.to_i }, fn, true File.chmod 0600, fn end @sources_dirty = false diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb index 3176415..d05be92 100644 --- a/lib/sup/keymap.rb +++ b/lib/sup/keymap.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Keymap def initialize diff --git a/lib/sup/label.rb b/lib/sup/label.rb index 4afc0f9..8d689fe 100644 --- a/lib/sup/label.rb +++ b/lib/sup/label.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class LabelManager include Singleton diff --git a/lib/sup/logger.rb b/lib/sup/logger.rb index ebdeebe..6fc60ba 100644 --- a/lib/sup/logger.rb +++ b/lib/sup/logger.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Logger @@instance = nil diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 7b85383..c03f1d5 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -1,7 +1,7 @@ require 'rmail' require 'uri' -module Redwood +module Sup ## Maildir doesn't provide an ordered unique id, which is what Sup ## requires to be really useful. So we must maintain, in memory, a diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb index 0ce52fe..19302be 100644 --- a/lib/sup/mbox.rb +++ b/lib/sup/mbox.rb @@ -3,7 +3,7 @@ require "sup/mbox/ssh-file" require "sup/mbox/ssh-loader" require "sup/rfc2047" -module Redwood +module Sup ## some utility functions. actually these are not mbox-specific at all ## and should be moved somewhere else. @@ -58,7 +58,7 @@ module MBox begin Rfc2047.decode_to $encoding, v rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence => e - Redwood::log "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}" + Sup::log "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}" v end end diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb index a66d7b9..92220c2 100644 --- a/lib/sup/mbox/loader.rb +++ b/lib/sup/mbox/loader.rb @@ -1,7 +1,7 @@ require 'rmail' require 'uri' -module Redwood +module Sup module MBox class Loader < Source diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb index d474636..ca87d63 100644 --- a/lib/sup/mbox/ssh-file.rb +++ b/lib/sup/mbox/ssh-file.rb @@ -1,6 +1,6 @@ require 'net/ssh' -module Redwood +module Sup module MBox class SSHFileError < StandardError; end @@ -18,7 +18,7 @@ class SSHFileError < StandardError; end ## debugging TODO: remove me def debug s - Redwood::log s + Sup::log s end module_function :debug @@ -154,7 +154,7 @@ private ## TODO: share this code with imap def say s @say_id = BufferManager.say s, @say_id if BufferManager.instantiated? - Redwood::log s + Sup::log s end def shutup diff --git a/lib/sup/mbox/ssh-loader.rb b/lib/sup/mbox/ssh-loader.rb index e422a48..f4c163c 100644 --- a/lib/sup/mbox/ssh-loader.rb +++ b/lib/sup/mbox/ssh-loader.rb @@ -1,6 +1,6 @@ require 'net/ssh' -module Redwood +module Sup module MBox class SSHLoader < Source diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 0606395..9bbad7d 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -39,7 +39,7 @@ class Tempfile end -module Redwood +module Sup module Chunk class Attachment HookManager.register "mime-decode", < e - Redwood::log "problem getting messages from #{@source}: #{e.message}" + Sup::log "problem getting messages from #{@source}: #{e.message}" ## we need force_to_top here otherwise this window will cover ## up the error message one @source.error ||= e - Redwood::report_broken_sources :force_to_top => true + Sup::report_broken_sources :force_to_top => true [Chunk::Text.new(error_message(e.message).split("\n"))] end end @@ -234,9 +234,9 @@ EOS begin yield rescue SourceError => e - Redwood::log "problem getting messages from #{@source}: #{e.message}" + Sup::log "problem getting messages from #{@source}: #{e.message}" @source.error ||= e - Redwood::report_broken_sources :force_to_top => true + Sup::report_broken_sources :force_to_top => true error_message e.message end end @@ -307,25 +307,25 @@ private def multipart_signed_to_chunks m if m.body.size != 2 - Redwood::log "warning: multipart/signed with #{m.body.size} parts (expecting 2)" + Sup::log "warning: multipart/signed with #{m.body.size} parts (expecting 2)" return end payload, signature = m.body if signature.multipart? - Redwood::log "warning: multipart/signed with payload multipart #{payload.multipart?} and signature multipart #{signature.multipart?}" + Sup::log "warning: multipart/signed with payload multipart #{payload.multipart?} and signature multipart #{signature.multipart?}" return end ## this probably will never happen if payload.header.content_type == "application/pgp-signature" - Redwood::log "warning: multipart/signed with payload content type #{payload.header.content_type}" + Sup::log "warning: multipart/signed with payload content type #{payload.header.content_type}" return end if signature.header.content_type != "application/pgp-signature" ## unknown signature type; just ignore. - #Redwood::log "warning: multipart/signed with signature content type #{signature.header.content_type}" + #Sup::log "warning: multipart/signed with signature content type #{signature.header.content_type}" return end @@ -334,23 +334,23 @@ private def multipart_encrypted_to_chunks m if m.body.size != 2 - Redwood::log "warning: multipart/encrypted with #{m.body.size} parts (expecting 2)" + Sup::log "warning: multipart/encrypted with #{m.body.size} parts (expecting 2)" return end control, payload = m.body if control.multipart? - Redwood::log "warning: multipart/encrypted with control multipart #{control.multipart?} and payload multipart #{payload.multipart?}" + Sup::log "warning: multipart/encrypted with control multipart #{control.multipart?} and payload multipart #{payload.multipart?}" return end if payload.header.content_type != "application/octet-stream" - Redwood::log "warning: multipart/encrypted with payload content type #{payload.header.content_type}" + Sup::log "warning: multipart/encrypted with payload content type #{payload.header.content_type}" return end if control.header.content_type != "application/pgp-encrypted" - Redwood::log "warning: multipart/encrypted with control content type #{signature.header.content_type}" + Sup::log "warning: multipart/encrypted with control content type #{signature.header.content_type}" return end @@ -421,7 +421,7 @@ private return body unless charset Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2] rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e - Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}" + Sup::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}" File.open("sup-unable-to-decode.txt", "w") { |f| f.write body } body end diff --git a/lib/sup/mode.rb b/lib/sup/mode.rb index 9900dc3..0808c6b 100644 --- a/lib/sup/mode.rb +++ b/lib/sup/mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Mode attr_accessor :buffer @@ -91,10 +91,10 @@ EOS unless err.empty? message = err.first.read if message =~ /^\s*$/ - Redwood::log "error running #{command} (but no error message)" + Sup::log "error running #{command} (but no error message)" BufferManager.flash "Error running #{command}!" else - Redwood::log "error running #{command}: #{message}" + Sup::log "error running #{command}: #{message}" BufferManager.flash "Error: #{message}" end return diff --git a/lib/sup/modes/buffer-list-mode.rb b/lib/sup/modes/buffer-list-mode.rb index 91b2fac..e193af7 100644 --- a/lib/sup/modes/buffer-list-mode.rb +++ b/lib/sup/modes/buffer-list-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class BufferListMode < LineCursorMode register_keymap do |k| diff --git a/lib/sup/modes/completion-mode.rb b/lib/sup/modes/completion-mode.rb index 3cb2fad..06cd5dc 100644 --- a/lib/sup/modes/completion-mode.rb +++ b/lib/sup/modes/completion-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class CompletionMode < ScrollMode INTERSTITIAL = " " diff --git a/lib/sup/modes/compose-mode.rb b/lib/sup/modes/compose-mode.rb index f063b92..c3ace01 100644 --- a/lib/sup/modes/compose-mode.rb +++ b/lib/sup/modes/compose-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ComposeMode < EditMessageMode def initialize opts={} diff --git a/lib/sup/modes/contact-list-mode.rb b/lib/sup/modes/contact-list-mode.rb index f7b3ccb..e5bed77 100644 --- a/lib/sup/modes/contact-list-mode.rb +++ b/lib/sup/modes/contact-list-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup module CanAliasContacts def alias_contact p @@ -98,7 +98,7 @@ class ContactListMode < LineCursorMode end def load_in_background - Redwood::reporting_thread("contact manager load in bg") do + Sup::reporting_thread("contact manager load in bg") do load update BufferManager.draw_screen diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index 6a7f273..e2e1656 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -3,7 +3,7 @@ require 'socket' # just for gethostname! require 'pathname' require 'rmail' -module Redwood +module Sup class SendmailCommandFailed < StandardError; end @@ -285,7 +285,7 @@ protected BufferManager.flash "Message sent!" true rescue SystemCallError, SendmailCommandFailed, CryptoManager::Error => e - Redwood::log "Problem sending mail: #{e.message}" + Sup::log "Problem sending mail: #{e.message}" BufferManager.flash "Problem sending mail: #{e.message}" false end @@ -335,7 +335,7 @@ protected end m.header["Date"] = date.rfc2822 m.header["Message-Id"] = @message_id - m.header["User-Agent"] = "Sup/#{Redwood::VERSION}" + m.header["User-Agent"] = "Sup/#{Sup::VERSION}" m end @@ -355,7 +355,7 @@ EOS Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline -User-Agent: Redwood/#{Redwood::VERSION} +User-Agent: Sup/#{Sup::VERSION} EOS end diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb index b49f3f4..11c7e26 100644 --- a/lib/sup/modes/file-browser-mode.rb +++ b/lib/sup/modes/file-browser-mode.rb @@ -1,6 +1,6 @@ require 'pathname' -module Redwood +module Sup ## meant to be spawned via spawn_modal! class FileBrowserMode < LineCursorMode diff --git a/lib/sup/modes/forward-mode.rb b/lib/sup/modes/forward-mode.rb index 147efb6..3080a6f 100644 --- a/lib/sup/modes/forward-mode.rb +++ b/lib/sup/modes/forward-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ForwardMode < EditMessageMode ## TODO: share some of this with reply-mode diff --git a/lib/sup/modes/help-mode.rb b/lib/sup/modes/help-mode.rb index b98f131..4244950 100644 --- a/lib/sup/modes/help-mode.rb +++ b/lib/sup/modes/help-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class HelpMode < TextMode def initialize mode, global_keymap diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb index a2de13f..e48db6e 100644 --- a/lib/sup/modes/inbox-mode.rb +++ b/lib/sup/modes/inbox-mode.rb @@ -1,6 +1,6 @@ require 'thread' -module Redwood +module Sup class InboxMode < ThreadIndexMode register_keymap do |k| diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb index 514e9c4..64221eb 100644 --- a/lib/sup/modes/label-list-mode.rb +++ b/lib/sup/modes/label-list-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class LabelListMode < LineCursorMode register_keymap do |k| @@ -61,7 +61,7 @@ protected @labels = [] counts.map do |label, string, total, unread| if total == 0 && !LabelManager::RESERVED_LABELS.include?(label) - Redwood::log "no hits for label #{label}, deleting" + Sup::log "no hits for label #{label}, deleting" LabelManager.delete label next end diff --git a/lib/sup/modes/label-search-results-mode.rb b/lib/sup/modes/label-search-results-mode.rb index af6831c..6d478d5 100644 --- a/lib/sup/modes/label-search-results-mode.rb +++ b/lib/sup/modes/label-search-results-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class LabelSearchResultsMode < ThreadIndexMode def initialize labels diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb index 246f2b5..51c1cda 100644 --- a/lib/sup/modes/line-cursor-mode.rb +++ b/lib/sup/modes/line-cursor-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup ## extends ScrollMode to have a line-based cursor. class LineCursorMode < ScrollMode diff --git a/lib/sup/modes/log-mode.rb b/lib/sup/modes/log-mode.rb index de16b5e..60f28a8 100644 --- a/lib/sup/modes/log-mode.rb +++ b/lib/sup/modes/log-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class LogMode < TextMode register_keymap do |k| diff --git a/lib/sup/modes/person-search-results-mode.rb b/lib/sup/modes/person-search-results-mode.rb index fc09126..bc46c71 100644 --- a/lib/sup/modes/person-search-results-mode.rb +++ b/lib/sup/modes/person-search-results-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class PersonSearchResultsMode < ThreadIndexMode def initialize people diff --git a/lib/sup/modes/poll-mode.rb b/lib/sup/modes/poll-mode.rb index 5849f3e..0e90643 100644 --- a/lib/sup/modes/poll-mode.rb +++ b/lib/sup/modes/poll-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class PollMode < LogMode def initialize diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index e7b2929..26549e4 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ReplyMode < EditMessageMode REPLY_TYPES = [:sender, :recipient, :list, :all, :user] diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb index b1c69fc..9f08cfd 100644 --- a/lib/sup/modes/resume-mode.rb +++ b/lib/sup/modes/resume-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ResumeMode < EditMessageMode def initialize m diff --git a/lib/sup/modes/scroll-mode.rb b/lib/sup/modes/scroll-mode.rb index 219a4ce..d79754a 100644 --- a/lib/sup/modes/scroll-mode.rb +++ b/lib/sup/modes/scroll-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class ScrollMode < Mode ## we define topline and botline as the top and bottom lines of any diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb index f64a227..3609762 100644 --- a/lib/sup/modes/search-results-mode.rb +++ b/lib/sup/modes/search-results-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class SearchResultsMode < ThreadIndexMode def initialize qobj, qopts = nil diff --git a/lib/sup/modes/text-mode.rb b/lib/sup/modes/text-mode.rb index 273c028..3ae9935 100644 --- a/lib/sup/modes/text-mode.rb +++ b/lib/sup/modes/text-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class TextMode < ScrollMode attr_reader :text diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index b13729d..14e1ca6 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup ## subclasses should implement: ## - is_relevant? @@ -79,7 +79,7 @@ EOS def select t=nil, when_done=nil t ||= cursor_thread or return - Redwood::reporting_thread("load messages for thread-view-mode") do + Sup::reporting_thread("load messages for thread-view-mode") do num = t.size message = "Loading #{num.pluralize 'message body'}..." BufferManager.say(message) do |sid| @@ -448,7 +448,7 @@ EOS def load_n_threads_background n=LOAD_MORE_THREAD_NUM, opts={} return if @load_thread # todo: wrap in mutex - @load_thread = Redwood::reporting_thread("load threads for thread-index-mode") do + @load_thread = Sup::reporting_thread("load threads for thread-index-mode") do num = load_n_threads n, opts opts[:when_done].call(num) if opts[:when_done] @load_thread = nil diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb index 961fc5d..766cea5 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb @@ -1,5 +1,5 @@ require 'open3' -module Redwood +module Sup class ThreadViewMode < LineCursorMode ## this holds all info we need to lay out a message diff --git a/lib/sup/person.rb b/lib/sup/person.rb index fb58f23..1995059 100644 --- a/lib/sup/person.rb +++ b/lib/sup/person.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class PersonManager include Singleton diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index 2dd9150..68f1171 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -1,6 +1,6 @@ require 'thread' -module Redwood +module Sup class PollManager include Singleton @@ -64,7 +64,7 @@ EOS end def start - @thread = Redwood::reporting_thread("periodic poll") do + @thread = Sup::reporting_thread("periodic poll") do while true sleep DELAY / 2 poll if @last_poll.nil? || (Time.now - @last_poll) >= DELAY @@ -88,8 +88,8 @@ EOS begin yield "Loading from #{source}... " unless source.done? || source.has_errors? rescue SourceError => e - Redwood::log "problem getting messages from #{source}: #{e.message}" - Redwood::report_broken_sources :force_to_top => true + Sup::log "problem getting messages from #{source}: #{e.message}" + Sup::report_broken_sources :force_to_top => true next end @@ -140,7 +140,7 @@ EOS source.each do |offset, labels| if source.has_errors? - Redwood::log "error loading messages from #{source}: #{source.error.message}" + Sup::log "error loading messages from #{source}: #{source.error.message}" return end @@ -160,12 +160,12 @@ EOS Index.sync_message m, docid, entry UpdateManager.relay self, :added, m unless entry rescue MessageFormatError => e - Redwood::log "ignoring erroneous message at #{source}##{offset}: #{e.message}" + Sup::log "ignoring erroneous message at #{source}##{offset}: #{e.message}" end end rescue SourceError => e - Redwood::log "problem getting messages from #{source}: #{e.message}" - Redwood::report_broken_sources :force_to_top => true + Sup::log "problem getting messages from #{source}: #{e.message}" + Sup::report_broken_sources :force_to_top => true end end end diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb index 9c802d9..03b9e2a 100644 --- a/lib/sup/sent.rb +++ b/lib/sup/sent.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class SentManager include Singleton @@ -34,7 +34,7 @@ class SentLoader < MBox::Loader yaml_properties :cur_offset def initialize cur_offset=0 - @filename = Redwood::SENT_FN + @filename = Sup::SENT_FN File.open(@filename, "w") { } unless File.exists? @filename super "mbox://" + @filename, cur_offset, true, true end diff --git a/lib/sup/source.rb b/lib/sup/source.rb index 6510aae..e69f816 100644 --- a/lib/sup/source.rb +++ b/lib/sup/source.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class SourceError < StandardError def initialize *a diff --git a/lib/sup/suicide.rb b/lib/sup/suicide.rb index 98b4346..d84a3b9 100644 --- a/lib/sup/suicide.rb +++ b/lib/sup/suicide.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class SuicideManager include Singleton @@ -16,7 +16,7 @@ class SuicideManager bool_reader :die def start - @thread = Redwood::reporting_thread("suicide watch") do + @thread = Sup::reporting_thread("suicide watch") do while true sleep DELAY if File.exists? @fn diff --git a/lib/sup/tagger.rb b/lib/sup/tagger.rb index 3e72463..b8efa8e 100644 --- a/lib/sup/tagger.rb +++ b/lib/sup/tagger.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup class Tagger def initialize mode diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb index 2c52595..1c5a751 100644 --- a/lib/sup/textfield.rb +++ b/lib/sup/textfield.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup ## a fully-functional text field supporting completions, expansions, ## history--everything! @@ -112,11 +112,11 @@ class TextField unless @history.empty? value = get_cursed_value @i ||= @history.size - #Redwood::log "history before #{@history.inspect}" + #Sup::log "history before #{@history.inspect}" @history[@i] = value #unless value =~ /^\s*$/ @i = (@i + (c == Ncurses::KEY_UP ? -1 : 1)) % @history.size @value = @history[@i] - #Redwood::log "history after #{@history.inspect}" + #Sup::log "history after #{@history.inspect}" set_cursed_value @value Ncurses::Form::REQ_END_FIELD end diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 32002c4..a087e2b 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -24,7 +24,7 @@ ## a faked root object tying them all together into one tree ## structure. -module Redwood +module Sup class Thread include Enumerable diff --git a/lib/sup/update.rb b/lib/sup/update.rb index 021b7e1..e7a9983 100644 --- a/lib/sup/update.rb +++ b/lib/sup/update.rb @@ -1,4 +1,4 @@ -module Redwood +module Sup ## Classic listener/broadcaster paradigm. Handles communication between various ## parts of Sup. diff --git a/test/dummy_source.rb b/test/dummy_source.rb index f3afa31..4e84d31 100644 --- a/test/dummy_source.rb +++ b/test/dummy_source.rb @@ -5,7 +5,7 @@ require 'stringio' require 'rmail' require 'uri' -module Redwood +module Sup class DummySource < Source diff --git a/test/test_message.rb b/test/test_message.rb index c887773..6a3c4a9 100644 --- a/test/test_message.rb +++ b/test/test_message.rb @@ -24,7 +24,7 @@ class File end -module Redwood +module Sup class TestMessage < Test::Unit::TestCase @@ -236,10 +236,10 @@ EOS # the message, then the non-quoted part, then the two attachments assert_equal(4, chunks.length) - assert_equal(chunks[0].class, Redwood::Chunk::Quote) - assert_equal(chunks[1].class, Redwood::Chunk::Text) - assert_equal(chunks[2].class, Redwood::Chunk::Attachment) - assert_equal(chunks[3].class, Redwood::Chunk::Attachment) + assert_equal(chunks[0].class, Sup::Chunk::Quote) + assert_equal(chunks[1].class, Sup::Chunk::Text) + assert_equal(chunks[2].class, Sup::Chunk::Attachment) + assert_equal(chunks[3].class, Sup::Chunk::Attachment) # further testing of chunks will happen in test_message_chunks.rb # (possibly not yet implemented) -- 1.5.3.8 From chaos@highprogrammer.com Thu Feb 14 16:22:01 2008 From: chaos@highprogrammer.com (Alan De Smet) Date: Thu, 14 Feb 2008 15:22:01 -0600 Subject: [sup-talk] fatal exception: invalid contacts.txt Message-ID: <20080214212201.GE7284@alpha.monkeycosm.net> I'm trying to import a bunch of contacts into sup by directly modifying the .sup/contacts.txt file. Apparently blank lines and comments are not welcome. If the goals of contacts.txt include that humans are able to edit it, blank lines and comments are helpful and it would be nice if they were allowed. If that's madness, and only software should edit the file, I'd expect an error message and more graceful exit. This is sup v0.4, installed this morning via gem. It (and rubygems) is installed as a user, not root, on a Red Hat Enterprise Linux 5 machine. contents of contacts.txt: > alice: Alice > > bob: Bob Output: > [Thu Feb 14 15:17:25 -0600 2008] using character set encoding "UTF-8" > [Thu Feb 14 15:17:25 -0600 2008] optional 'chronic' library not found (run 'gem install chronic' to install) > [Thu Feb 14 15:17:25 -0600 2008] locking /u/a/d/adesmet/.sup/lock... > [Thu Feb 14 15:17:25 -0600 2008] stopped cursing > [Thu Feb 14 15:17:25 -0600 2008] oh crap, an exception > [Thu Feb 14 15:17:25 -0600 2008] unlocking /u/a/d/adesmet/.sup/lock... > ---------------------------------------------------------------- > I'm very sorry. It seems that an error occurred in Sup. Please > accept my sincere apologies. If you don't mind, please send the > contents of sup-exception-log.txt and a brief report of the > circumstances to sup-talk at rubyforge dot orgs so that I might > address this problem. Thank you! > > Sincerely, > William > ---------------------------------------------------------------- > --- RuntimeError from thread: main > can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n" > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113 > opt/ruby_gem_home/bin/sup:19:in `load' > opt/ruby_gem_home/bin/sup:19 contents of sup-exception-log.txt: > --- RuntimeError from thread: main > can't parse /u/a/d/adesmet/.sup/contacts.txt line "\n" > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:18:in `initialize' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `foreach' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup/contact.rb:17:in `initialize' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `new' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/lib/sup.rb:96:in `start' > /afs/cs.wisc.edu/u/a/d/adesmet/bin/opt/ruby_gem_home/gems/sup-0.4/bin/sup:113 > opt/ruby_gem_home/bin/sup:19:in `load' > opt/ruby_gem_home/bin/sup:19 You get very similar output with a contacts.txt file of: > alice: Alice > # Bob's a nice guy > bob: Bob -- Alan De Smet http://www.highprogrammer.com/alan From wmorgan-sup@masanjin.net Sat Feb 16 08:15:49 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 05:15:49 -0800 Subject: [sup-talk] fatal exception: invalid contacts.txt In-Reply-To: <20080214212201.GE7284@alpha.monkeycosm.net> References: <20080214212201.GE7284@alpha.monkeycosm.net> Message-ID: <1203167697-sup-973@south> Reformatted excerpts from Alan De Smet's message of 2008-02-14: > If the goals of contacts.txt include that humans are able to edit it, > blank lines and comments are helpful and it would be nice if they were > allowed. I agree completely. I'll work on a better parser for this. Patches welcome, of course! -- William From wmorgan-sup@masanjin.net Sat Feb 16 08:21:52 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 05:21:52 -0800 Subject: [sup-talk] Backspace key? In-Reply-To: <1202809606-sup-7188@port-ext6.ensta.fr> References: <1202774257.8173.4.camel@localhost.localdomain> <1202809606-sup-7188@port-ext6.ensta.fr> Message-ID: <1203168084-sup-5319@south> Reformatted excerpts from nicolas.pouillard's message of 2008-02-12: > I had the same issue, as a workaround hitting CTRL-BACKSPACE worked > for me. However I've made up an ugly change to handle this, perhaps > it can help you. Ugly? It's beautiful! And now in master and next. -- William From nicolas.pouillard@gmail.com Sat Feb 16 08:54:55 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sat, 16 Feb 2008 14:54:55 +0100 Subject: [sup-talk] Backspace key? In-Reply-To: <1203168084-sup-5319@south> References: <1202774257.8173.4.camel@localhost.localdomain> <1202809606-sup-7188@port-ext6.ensta.fr> <1203168084-sup-5319@south> Message-ID: <1203170060-sup-2662@ausone.local> Excerpts from William Morgan's message of Sat Feb 16 14:21:52 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-02-12: > > I had the same issue, as a workaround hitting CTRL-BACKSPACE worked > > for me. However I've made up an ugly change to handle this, perhaps > > it can help you. > > Ugly? It's beautiful! And now in master and next. Cool, thanks. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080216/3c286619/attachment.bin From wmorgan-sup@masanjin.net Sat Feb 16 09:27:49 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 06:27:49 -0800 Subject: [sup-talk] Crash on startup, "wrong id called on nil" In-Reply-To: <20080207172725.GA9157@gurski.org> References: <20080207172725.GA9157@gurski.org> Message-ID: <1203172019-sup-1133@south> Reformatted excerpts from Michael Gurski's message of 2008-02-07: > It's been a while since I launched sup, and updating today from > master, I get a crash on startup: > > --- RuntimeError from thread: load threads for thread-index-mode wrong > id called on nil Hm, this is a bit tricky. It looks like on of the thread invariants I maintain is actually a variant. Although it would be trivial to just guard against this error, it would be better to find out why it's happening. Would you mind applying the following patch (just save it to disk and run "git am" on it from your sup directory), which will emit some debugging output to send-me.txt when you run Sup and this error occurs. Then you can send me that file and maybe I can figure out what's going on. Thanks! -- William -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-add-debugging-code-to-discover-when-Thread-first-ret.patch Type: application/octet-stream Size: 1416 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080216/39492fd5/attachment.obj From wmorgan-sup@masanjin.net Sat Feb 16 14:13:47 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 11:13:47 -0800 Subject: [sup-talk] [PATCH] Changed all (but one) occurrences of redwood to sup. In-Reply-To: <1202839827-11975-1-git-send-email-johannes@antiklimax.com> References: <1202839827-11975-1-git-send-email-johannes@antiklimax.com> Message-ID: <1203188677-sup-4093@south> Hi Johannes, Reformatted excerpts from Johannes Martinsson's message of 2008-02-12: > * Changed all occurrences of redwood to sup, but left out the one in the > FAQ (What are all these "Red...). Thanks for this very thorough patch. I'm going to hold off on applying it until there's a good time with minimal changes (maybe when things have synced up on a release) so as to avoid unnecessary conflicts. -- William From wmorgan-sup@masanjin.net Sat Feb 16 14:20:07 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 11:20:07 -0800 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode. In-Reply-To: <12025587293812-git-send-email-nicolas.pouillard@gmail.com> References: <1201112451-sup-5510@south> <12025587293812-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1203189567-sup-6453@south> Reformatted excerpts from nicolas.pouillard's message of 2008-02-09: > This patch would help to think about finishing drafts. Merged into next. How do people like it? Thanks, Nicolas. -- William From wmorgan-sup@masanjin.net Sat Feb 16 15:04:32 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 12:04:32 -0800 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message Message-ID: <1203192249-sup-6640@south> [forgot to send to list] Reformatted excerpts from brabuhr's message of 2008-02-08: > I was also thinking that it would be better to display the discovered > URIs in a list instead of the prompting, but I wasn't sure how to > implement that. Another problem I see is that the extractor is > too-greedy and will pull in the punctuation following the URL; so, > perhaps the list should allow line editing before calling the view-url > hook? If you want to display them as a list, I would add a mode called UrlListMode or something like that which was a subclass of LineCursorMode. You can look to BufferListMode as an example, though it will be even simpler than that because the content won't ever change. Spawn an instance of that mode when the user presses 'L', and have enter in UrlListMode trigger the URL viewing hook, possibly first running it through BufferManager#ask for editing. We can also trim trailing punctuation from whatever URI.extract pulls out, since that sounds like the common case. -- William From wmorgan-sup@masanjin.net Sat Feb 16 15:06:32 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 12:06:32 -0800 Subject: [sup-talk] [PATCH] add URL extraction, listing, and viewing capabilities to ThreadViewMode In-Reply-To: <1203192249-sup-6640@south> References: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com> <1203192249-sup-6640@south> Message-ID: <1203192317-sup-4404@south> --- Here's a "starter patch". Still needs HookManager integration to actually view the URLs, and probably some touching up of the extraction to trim out punctuation and the like. I found that URI.extract is very general unless you restrict it to particular schemata, so this limits it to http and ftp only. Feel free to expand/tweak any of it. lib/sup.rb | 1 + lib/sup/modes/thread-view-mode.rb | 13 +++++++++++++ lib/sup/modes/url-list-mode.rb | 23 +++++++++++++++++++++++ 3 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 lib/sup/modes/url-list-mode.rb diff --git a/lib/sup.rb b/lib/sup.rb index cec36b6..3c591e6 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -276,6 +276,7 @@ require "sup/modes/buffer-list-mode" require "sup/modes/poll-mode" require "sup/modes/file-browser-mode" require "sup/modes/completion-mode" +require "sup/modes/url-list-mode" require "sup/sent" $:.each do |base| diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb index fb324c1..99b7908 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb @@ -48,6 +48,7 @@ EOS k.add :subscribe_to_list, "Subscribe to/unsubscribe from mailing list", "(" k.add :unsubscribe_from_list, "Subscribe to/unsubscribe from mailing list", ")" k.add :pipe_message, "Pipe message or attachment to a shell command", '|' + k.add :view_urls, "View URLs in message", 'L' k.add_multi "(a)rchive/(d)elete/mark as (s)pam/mark as u(N)read:", '.' do |kk| kk.add :archive_and_kill, "Archive this thread and kill buffer", 'a' @@ -118,6 +119,18 @@ EOS def lines; @text.length; end def [] i; @text[i]; end + def view_urls + m = @message_lines[curpos] or return + chunks = m.chunks.select { |c| c.is_a? Chunk::Text } + return if chunks.empty? + + lines = chunks.map { |c| c.lines }.flatten.join(" ") + urls = URI.extract(lines, %w(http ftp)).uniq.sort + return if urls.empty? + + BufferManager.spawn "URLs for #{m.subj}", UrlListMode.new(urls) + end + def show_header m = @message_lines[curpos] or return BufferManager.spawn_unless_exists("Full header for #{m.id}") do diff --git a/lib/sup/modes/url-list-mode.rb b/lib/sup/modes/url-list-mode.rb new file mode 100644 index 0000000..f51cd52 --- /dev/null +++ b/lib/sup/modes/url-list-mode.rb @@ -0,0 +1,23 @@ +module Redwood +class UrlListMode < LineCursorMode + register_keymap do |k| + k.add :view_url, "View selected URL", :enter + end + + def initialize urls + @urls = urls + @text = urls.map { |u| u.to_s } + super() + end + + def lines; @text.length end + def [] i; @text[i] end + + def view_url + url = BufferManager.ask :url, "URL: ", @urls[curpos].to_s + return unless url + BufferManager.flash "viewing #{url.inspect}" + end +end + +end -- 1.5.4.rc2.69.g10f0 -- William From wmorgan-sup@masanjin.net Sat Feb 16 15:09:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 16 Feb 2008 12:09:28 -0800 Subject: [sup-talk] the num_inbox_unread variable In-Reply-To: <1202508462-sup-2051@clarabella.clarabella> References: <1202508462-sup-2051@clarabella.clarabella> Message-ID: <1203192425-sup-1910@south> Reformatted excerpts from Giorgio Lando's message of 2008-02-08: > I have a small problem with the num_inbox_unread variable, which is > used for example in the status-bar-text.rb: in the number of unread > messages the messages belonging to killed threads are included, but, > from the name of the variable, I do not think that this is the > expected behaviour (they are unread, but they are not the inbox. Yes, this is a known bug. Killed threads need a little more work. -- William From daniel@wagner-home.com Sun Feb 17 17:44:34 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Sun, 17 Feb 2008 14:44:34 -0800 Subject: [sup-talk] header parsing Message-ID: <1203288077-sup-526@buckwheat> Hello, Can sup be a bit more lax on parsing email headers? In particular, it seems to discard any where the ':' is not immediately followed by a ' '. I'm not totally sure of the spec, but I couldn't find anything in that required a space after the colon. (Granted, I did do a very cursory look.) Thanks, ~d From marko.myllymaki@iki.fi Mon Feb 18 07:04:58 2008 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi) Date: Mon, 18 Feb 2008 14:04:58 +0200 Subject: [sup-talk] save somewhere else than temp? Message-ID: <1203336125-sup-4686@sieni> Is it possible to change where sup saves the messages under editing? Sup just crashed and I lost quite a long message editing in /tmp/ ;) I'd like the edited messages be saved to .sup/editing/* From wmorgan-sup@masanjin.net Mon Feb 18 09:33:55 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 18 Feb 2008 06:33:55 -0800 Subject: [sup-talk] header parsing In-Reply-To: <1203288077-sup-526@buckwheat> References: <1203288077-sup-526@buckwheat> Message-ID: <1203345204-sup-9115@south> Reformatted excerpts from Daniel Wagner's message of 2008-02-17: > Can sup be a bit more lax on parsing email headers? In particular, it > seems to discard any where the ':' is not immediately followed by a ' > '. I'm not totally sure of the spec, but I couldn't find anything in > that required a space > after the colon. (Granted, I did do a very cursory look.) Funny, I encountered this today too. I've merged in a change to next. -- William From wmorgan-sup@masanjin.net Mon Feb 18 09:34:42 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 18 Feb 2008 06:34:42 -0800 Subject: [sup-talk] save somewhere else than temp? In-Reply-To: <1203336125-sup-4686@sieni> References: <1203336125-sup-4686@sieni> Message-ID: <1203345244-sup-338@south> Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18: > Is it possible to change where sup saves the messages under editing? > Sup just crashed and I lost quite a long message editing in /tmp/ ;) > > I'd like the edited messages be saved to .sup/editing/* Just because it's in /tmp doesn't mean it's automatically deleted, does it? (Except maybe at system startup.) -- William From marko.myllymaki@iki.fi Mon Feb 18 10:57:24 2008 From: marko.myllymaki@iki.fi (marko.myllymaki at iki.fi) Date: Mon, 18 Feb 2008 17:57:24 +0200 Subject: [sup-talk] save somewhere else than temp? In-Reply-To: <1203345244-sup-338@south> References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south> Message-ID: <1203348513-sup-3168@sieni> Excerpts from William Morgan's message of Mon Feb 18 16:34:42 +0200 2008: > Just because it's in /tmp doesn't mean it's automatically deleted, does > it? (Except maybe at system startup.) Yes, it's weird. At what stage does Sup actually delete the edited messages (after sending I guess)? I was not able to see any edited messages in /tmp after the crashes. Sup crashed after exiting the emacs editor. No files in drafts or sent.mbox either... However I was able to see file 12554-0-sup.compose-mode when I intentionally killed Sup, trying to simulate the situation... Here is the exception log after one crash if it helps in any way: --- Interrupt from thread: main /var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in `select' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in `nonblocking_getch' /var/lib/gems/1.8/gems/sup-0.4/bin/sup:213 /usr/bin/sup:19:in `load' /usr/bin/sup:19 From nicolas.pouillard@gmail.com Mon Feb 18 17:47:45 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Mon, 18 Feb 2008 23:47:45 +0100 Subject: [sup-talk] save somewhere else than temp? In-Reply-To: <1203345244-sup-338@south> References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south> Message-ID: <1203374771-sup-6461@ausone.local> Excerpts from William Morgan's message of Mon Feb 18 15:34:42 +0100 2008: > Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18: > > Is it possible to change where sup saves the messages under editing? > > Sup just crashed and I lost quite a long message editing in /tmp/ ;) > > > > I'd like the edited messages be saved to .sup/editing/* > > Just because it's in /tmp doesn't mean it's automatically deleted, does > it? (Except maybe at system startup.) If you're using Tempfile then closing the file, delete it. And closing the process can force it to close it's files. I've locally workaround this problem by defining a custom script that keep a copy in ~/tmp as the sup editor. Regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080218/39a69292/attachment.bin From nicolas.pouillard@gmail.com Mon Feb 18 18:24:54 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 19 Feb 2008 00:24:54 +0100 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message In-Reply-To: <1203192249-sup-6640@south> References: <1203192249-sup-6640@south> Message-ID: <1203376951-sup-2550@ausone.local> Excerpts from William Morgan's message of Sat Feb 16 21:04:32 +0100 2008: > [forgot to send to list] > > Reformatted excerpts from brabuhr's message of 2008-02-08: > > I was also thinking that it would be better to display the discovered > > URIs in a list instead of the prompting, but I wasn't sure how to > > implement that. Another problem I see is that the extractor is > > too-greedy and will pull in the punctuation following the URL; so, > > perhaps the list should allow line editing before calling the view-url > > hook? > > If you want to display them as a list, I would add a mode called > UrlListMode or something like that which was a subclass of > LineCursorMode. You can look to BufferListMode as an example, though it > will be even simpler than that because the content won't ever change. > > Spawn an instance of that mode when the user presses 'L', and have > enter in UrlListMode trigger the URL viewing hook, possibly first > running it through BufferManager#ask for editing. We can also trim > trailing punctuation from whatever URI.extract pulls out, since that > sounds like the common case. You should look the rxvt-unicode terminal, there is an extension to deal with URLs [1]. That's pretty handy in fact and applies not only to sup. [1]: http://www.jukie.net/~bart/blog/20070503013555 Regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080219/cb877745/attachment.bin From daniel@wagner-home.com Mon Feb 18 22:12:15 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Mon, 18 Feb 2008 19:12:15 -0800 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message In-Reply-To: <1203376951-sup-2550@ausone.local> References: <1203192249-sup-6640@south> <1203376951-sup-2550@ausone.local> Message-ID: <1203390402-sup-7571@buckwheat> Excerpts from Nicolas Pouillard's message of Mon Feb 18 15:24:54 -0800 2008: > You should look the rxvt-unicode terminal, there is an extension to deal with > URLs [1]. That's pretty handy in fact and applies not only to sup. > > [1]: http://www.jukie.net/~bart/blog/20070503013555 Sounds nice, does it handle multi-line URLs gracefully? In particular, in sup a multi-line URL could have a line-break in it... care to report how it handles this? http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-no-newline-in-the-actual-message-as-sent http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-woul d-be-so-kind-that-contains-a-newline-in-the-eightieth-column Either way, thanks for the tip! ~d From daniel@wagner-home.com Mon Feb 18 23:01:49 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Mon, 18 Feb 2008 20:01:49 -0800 Subject: [sup-talk] mime-view Message-ID: <1203393696-sup-1607@buckwheat> Hello, Recently, activating attachments has stopped working. (I can't be more specific about when this started; it could have been at the upgrade to 0.4, or weeks after, I'm not sure.) I get a message like "Couldn't view the attachment, opening as text", which obviously doesn't work well for a large variety of attachments. I verified that sup is detecting the correct mime-type, and that saving the file to disk and manually running "see" did the Right Thing. I also tried adding a hook; the contents of my ~/.sup/hooks/mime-view.rb: system "xmessage -default okay In the hook." system "see #{content_type}:#{filename}" return true The xmessage window appears. Still, this is pieced together from the examples on the wiki and the comments in message-chunks.rb; I have no real knowledge of Ruby. Please let me know if I've written nonsense. In any case, still no luck. Any clues on what I should do? Thanks. ~d From guillaume.quintard@gmail.com Tue Feb 19 01:25:00 2008 From: guillaume.quintard@gmail.com (Guillaume Quintard) Date: Mon, 18 Feb 2008 22:25:00 -0800 Subject: [sup-talk] Can't sup sync Message-ID: <1e5fdab70802182225n12a3c127l782cb1a034b1629c@mail.gmail.com> Hi, I just got a new ubuntu installed and I cant get sup running on it :-( Both next and master give me that : shivan at altis:~/sup$ ruby -Ilib bin/sup-sync --all-sources [Mon Feb 18 22:20:06 -0800 2008] using character set encoding "UTF-8" [Mon Feb 18 22:20:07 -0800 2008] crypto: detected gpg binary in /usr/bin/gpg [Mon Feb 18 22:20:07 -0800 2008] locking /home/shivan/.sup/lock... [Mon Feb 18 22:20:07 -0800 2008] loading index... [Mon Feb 18 22:20:07 -0800 2008] loaded index of 2924 messages Scanning sup://drafts... Scanned 0, added 0, updated 0 messages from sup://drafts. Scanning mbox:/home/shivan/.gmail.mbox... [Mon Feb 18 22:20:18 -0800 2008] unlocking /home/shivan/.sup/lock... /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in `[]=': can't modify frozen string (TypeError) from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in `read_chunk_low' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:94:in `loop' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:94:in `read_chunk_low' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:76:in `read_chunk' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/pushbackreader.rb:85:in `read' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:285:in `parse_singlepart_body' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:198:in `parse_low' from /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser.rb:275:in `parse_multipart_body' ... 25 levels... from ./lib/sup/util.rb:497:in `method_missing' from bin/sup-sync:136 from bin/sup-sync:131:in `each' from bin/sup-sync:131 any idea ? -- Guillaume From nicolas.pouillard@gmail.com Tue Feb 19 05:17:25 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 19 Feb 2008 11:17:25 +0100 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message In-Reply-To: <1203390402-sup-7571@buckwheat> References: <1203192249-sup-6640@south> <1203376951-sup-2550@ausone.local> <1203390402-sup-7571@buckwheat> Message-ID: <1203416134-sup-2417@port-ext6.ensta.fr> Excerpts from Daniel Wagner's message of Tue Feb 19 04:12:15 +0100 2008: > Excerpts from Nicolas Pouillard's message of Mon Feb 18 15:24:54 -0800 2008: > > You should look the rxvt-unicode terminal, there is an extension to deal with > > URLs [1]. That's pretty handy in fact and applies not only to sup. > > > > [1]: http://www.jukie.net/~bart/blog/20070503013555 > > Sounds nice, does it handle multi-line URLs gracefully? In particular, > in sup a multi-line URL could have a line-break in it... care to report > how it handles this? > > http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-no-newline-in-the-actual-message-as-sent > http://www.yahoo.com/?this-is-a-really-long-url-for-you-to-test-with-if-you-would-be-so-kind-that-contains-a-newline-in-the-eightieth-column It doesn't handle br0ken URLs, however here that's perhaps sup jobs to fix them. I send a patch to the list to fix this. Regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 240 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080219/61653c81/attachment-0001.bin From nicolas.pouillard@gmail.com Tue Feb 19 05:17:50 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 19 Feb 2008 11:17:50 +0100 Subject: [sup-talk] [PATCH] Unwrap br0ken URLs. Message-ID: <12034162702820-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/message-chunks.rb | 2 +- lib/sup/util.rb | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 0606395..98b829c 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -147,7 +147,7 @@ EOS attr_reader :lines def initialize lines - @lines = lines.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap + @lines = lines.unwrap_urls.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap ## trim off all empty lines except one @lines.pop while @lines.length > 1 && @lines[-1] =~ /^\s*$/ && @lines[-2] =~ /^\s*$/ diff --git a/lib/sup/util.rb b/lib/sup/util.rb index ceaf0b8..99e73b4 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -401,6 +401,31 @@ class Array def last= e; self[-1] = e end def nonempty?; !empty? end + + URL_CHAR = /[a-zA-Z0-9\-@;\/?:&=%$_.+!*\x27()~,#]/ + URL_CHAR_LESS = /[a-zA-Z0-9\-@;\/?:&=%$_.+!*\x27()~]/ + URL_RE = %r{(?:https?://|ftp://|news://|mailto:|file://)#{URL_CHAR}+} + TRAILING_URL_RE = /#{URL_RE}$/ + LEADING_URL_RE = /^#{URL_RE}/ + URL_PART_RE = /^#{URL_CHAR}+#{URL_CHAR_LESS}/ + + def unwrap_urls + res = [] + len = size + i = 0 + while i < len do + x = self[i] + y = self[i+1] + if y && x =~ TRAILING_URL_RE && y =~ URL_PART_RE && y !~ LEADING_URL_RE + res << x.chomp + y + i += 2 + else + res << x + i += 1 + end + end + res + end end class Time -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Tue Feb 19 05:17:59 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 19 Feb 2008 11:17:59 +0100 Subject: [sup-talk] [PATCH] Add a startup hook. Message-ID: <12034162793917-git-send-email-nicolas.pouillard@gmail.com> --- bin/sup | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/bin/sup b/bin/sup index 0a35fd7..0d34215 100644 --- a/bin/sup +++ b/bin/sup @@ -39,6 +39,12 @@ EOS opt :compose, "Compose message to this recipient upon startup", :type => String end +Redwood::HookManager.register "startup", < References: <1e5fdab70802182225n12a3c127l782cb1a034b1629c@mail.gmail.com> Message-ID: <1203441291-sup-8508@south> Reformatted excerpts from Guillaume Quintard's message of 2008-02-18: > /var/lib/gems/1.8/gems/rmail-1.0.0/lib/rmail/parser/multipart.rb:159:in > `[]=': can't modify frozen string (TypeError) RubyMail problem. Solution in the FAQ's. -- William From wmorgan-sup@masanjin.net Tue Feb 19 12:32:57 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 09:32:57 -0800 Subject: [sup-talk] mime-view In-Reply-To: <1203393696-sup-1607@buckwheat> References: <1203393696-sup-1607@buckwheat> Message-ID: <1203442283-sup-4449@south> Reformatted excerpts from Daniel Wagner's message of 2008-02-18: > Recently, activating attachments has stopped working. You know, in reexamining this code, I think there is a silly bug here, and I think it also caused the weirdness that John Bent was experiencing a few weeks ago. Can you try the latest (master/next) from git, or apply the following patch: diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 0606395..ba8b846 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -126,7 +126,7 @@ EOS path = write_to_disk ret = HookManager.run "mime-view", :content_type => @content_type, :filename => path - view_default! path unless ret + ret || view_default!(path) end def write_to_disk > system "xmessage -default okay In the hook." > system "see #{content_type}:#{filename}" > return true This looks fine, though I would change the last line to just $?.success? which will evaluate to true iff the see command was successful. With the above change, everything should Just Work (tm). -- William From wmorgan-sup@masanjin.net Tue Feb 19 12:38:11 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 09:38:11 -0800 Subject: [sup-talk] save somewhere else than temp? In-Reply-To: <1203374771-sup-6461@ausone.local> References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south> <1203374771-sup-6461@ausone.local> Message-ID: <1203442604-sup-2120@south> Reformatted excerpts from nicolas.pouillard's message of 2008-02-18: > If you're using Tempfile then closing the file, delete it. And > closing the process can force it to close it's files. I am using Tempfile, which has a non-deterministic behavior (at least, I can't figure out a pattern) upon crashing: sometimes it deletes the files, sometimes it leaves them. I guess the answer is to manage my own temporary files, deleting them only upon successful shutdown. -- William From wmorgan-sup@masanjin.net Tue Feb 19 12:48:36 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 09:48:36 -0800 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1202462044-sup-3129@chris-tablet> References: <1202026272-3432-2-git-send-email-chrisw@rice.edu> <1202232814-sup-1005@south> <1202239755-sup-3523@chris-tablet> <1202241831-sup-1777@south> <1202462044-sup-3129@chris-tablet> Message-ID: <1203443085-sup-4054@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-08: > It is an odd interplay between Cygwin and Windows. [snip lots] Thanks for that very detailed explanation. > So, I'm stuck in Cygwin bizzaro-land. I think most Windows Sup users are in the same situtation, so I would like to make this work. The only thing that makes me uncomfortable about the patch now is the 2048 thing. But if that is, in fact, the documented maximum number of fds ever opened by a Windows process, then heck, let's go for it. I'm going to move this code into a separate module that's only called when run under Cygwin, then commit. -- William From johnbent@lanl.gov Tue Feb 19 12:54:10 2008 From: johnbent@lanl.gov (John Bent) Date: Tue, 19 Feb 2008 10:54:10 -0700 Subject: [sup-talk] mime-view In-Reply-To: <1203442283-sup-4449@south> References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south> Message-ID: <1203443552-sup-3358@tangerine.lanl.gov> Excerpts from William Morgan's message of Tue Feb 19 10:32:57 -0700 2008: > Reformatted excerpts from Daniel Wagner's message of 2008-02-18: > > Recently, activating attachments has stopped working. > > You know, in reexamining this code, I think there is a silly bug here, > and I think it also caused the weirdness that John Bent was experiencing > a few weeks ago. > That's a relief. I thought I was the cause of the weirdness. This works great; thanks. Now my hooks/mime-view.rb (for a mac) is: ########################### system "open '#{filename}'" ########################### Thanks all! John From wmorgan-sup@masanjin.net Tue Feb 19 12:55:11 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 09:55:11 -0800 Subject: [sup-talk] OR query does not yield any result In-Reply-To: <47A169A5.30801@gslab.com> References: <47A169A5.30801@gslab.com> Message-ID: <1203443545-sup-3261@south> Hi Manish, Sorry for the delay in replying. Reformatted excerpts from Manish Sapariya's message of 2008-01-30: > when I press F and give query as "manish OR nobodypqr" it does not > yield any result. However I do get results when I query the index > using devel./console.sh. The behavior should be the same, except that querying through Sup automatically removes results from spam, deleted and killed messages. Could that explain the difference? If not, I need a few more details. What version of Sup? Can you give an dump of the console.sh session, so I can see exactly what you're doing? Finally, in Sup, when you execute the query, there should be two corresponding lines in the log: one starting with "normalized" and one starting with "got XXX results". Can you paste those in to the email as well? Thanks, -- William From wmorgan-sup@masanjin.net Tue Feb 19 12:56:43 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 09:56:43 -0800 Subject: [sup-talk] mime-view In-Reply-To: <1203443552-sup-3358@tangerine.lanl.gov> References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south> <1203443552-sup-3358@tangerine.lanl.gov> Message-ID: <1203443752-sup-5424@south> Reformatted excerpts from John Bent's message of 2008-02-19: > That's a relief. I thought I was the cause of the weirdness. This > works great; thanks. Good to hear. Stupidest bug evar. Don't know how I missed it before. -- William From wmorgan-sup@masanjin.net Tue Feb 19 13:23:56 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 10:23:56 -0800 Subject: [sup-talk] mime-view In-Reply-To: <1203442283-sup-4449@south> References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south> Message-ID: <1203445365-sup-9276@south> Reformatted excerpts from William Morgan's message of 2008-02-19: > Reformatted excerpts from Daniel Wagner's message of 2008-02-18: > > system "xmessage -default okay In the hook." > > system "see #{content_type}:#{filename}" > > return true > > This looks fine, though I would change the last line to just > $?.success? Never mind that. Remove the last (and first!) line completely. Kernel#system returns true iff the command is successful. -- William From wmorgan-sup@masanjin.net Tue Feb 19 21:55:12 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 19 Feb 2008 18:55:12 -0800 Subject: [sup-talk] [PATCH] Add a startup hook. In-Reply-To: <12034162793917-git-send-email-nicolas.pouillard@gmail.com> References: <12034162793917-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1203476102-sup-6559@south> Merged into next. Thanks! -- William From daniel@wagner-home.com Wed Feb 20 01:59:16 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Tue, 19 Feb 2008 22:59:16 -0800 Subject: [sup-talk] mime-view In-Reply-To: <1203442283-sup-4449@south> References: <1203393696-sup-1607@buckwheat> <1203442283-sup-4449@south> Message-ID: <1203490669-sup-3520@buckwheat> Excerpts from William Morgan's message of Tue Feb 19 09:32:57 -0800 2008: > Reformatted excerpts from Daniel Wagner's message of 2008-02-18: > > Recently, activating attachments has stopped working. > > You know, in reexamining this code, I think there is a silly bug here, > and I think it also caused the weirdness that John Bent was experiencing > a few weeks ago. > > Can you try the latest (master/next) from git, or apply the following > patch: Applied it (by hand), still no joy. BUT! On a little more digging, it looks like the #{} syntax wasn't properly escaping spaces in the filename. A few \" later, I'm back in business. system "see #{content_type}:\"#{filename}\"" Thanks, ~d From manish@gslab.com Wed Feb 20 04:02:39 2008 From: manish@gslab.com (Manish Sapariya) Date: Wed, 20 Feb 2008 14:32:39 +0530 Subject: [sup-talk] OR query does not yield any result In-Reply-To: <1203443545-sup-3261@south> References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south> Message-ID: <1203497807-sup-2137@alioth.gs-lab.com> Hi William, Here are the snippets from log and output of devel/console.sh query. =======log sniipet === normalized "manish OR nobodyxyzpqrkljasdf" to "body:manish body:nobodyxyzpqrkljasdf" got 0 results for query (offset 0) +(+body:manish +body:nobodyxyzpqrkljasdf) -label:spam -label:delete normalized "manish or nobodyxyzpqrdalkjdfad" to "+body:manish +body:or +body:nobodyxyzpqrdalkjdfad" got 0 results for query (offset 0) +(+body:manish +body:or +body:nobodyxyzpqrdalkjdfad) -label:spam -label:delete ===================== I was expecting all mails having manish in it to show up, but none were reported. =======console snippet ========= [manish at alioth sup]$ sh ./devel/console.sh [Wed Feb 20 14:25:28 +0530 2008] using character set encoding "UTF-8" [Wed Feb 20 14:25:28 +0530 2008] crypto: detected gpg binary in /usr/bin/gpg [Wed Feb 20 14:25:28 +0530 2008] loading index... [Wed Feb 20 14:25:28 +0530 2008] loaded index of 18324 messages irb(main):001:0> Index.index.search_each("manish OR nobodyxyzpqrkljasdf") { |id, score| m = Index.build_message(id); puts "[#{id}] [#{m.from}] [#{m.subj}]" } [25951] [Manish Sapariya ] [manish here] [25985] [Manish Sapariya ] [Manish here] =============================== Just FYI, as you can see in log snippet 'or' and 'OR' are treated differently. Hope this helps. Regards, Manish Excerpts from William Morgan's message of Tue Feb 19 23:25:11 +0530 2008: > Hi Manish, > > Sorry for the delay in replying. > > Reformatted excerpts from Manish Sapariya's message of 2008-01-30: > > when I press F and give query as "manish OR nobodypqr" it does not > > yield any result. However I do get results when I query the index > > using devel./console.sh. > > The behavior should be the same, except that querying through Sup > automatically removes results from spam, deleted and killed messages. > Could that explain the difference? > > If not, I need a few more details. What version of Sup? Can you give an > dump of the console.sh session, so I can see exactly what you're doing? > Finally, in Sup, when you execute the query, there should be two > corresponding lines in the log: one starting with "normalized" and one > starting with "got XXX results". Can you paste those in to the email as > well? > > Thanks, > -- From manish@gslab.com Wed Feb 20 04:18:48 2008 From: manish@gslab.com (Manish Sapariya) Date: Wed, 20 Feb 2008 14:48:48 +0530 Subject: [sup-talk] OR query does not yield any result In-Reply-To: <1203443545-sup-3261@south> References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south> Message-ID: <1203499107-sup-9894@alioth.gs-lab.com> Version is sup 0.4 -Manish Excerpts from William Morgan's message of Tue Feb 19 23:25:11 +0530 2008: > Hi Manish, > > Sorry for the delay in replying. > > Reformatted excerpts from Manish Sapariya's message of 2008-01-30: > > when I press F and give query as "manish OR nobodypqr" it does not > > yield any result. However I do get results when I query the index > > using devel./console.sh. > > The behavior should be the same, except that querying through Sup > automatically removes results from spam, deleted and killed messages. > Could that explain the difference? > > If not, I need a few more details. What version of Sup? Can you give an > dump of the console.sh session, so I can see exactly what you're doing? > Finally, in Sup, when you execute the query, there should be two > corresponding lines in the log: one starting with "normalized" and one > starting with "got XXX results". Can you paste those in to the email as > well? > > Thanks, > -- From nicolas.pouillard@gmail.com Wed Feb 20 05:54:20 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 20 Feb 2008 11:54:20 +0100 Subject: [sup-talk] save somewhere else than temp? In-Reply-To: <1203442604-sup-2120@south> References: <1203336125-sup-4686@sieni> <1203345244-sup-338@south> <1203374771-sup-6461@ausone.local> <1203442604-sup-2120@south> Message-ID: <1203504717-sup-2964@port-ext6.ensta.fr> Excerpts from William Morgan's message of Tue Feb 19 18:38:11 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-02-18: > > If you're using Tempfile then closing the file, delete it. And > > closing the process can force it to close it's files. > > I am using Tempfile, which has a non-deterministic behavior (at least, I > can't figure out a pattern) upon crashing: sometimes it deletes the > files, sometimes it leaves them. > > I guess the answer is to manage my own temporary files, deleting them > only upon successful shutdown. Long time ago (when I did more ruby stuffs), I wrote this module (attached) that makes part of a package called core_ex. I found it far more useful than the default module. Feel free to import it. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: temp_path.rb Type: application/octet-stream Size: 5318 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.bin From dunghopper@gmail.com Wed Feb 20 23:43:55 2008 From: dunghopper@gmail.com (Daniel Hilton) Date: Wed, 20 Feb 2008 21:43:55 -0700 Subject: [sup-talk] nonblocking_getch Message-ID: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com> First of all, kudos to all who have contributed to sup (especially William!). Its the bees knees. One issue: At least on my slow computer, the time it takes to dispatch even a simple action (like cursor_down) is a bit longer than my keyboard's repeat interval. So, when I hold down 'j' to scroll through several messages, it continues to scroll for a few seconds after I release the key, causing me to overshoot my target every time. I've got a solution that works on my system, adding 'Ncurses.stdscr.nodelay1' to start_cursing, and modifying nonblocking_getch as follows: def nonblocking_getch if IO.select([$stdin], nil, nil, 1) repeat = c = Ncurses.getch repeat = Ncurses.getch until repeat != c c else nil end end This effectively discards the extra keystrokes that accumulate while the action is taking place, and makes the UI seem more responsive (even though it isn't actually any faster). As a side note: having added nodelay, there doesn't seem to be any real reason we would need to keep the IO.select... but in my brief experimentation I found various unpleasant side-effects when I tried to remove it. I guess it doesn't hurt anything to leave it in. There may also be side-effects that I haven't noticed from using nodelay, but everything seems to work as it should. Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/sup-talk/attachments/20080220/0c1c9318/attachment.html From vasudeva@linkswarm.com Thu Feb 21 19:17:11 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Thu, 21 Feb 2008 19:17:11 -0500 Subject: [sup-talk] sup-sync-back reports: Nothing to do Message-ID: <1203639414-sup-3734@lenin> I seem to be unable to run sup-sync-back to apply my sup-world changes back to my mbox file... ** ruby -I /home/vasudeva/sup/lib -w /home/vasudeva/sup/bin/sup-sync-back mbox:///home/vasudeva/muttmail/inbox /home/vasudeva/sup/lib/sup/util.rb:8: warning: method redefined; discarding old gen_lock_id /home/vasudeva/sup/lib/sup/util.rb:19: warning: method redefined; discarding old dump_lock_id [Thu Feb 21 17:34:46 -0500 2008] using character set encoding "UTF-8" /home/vasudeva/sup/lib/sup/message-chunks.rb:36: warning: method redefined; discarding old make_tmpname /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:13: warning: useless use of > in void context /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:19: warning: useless use of > in void context /var/lib/gems/1.8/gems/chronic-0.2.3/lib/chronic/repeaters/repeater_month_name.rb:25: warning: useless use of < in void context Nothing to do. ** There are definitely changes that need to be applied; enough that I think there may be some kind of index desynching going on. I'm not terribly worried about it, since it'll take 10 minutes to re-do those changes manually to my mbox, but I thought it was kind of an interesting oddity, and might shed some light on something worthwhile if anyone's bored. I've tried against the newest master and next; same deal. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From luis@tieguy.org Fri Feb 22 10:46:55 2008 From: luis@tieguy.org (Luis Villa) Date: Fri, 22 Feb 2008 10:46:55 -0500 Subject: [sup-talk] Amazon.com messages can't be added to index Message-ID: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> >From a long ago thread: http://rubyforge.org/pipermail/sup-talk/2007-October/000326.html It looks like I've found a similar problem. In importing my mail (with 0.4, haven't tried next yet) I get: /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError) Is this still a tokenization problem, or...? Any additional debugging information I can grab to help debug? Thanks- Luis From luis@tieguy.org Fri Feb 22 11:25:01 2008 From: luis@tieguy.org (Luis Villa) Date: Fri, 22 Feb 2008 11:25:01 -0500 Subject: [sup-talk] Amazon.com messages can't be added to index In-Reply-To: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> Message-ID: <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com> >From a long ago thread: http://rubyforge.org/pipermail/sup-talk/2007-October/000326.html It looks like I've found a similar problem. In importing my mail (with 0.4, haven't tried next yet) I get: /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError) Is this still a tokenization problem, or...? Any additional debugging information I can grab to help debug? Thanks- Luis From guillaume.quintard@gmail.com Sat Feb 23 16:34:30 2008 From: guillaume.quintard@gmail.com (Guillaume Quintard) Date: Sat, 23 Feb 2008 13:34:30 -0800 Subject: [sup-talk] filter question Message-ID: <1203801642-sup-8748@altis> w00t, I finally switched to sup (and this is my first mail to the list using it). I still have a little problem about filters though. they don't seem to do anything. I have this in my before-add-message.rb : message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/ but, when I send mail to myself, it doesn't label the mail. I know that it reads the hook (tried some say + sleep calls), but for a reason I don't understand it does nothing. and yes, this time, I read the FAQ before ;-) -- Guillaume From wmorgan-sup@masanjin.net Sun Feb 24 12:15:32 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 24 Feb 2008 09:15:32 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes Message-ID: <1203871982-sup-7942@south> I've just merged in a changeset that makes Sup store message body content in the Ferret index. (They've always been indexed, but now they're stored as well.) This means that changing the labels on a message can be a copy operation of the previous Ferret document, rather than requiring downloading and parsing the original message to create a new Ferret document. So, this should have two effects: 1. The Ferret index size will expand by about 50%. Sorry. 2. Tweaking message labels should be much, much faster, since the message no longer has to be downloaded from the source in order to change the labels. If you've ever tried to label a large IMAP thread, you no longer have to wait 5 minutes just to save. :) The index size increase is unfortunate, but it's something that has to happen anyways if we want search-results-mode to have matching text in the snippets, which is in the future TODO. The change was made in such a way that it's incrementally applied whenever a message is saved or changed in the Ferret index. So, if you want the above behavior on all messages immediately, you must do sup-sync --all on a source (which will require downloading each message). Otherwise, you will get the slow behavior (message body needs to be downloaded from the source) the first time you save a message after merging this change, and the fast behavior (no downloading required) on all subsequent times. I'm planning on committing another change in the near future that will also require a sup-sync --all, so you might want to hold out for that if you have a lot of messages. (I'm planning to have message state be duplicated outside the Ferret index, so that Ferret index corruption is a nuisance rather than a nightmare.) There's also a potential next step here where no interaction with external sources is *ever* required except at poll time, which would mean IMAP would become actually useable. (The other option being just figure out why the Ruby IMAP library is so incredibly slow.) -- William From wmorgan-sup@masanjin.net Sun Feb 24 17:58:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 24 Feb 2008 14:58:00 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203801642-sup-8748@altis> References: <1203801642-sup-8748@altis> Message-ID: <1203893761-sup-560@south> Reformatted excerpts from Guillaume Quintard's message of 2008-02-23: > I still have a little problem about filters though. they don't seem to > do anything. I have this in my before-add-message.rb : > > message.add_label "sent" if message.from =~ /guillaume.quintard at gmail.com/ > > but, when I send mail to myself, it doesn't label the mail. Yep, there was a bug where the before-add-message hook wasn't being called on sent messages. I've fixed this in git next. Update and try now. But you shouldn't have to write that hook, because the sent label is applied to all sent messages anyways! (Also, you'd need to use message.from.email because message.from is a Person object). -- William From guillaume.quintard@enst-bretagne.fr Sun Feb 24 19:12:03 2008 From: guillaume.quintard@enst-bretagne.fr (Guillaume Quintard) Date: Sun, 24 Feb 2008 16:12:03 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203893761-sup-560@south> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> Message-ID: <1203898237-sup-1505@altis> Excerpts from William Morgan's message of Sun Feb 24 14:58:00 -0800 2008: > But you shouldn't have to write that hook, because the sent label is > applied to all sent messages anyways! > actually, the idea was to label mail sent by me from gmail. > (Also, you'd need to use message.from.email because message.from is a > Person object). message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/ doesn't seem to do a thing either :-( -- Guillaume From wmorgan-sup@masanjin.net Mon Feb 25 00:10:57 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 24 Feb 2008 21:10:57 -0800 Subject: [sup-talk] Amazon.com messages can't be added to index In-Reply-To: <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com> References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com> Message-ID: <1203915874-sup-5504@south> Reformatted excerpts from Luis Villa's message of 2008-02-22: > /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError) Sigh. Why would anyone generate a message id like that? There were two problems causing your error. I've fixed them both in git next. You can probably apply the attached patches to your 0.4 release if you don't want to use git just yet. The first problem was that marking the message_id field as non-tokenized in Ferret just solves all sorts of tokenization problems. So that's in. The second problem is a Ferret bug, where apparently TermQuery values of more than 255 characters never match anything. The current workaround just lops off anything after the 255th character. And that may very well screw things up if falsely uniquefies things. The right long-term answer is probably to take the hex SHA1 of every message id and just use that instead of the original value. Then all of these issues will be solved. That will require an index rebuild for everyone, so I'm going to hold off on that for now. -- William -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-don-t-tokenize-message_id-field-in-index.patch Type: application/octet-stream Size: 945 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080224/94955be9/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-only-use-the-first-255-characters-of-a-message-id-f.patch Type: application/octet-stream Size: 1046 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080224/94955be9/attachment-0001.obj From wmorgan-sup@masanjin.net Mon Feb 25 00:13:11 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 24 Feb 2008 21:13:11 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203898237-sup-1505@altis> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> <1203898237-sup-1505@altis> Message-ID: <1203916279-sup-3593@south> Reformatted excerpts from guillaume.quintard's message of 2008-02-24: > message.add_label "test" if message.from.email =~ /guillaume.quintard at gmail.com/ > doesn't seem to do a thing either :-( That should work. What if you add some logging information, like: log "called" log "email is #{message.from.email.inspect}" match = message.from.email =~ /guillaume\.quintard at gmail\.com/ log "match is #{match.inspect}" message.add_label :test if match log "message labels now #{message.labels.inspect}" -- William From marcus-sup@bar-coded.net Mon Feb 25 08:01:44 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 25 Feb 2008 13:01:44 +0000 Subject: [sup-talk] [BUG] Normalised searches break bracketed multi-term searches Message-ID: <1203944320-sup-3692@tomsk> Hi - Lookes like the search normalisation has broken things like date searches like "before:(2 days ago)" because they get broken up into something like "before:2 before:days before:ago". Only picked it up because my hasattachment/filetype searching code (coming soon to a patch near you!) relies on it. Should bracketed stuff still work? Marcus From kingshivan@gmail.com Mon Feb 25 01:28:30 2008 From: kingshivan@gmail.com (shivan) Date: Sun, 24 Feb 2008 22:28:30 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203916279-sup-3593@south> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> <1203898237-sup-1505@altis> <1203916279-sup-3593@south> Message-ID: <1203920420-sup-2769@altis> ok, I got it, this line was causing problem : message.add_label "server" if message.from.email =~ /@server.com/ replacing @ with \@ did the trick thanks ! PS : in fact, I'd have another questio : is there an way to switch the "from" field, like it is done in gmail ? I entered two additionnal email addresses with sup-config but found no option to use them. anyway, kudos to you people, sup is really great ! -- Guillaume From wmorgan-sup@masanjin.net Mon Feb 25 12:02:19 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:02:19 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203920420-sup-2769@altis> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> <1203898237-sup-1505@altis> <1203916279-sup-3593@south> <1203920420-sup-2769@altis> Message-ID: <1203958719-sup-6567@south> Reformatted excerpts from kingshivan's message of 2008-02-24: > ok, I got it, this line was causing problem : > message.add_label "server" if message.from.email =~ /@server.com/ > > replacing @ with \@ did the trick Weird. That shouldn't make a difference. @ doesn't require escaping in regexes. E.g.: $ irb irb(main):001:0> "bob at server.com" =~ /@server.com/ => 3 irb(main):002:0> "bob at server.com" =~ /\@server.com/ => 3 Well, if it works, it works. > PS : in fact, I'd have another questio : is there an way to switch the > "from" field, like it is done in gmail ? I entered two additionnal > email addresses with sup-config but found no option to use them. There's no way in the GUI, at least currently. I would like to have a way, but I'm not sure what the interface would look like. You have two options: you can overwrite the From: line in the editor when you compose an email, or you can use the before-edit hook to programmatically set the From address based on the to address, etc. -- William From chrisw@rice.edu Mon Feb 25 12:08:22 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Mon, 25 Feb 2008 11:08:22 -0600 Subject: [sup-talk] Amazon.com messages can't be added to index In-Reply-To: <1203915874-sup-5504@south> References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com> <1203915874-sup-5504@south> Message-ID: <541961788.20080225110822@rice.edu> William Morgan @ 2008-2-24 11:10:57 PM "[sup-talk] Amazon.com messages can't be added to index" >> /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:200:in `sync_message': just added message "!~!UENERkVCMDkAAQACAPYAAAAAAAAAOKG7EAXlEBqhuwgAKypWwgAAbXNwc3QuZGxsAAAAAABOSVRB+b+4AQCqADfZbgAAAABDADoAXABEAG8AYwB1AG0AZQBuAHQAcwAgAGEAbgBkACAAUwBlAHQAdABpAG4AZwBzAFwAawBiAGUAbgB0AG8AbgBcAEwAbwBjAGEAbAAgAFMAZQB0AHQAaQBuAGcAcwBcAEEAcABwAGwAaQBjAGEAdABpAG8AbgAgAEQAYQB0AGEAXABNAGkAYwByAG8AcwBvAGYAdABcAE8AdQB0AGwAbwBvAGsAXABPAHUAdABsAG8AbwBrAC4AcABzAHQAAAAYAAAAAAAAALLH/vR9UMVCgMck3LV+0wHCgAAAGAAAAAAAAACyx/70fVDFQoDHJNy1ftMBhLcgAAAAAAAQAAAAqTDfdQ6dIEawbQUxhNxqVz4AAABSRTogQnVnemlsbGE6IEhhcyBhbnlvbmUgc3VjY2Vzc2Z1bGx5IGNyZWF0ZWQgU3ViLUNvbXBvbmVudHM/AA==@amd.com" but couldn't find it in a search (RuntimeError) > Sigh. Why would anyone generate a message id like that? I've seen some Netscape.com (webmail, I assume) messages with ids like that. In fact, I just got one today: Message-ID: -- Christopher Warrington "Be careful of reading health books: you might die of a misprint." -Mark Twain -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 183 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080225/fa4b01ba/attachment.bin From wmorgan-sup@masanjin.net Mon Feb 25 12:09:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:09:00 -0800 Subject: [sup-talk] [BUG] Normalised searches break bracketed multi-term searches In-Reply-To: <1203944320-sup-3692@tomsk> References: <1203944320-sup-3692@tomsk> Message-ID: <1203959274-sup-9031@south> Reformatted excerpts from Marcus Williams's message of 2008-02-25: > Lookes like the search normalisation has broken things like date > searches like "before:(2 days ago)" because they get broken up into > something like "before:2 before:days before:ago". Yep, normalization was completely b0rked. It was also screwing up simple OR queries (Manish's bug). The benefit was very limited, so I've removed this in next. -- William From wmorgan-sup@masanjin.net Mon Feb 25 12:13:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:13:35 -0800 Subject: [sup-talk] Amazon.com messages can't be added to index In-Reply-To: <541961788.20080225110822@rice.edu> References: <2cb10c440802220746w53904b96n18ed9511efc664de@mail.gmail.com> <2cb10c440802220825l1f22fd07s926db4d1e17b4f81@mail.gmail.com> <1203915874-sup-5504@south> <541961788.20080225110822@rice.edu> Message-ID: <1203959567-sup-8488@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-25: > I've seen some Netscape.com (webmail, I assume) messages with ids > like that. In fact, I just got one today: > > Message-ID: > Hey, at least that one's under 255 characters. :) Does seem to be the same software, though. !~! my ass. -- William From wmorgan-sup@masanjin.net Mon Feb 25 12:17:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:17:28 -0800 Subject: [sup-talk] sup-sync-back reports: Nothing to do In-Reply-To: <1203639414-sup-3734@lenin> References: <1203639414-sup-3734@lenin> Message-ID: <1203959676-sup-1952@south> Reformatted excerpts from vasudeva's message of 2008-02-21: > Nothing to do. I've improved this message in git. You need to specify least one of --drop-deleted, --move-deleted, --drop-spam, or --move-spam. -- William From wmorgan-sup@masanjin.net Mon Feb 25 12:38:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:38:28 -0800 Subject: [sup-talk] nonblocking_getch In-Reply-To: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com> References: <3902af2f0802202043r3c8a98ablabf458d0a99937b3@mail.gmail.com> Message-ID: <1203959878-sup-6905@south> Reformatted excerpts from Daniel Hilton's message of 2008-02-20: > I've got a solution that works on my system, adding > 'Ncurses.stdscr.nodelay1' to start_cursing, and modifying > nonblocking_getch as follows: > > def nonblocking_getch > if IO.select([$stdin], nil, nil, 1) > repeat = c = Ncurses.getch > repeat = Ncurses.getch until repeat != c > c > else > nil > end > end Thanks, I'm going to play around with this. If you feel like learning git-format-patch (the wiki has some instructions), you can get your name in the commit log (ooohhh!). > As a side note: having added nodelay, there doesn't seem to be any > real reason we would need to keep the IO.select... but in my brief > experimentation I found various unpleasant side-effects when I tried > to remove it. I guess it doesn't hurt anything to leave it in. Yeah, the entire ncurses setup is completely cargo-cult programming. I have no idea why it works, and changing any bit of it breaks everything in weird ways. -- William From wmorgan-sup@masanjin.net Mon Feb 25 12:41:57 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:41:57 -0800 Subject: [sup-talk] OR query does not yield any result In-Reply-To: <1203497807-sup-2137@alioth.gs-lab.com> References: <47A169A5.30801@gslab.com> <1203443545-sup-3261@south> <1203497807-sup-2137@alioth.gs-lab.com> Message-ID: <1203961283-sup-5515@south> Reformatted excerpts from Manish Sapariya's message of 2008-02-20: > Here are the snippets from log and output of devel/console.sh query. Thanks! Try in the current git. I think this was due to the query normalization, which I've removed. -- William From guillaume.quintard@gmail.com Mon Feb 25 12:42:30 2008 From: guillaume.quintard@gmail.com (Guillaume Quintard) Date: Mon, 25 Feb 2008 09:42:30 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203958719-sup-6567@south> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> <1203898237-sup-1505@altis> <1203916279-sup-3593@south> <1203920420-sup-2769@altis> <1203958719-sup-6567@south> Message-ID: <1203961236-sup-7427@altis> Excerpts from William Morgan's message of Mon Feb 25 09:02:19 -0800 2008: > There's no way in the GUI, at least currently. I would like to have a > way, but I'm not sure what the interface would look like. why not using the same bar as for encryption, and reply-to choices ? -- Guillaume From wmorgan-sup@masanjin.net Mon Feb 25 12:48:19 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 25 Feb 2008 09:48:19 -0800 Subject: [sup-talk] [PATCH] shell commands are now run in a child process Message-ID: <1203961671-sup-8158@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-20: > I wouldn't right now. I was getting ruby seg. faults with the code I > submitted and ruby 1.8.6 (ruby bug? I don't know). Changing to code > that closes open files descriptors until the first invalid file > descriptor is encountered closes enough that I don't get the crash, > but also doesn't cause a seg. fault. Well, this wouldn't be the most cargo-cultish code that's in Sup. (See previous message about ncurses.) I'll keep this patch on the back burner, then, until we have a little more experience. Is anyone else out there using Cygwin? -- William From vasudeva@linkswarm.com Mon Feb 25 12:53:02 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Mon, 25 Feb 2008 12:53:02 -0500 Subject: [sup-talk] sup-sync-back reports: Nothing to do In-Reply-To: <1203959676-sup-1952@south> References: <1203639414-sup-3734@lenin> <1203959676-sup-1952@south> Message-ID: <1203961949-sup-3973@lenin> Excerpts from William Morgan's message of Mon Feb 25 12:17:28 -0500 2008: > Reformatted excerpts from vasudeva's message of 2008-02-21: > > Nothing to do. > > I've improved this message in git. You need to specify least one of > --drop-deleted, --move-deleted, --drop-spam, or --move-spam. Thanks -- that was it. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From marcus-sup@bar-coded.net Mon Feb 25 15:50:09 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 25 Feb 2008 20:50:09 +0000 Subject: [sup-talk] [PATCH] First draft of attachment processing for more gmail style searches Message-ID: <1203972458-sup-5906@tomsk> This patch adds the search terms "filename" and "filetype". This changes the index so requires a sup-sync --all to work properly, but should work on all new messages without it. You can now search for something like "from:phil* filetype:pdf" for all messages from a person called phil with a pdf attachment. You can also specify a file name for the attachment with "filename:(this is a filename with spaces.txt)". You can use wildcards in the filename ("filename:test*.pdf"). --- lib/sup/index.rb | 15 +++++++++++++++ lib/sup/message.rb | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/lib/sup/index.rb b/lib/sup/index.rb index f812fc7..4205f2a 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -147,6 +147,7 @@ EOS field_infos.add_field :date, :index => :untokenized field_infos.add_field :body field_infos.add_field :label + field_infos.add_field :attachments field_infos.add_field :subject field_infos.add_field :from field_infos.add_field :to @@ -198,6 +199,7 @@ EOS :body => (entry[:body] || m.indexable_content), :snippet => snippet, # always override :label => m.labels.uniq.join(" "), # always override + :attachments => (entry[:attachments] || m.attachments.uniq.join(" ")), :from => (entry[:from] || (m.from ? m.from.indexable_content : "")), :to => (entry[:to] || (m.to + m.cc + m.bcc).map { |x| x.indexable_content }.join(" ")), :subject => (entry[:subject] || wrap_subj(m.subj)), @@ -452,6 +454,19 @@ protected end end + ## gmail style attachments "filename" and "filetype" searches + subs = subs.gsub(/\b(filename|filetype):(\((.+?)\)\B|(\S+)\b)/) do + field, name = $1, ($3 || $4) + case field + when "filename" + Redwood::log "filename - translated #{field}:#{name} to attachments:(#{name.downcase})" + "attachments:(#{name.downcase})" + when "filetype" + Redwood::log "filetype - translated #{field}:#{name} to attachments:(*.#{name.downcase})" + "attachments:(*.#{name.downcase})" + end + end + if $have_chronic chronic_failure = false subs = subs.gsub(/\b(before|on|in|during|after):(\((.+?)\)\B|(\S+)\b)/) do diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 6a2a9c4..480f52c 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -37,7 +37,7 @@ class Message DEFAULT_SENDER = "(missing sender)" attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source, - :cc, :bcc, :labels, :list_address, :recipient_email, :replyto, + :cc, :bcc, :labels, :attachments, :list_address, :recipient_email, :replyto, :source_info, :list_subscribe, :list_unsubscribe bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content @@ -54,6 +54,7 @@ class Message @dirty = false @encrypted = false @chunks = nil + @attachments = [] ## we need to initialize this. see comments in parse_header as to ## why. @@ -405,6 +406,10 @@ private ## if there's a filename, we'll treat it as an attachment. if filename + # add this to the attachments list if its not a generated html + # attachment (should we allow images with generated names?). + # Lowercase the filename because searches are easier that way + @attachments.push filename.downcase unless filename =~ /^sup-attachment-/ [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)] ## otherwise, it's body text -- 1.5.3.7 From teatime@gmx.com Tue Feb 26 22:40:54 2008 From: teatime@gmx.com (Jan Spakula) Date: Tue, 26 Feb 2008 21:40:54 -0600 Subject: [sup-talk] gpg signing issue Message-ID: <1204081553-sup-4470@aconcagua> Hello, I have an issue with gpg signing emails with sup. The header of sent emails look like this: Content-Type: multipart/signed; protocol=""application/pgp-signature""; boundary="=-1204074034-949437-9467-7738-1-="; micalg="pgp-sha1" Note the double quotation marks around application/pgp-signature. (I checked it in the "Sent", and of course on my other e-mail account.) Apparently they throw off at least mutt and claws-mail, so that they don't recognize the protocol for the attachment. However, if I manually edit the header to have only one set of quotation marks, the signature is recognized. I took a peek on the sources (crypto.rb), and I don't know how the double quotation marks could be created. Anybody else having this problem? Thanks, Jan --- . gpg key: http://freeshell.de/~teatime/teatime.sig -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080226/134de07a/attachment.bin From nicolas.pouillard@gmail.com Wed Feb 27 03:39:38 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 27 Feb 2008 09:39:38 +0100 Subject: [sup-talk] gpg signing issue In-Reply-To: <1204081553-sup-4470@aconcagua> References: <1204081553-sup-4470@aconcagua> Message-ID: <1204101423-sup-3529@ausone.inria.fr> Excerpts from Jan Spakula's message of Wed Feb 27 04:40:54 +0100 2008: > Hello, > > I have an issue with gpg signing emails with sup. The header of sent > emails look like this: > Content-Type: multipart/signed; protocol=""application/pgp-signature""; boundary="=-1204074034-949437-9467-7738-1-="; micalg="pgp-sha1" > Note the double quotation marks around > application/pgp-signature. (I checked it in the "Sent", and of course on > my other e-mail account.) Apparently they throw off at least mutt and > claws-mail, so that they don't recognize the protocol for the > attachment. However, if I manually edit the header to have only one set > of quotation marks, the signature is recognized. > > I took a peek on the sources (crypto.rb), and I don't know how the > double quotation marks could be created. Anybody else having this > problem? That's a ruby-mail bug with a working patch [1], however ruby-mail is no longer actively maintained :( [1]: "[2661] set_boundary doubles quotes in params which already contained a quote" http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756 -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080227/94488b5f/attachment.bin From marcus-sup@bar-coded.net Wed Feb 27 10:19:03 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 27 Feb 2008 15:19:03 +0000 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1203871982-sup-7942@south> References: <1203871982-sup-7942@south> Message-ID: <1204125329-sup-6077@tomsk> On 24.2.2008, William Morgan wrote: > The change was made in such a way that it's incrementally applied > whenever a message is saved or changed in the Ferret index. I'm not sure if this is down to this change in next or not but I'm seeing an oddity with mail lists where my outgoing message (in sent) doesnt get updated by the incoming message (from the mail list). An example might be clearer - I send a message to sup-talk and I get a copy of my sent message in my inbox. I then get the same message sent back to me from sup-talk and what used to happen is the headers would update to the new incoming message (and all my hooks would kick in). My recent messages to sup-talk dont seem to be doing this. So... either a recent change has caused this or sup-talk is now not delivering copies of my messages to me (which is certainly a mailman option). Any ideas? Marcus From wmorgan-sup@masanjin.net Wed Feb 27 12:16:42 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 27 Feb 2008 09:16:42 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204125329-sup-6077@tomsk> References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk> Message-ID: <1204132459-sup-1072@south> Reformatted excerpts from Marcus Williams's message of 2008-02-27: > I'm not sure if this is down to this change in next or not but I'm > seeing an oddity with mail lists where my outgoing message (in sent) > doesnt get updated by the incoming message (from the mail list). Good catch. This is an unintented consequence of that change. I'm seeing it too. I'll work on a fix---I have an idea and I don't think it will be too hard. In the mean time, feel free to git reset to back to before that commit. :) -- William From wmorgan-sup@masanjin.net Wed Feb 27 12:50:37 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 27 Feb 2008 09:50:37 -0800 Subject: [sup-talk] gpg signing issue In-Reply-To: <1204101423-sup-3529@ausone.inria.fr> References: <1204081553-sup-4470@aconcagua> <1204101423-sup-3529@ausone.inria.fr> Message-ID: <1204134542-sup-7286@south> Reformatted excerpts from nicolas.pouillard's message of 2008-02-27: > That's a ruby-mail bug with a working patch [1], however > ruby-mail is no longer actively maintained :( I did hear from Matt Armstrong recently that he was starting to maintain it again. At least, he released a 1.0.0 last month that has Ruby 1.9 modifications. But nothing since. > [1]: "[2661] set_boundary doubles quotes in params which already contained a > quote" > http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756 Does the following workaround help? (Completely untested.) diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index 9e16132..ee06958 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -40,7 +40,7 @@ class CryptoManager raise Error, (output || "gpg command failed: #{cmd}") unless $?.success? envelope = RMail::Message.new - envelope.header["Content-Type"] = 'multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1' + envelope.header["Content-Type"] = 'multipart/signed; protocol=application/pgp-signature; micalg=pgp-sha1' envelope.add_part payload signature = RMail::Message.make_attachment output, "application/pgp-signature", nil, "signature.asc" -- William From chrisw@rice.edu Wed Feb 27 13:55:12 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Wed, 27 Feb 2008 12:55:12 -0600 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1203871982-sup-7942@south> References: <1203871982-sup-7942@south> Message-ID: <1204138450-sup-1391@chris-tablet> Excerpts from William Morgan's message of Sun Feb 24 11:15:32 -0600 2008: > There's also a potential next step here where no interaction with > external sources is *ever* required except at poll time, which would > mean IMAP would become actually useable. (The other option being > just figure out why the Ruby IMAP library is so incredibly slow.) Now, we have offline(-ish) mode for IMAP. Horray! I can do e-mail on the plane. -- Christopher Warrington From teatime@gmx.com Wed Feb 27 13:56:07 2008 From: teatime@gmx.com (Jan Spakula) Date: Wed, 27 Feb 2008 12:56:07 -0600 Subject: [sup-talk] gpg signing issue In-Reply-To: <1204134542-sup-7286@south> References: <1204081553-sup-4470@aconcagua> <1204101423-sup-3529@ausone.inria.fr> <1204134542-sup-7286@south> Message-ID: <1204138293-sup-8382@aconcagua> Excerpts from William Morgan's message of Wed Feb 27 11:50:37 -0600 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-02-27: > > [1]: "[2661] set_boundary doubles quotes in params which already contained a > > quote" > > http://rubyforge.org/tracker/index.php?func=detail&aid=2661&group_id=446&atid=1756 > > Does the following workaround help? (Completely untested.) > ... Yes, both fixes work. (Didn't try them simultaneusly though.) Thanks a lot, Jan From marcus-sup@bar-coded.net Wed Feb 27 17:40:57 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 27 Feb 2008 22:40:57 +0000 Subject: [sup-talk] [PATCH] Additional attachment goodness... Message-ID: <1204151850-sup-9501@tomsk> Adds hidden/reserved attachment label to track attachments. Also adds new flag on thread index mode to denote an attachment '#'. This extends the attachments patch sent earlier and is also against latest 'next'. It will require another sup-sync -all to work against all sources, but attempts to be backwards compatable with non-synced sources. Adds a "has:attachment" search query. --- lib/sup/index.rb | 2 +- lib/sup/label.rb | 6 +++--- lib/sup/message.rb | 1 + lib/sup/modes/thread-index-mode.rb | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/sup/index.rb b/lib/sup/index.rb index 4205f2a..bb70328 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -438,7 +438,7 @@ protected extraopts[:load_deleted] = true if subs =~ /\blabel:deleted\b/ ## gmail style "is" operator - subs = subs.gsub(/\b(is):(\S+)\b/) do + subs = subs.gsub(/\b(is|has):(\S+)\b/) do field, label = $1, $2 case label when "read" diff --git a/lib/sup/label.rb b/lib/sup/label.rb index 4afc0f9..716ef98 100644 --- a/lib/sup/label.rb +++ b/lib/sup/label.rb @@ -5,13 +5,13 @@ class LabelManager ## labels that have special semantics. user will be unable to ## add/remove these via normal label mechanisms. - RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox ] + RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox, :attachment ] ## labels which it nonetheless makes sense to search for by - LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox ] + LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox, :attachment ] ## labels that will typically be hidden from the user - HIDDEN_RESERVED_LABELS = [ :starred, :unread ] + HIDDEN_RESERVED_LABELS = [ :starred, :unread, :attachment ] def initialize fn @fn = fn diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 480f52c..2be779c 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -410,6 +410,7 @@ private # attachment (should we allow images with generated names?). # Lowercase the filename because searches are easier that way @attachments.push filename.downcase unless filename =~ /^sup-attachment-/ + add_label :attachment unless filename =~ /^sup-attachment-/ [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)] ## otherwise, it's body text diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 7a0b815..1b2c0d7 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -713,7 +713,8 @@ protected from + [ [subj_color, size_widget_text], - [:to_me_color, dp ? " >" : (p ? ' +' : " ")], + [:to_me_color, t.labels.member?(:attachment) ? "#" : " "], + [:to_me_color, dp ? ">" : (p ? '+' : " ")], [subj_color, t.subj + (t.subj.empty? ? "" : " ")], ] + (t.labels - @hidden_labels).map { |label| [:label_color, "+#{label} "] } + -- 1.5.4.1 From 5srmspw02@sneakemail.com Wed Feb 27 21:29:39 2008 From: 5srmspw02@sneakemail.com (Guarded Identity) Date: Wed, 27 Feb 2008 20:29:39 -0600 Subject: [sup-talk] Boolean "OR" operator in query? Message-ID: <15896-58934@sneakemail.com> Hi, I'm using the latest git Sup, and I tried to do the following query: label:admin OR label:info Here's an excerpt from the log (a little formatting to dodge wrapping) Wed Feb 27 19:49:18 -0600 2008: normalized "label:admin OR label:info" to "label:admin label:info" Wed Feb 27 19:49:18 -0600 2008: got 1 results for query (offset 0) +(+label:admin +label:info) -label:spam -label:deleted It's pretty clear the boolean operators are getting dropped. It also easy to find the section of code in index.rb that's doing this conversion. I read a little of the Ferret API and also some of the comments in Redwood::Index.parse_user_query_string, but I've not yet reached an understanding of why the operators are being dropped. So I got lazy and thought I'd ask the list because I'd like to have the ability to have disjunctions in queries. Thanks for your help, Sukant From wmorgan-sup@masanjin.net Thu Feb 28 11:59:37 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 08:59:37 -0800 Subject: [sup-talk] Boolean "OR" operator in query? In-Reply-To: <15896-58934@sneakemail.com> References: <15896-58934@sneakemail.com> Message-ID: <1204217919-sup-212@south> Reformatted excerpts from Guarded Identity's message of 2008-02-27: > So I got lazy and thought I'd ask the list because I'd like to have > the ability to have disjunctions in queries. The latest git next has the query normalization stuff removed because it was breaking several things, including this. -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:02:46 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:02:46 -0800 Subject: [sup-talk] [PATCH] Additional attachment goodness... In-Reply-To: <1204151850-sup-9501@tomsk> References: <1204151850-sup-9501@tomsk> Message-ID: <1204218028-sup-7748@south> Reformatted excerpts from Marcus Williams's message of 2008-02-27: > Adds hidden/reserved attachment label to track attachments. Also adds > new flag on thread index mode to denote an attachment '#'. The attachment icon should clearly be the little ASCII paperclip, "@"! Who's with me? -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:09:55 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:09:55 -0800 Subject: [sup-talk] gpg signing issue In-Reply-To: <1204138293-sup-8382@aconcagua> References: <1204081553-sup-4470@aconcagua> <1204101423-sup-3529@ausone.inria.fr> <1204134542-sup-7286@south> <1204138293-sup-8382@aconcagua> Message-ID: <1204218343-sup-313@south> Reformatted excerpts from Jan Spakula's message of 2008-02-27: > Yes, both fixes work. (Didn't try them simultaneusly though.) Ok, I'm going to merge this into both next and master. -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:23:29 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:23:29 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204138450-sup-1391@chris-tablet> References: <1203871982-sup-7942@south> <1204138450-sup-1391@chris-tablet> Message-ID: <1204219351-sup-3340@south> Reformatted excerpts from Christopher Warrington's message of 2008-02-27: > Now, we have offline(-ish) mode for IMAP. Horray! I can do e-mail on > the plane. You could always have used offlineimap. :) -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:29:49 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:29:49 -0800 Subject: [sup-talk] [PATCH] Unwrap br0ken URLs. In-Reply-To: <12034162702820-git-send-email-nicolas.pouillard@gmail.com> References: <12034162702820-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1204219598-sup-1190@south> I would love to have a feature like this in Sup. This patch still has some issues in terms of being over-aggressive. What I would really like to see as a starting point is a corpus of broken URL examples that we can build unit tests of. Then we can tweak these regexes until we get something that has both high precision and high recall. Also, have you looked at URI.regexp? I think that can do a lot of the dirty work. -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:40:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:40:35 -0800 Subject: [sup-talk] [PATCH] First draft of attachment processing for more gmail style searches In-Reply-To: <1203972458-sup-5906@tomsk> References: <1203972458-sup-5906@tomsk> Message-ID: <1204220051-sup-129@south> Reformatted excerpts from Marcus Williams's message of 2008-02-25: > This patch adds the search terms "filename" and "filetype". This > changes the index so requires a sup-sync --all to work properly, but > should work on all new messages without it. Just reading the patch without having applied it yet, this looks pretty good. To answer the question in the comments, attachments with generated names are things that are meant to be displayed inline, not "download-worthy attachments", so I don't think they should be included in the list of attachments. (Sup only generates a name for them to allow external viewing programs to view them.) So I think the current implementation is correct on that point. -- William From wmorgan-sup@masanjin.net Thu Feb 28 12:43:09 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 09:43:09 -0800 Subject: [sup-talk] filter question In-Reply-To: <1203961236-sup-7427@altis> References: <1203801642-sup-8748@altis> <1203893761-sup-560@south> <1203898237-sup-1505@altis> <1203916279-sup-3593@south> <1203920420-sup-2769@altis> <1203958719-sup-6567@south> <1203961236-sup-7427@altis> Message-ID: <1204220447-sup-3859@south> Reformatted excerpts from Guillaume Quintard's message of 2008-02-25: > Excerpts from William Morgan's message of Mon Feb 25 09:02:19 -0800 2008: > > There's no way in the GUI, at least currently. I would like to have > > a way, but I'm not sure what the interface would look like. > > why not using the same bar as for encryption, and reply-to choices ? Well, the user might have 20 different accounts... horizontal scrolling just isn't going to cut it. Now that I've thought about it, the right interface is probably to have a keystroke in edit-message-mode that brings up a modal buffer with a list of all your account default email addresses and allows you to select one. Then we can leverage Sup's existing "vertical scrolling technology". Patches welcome. :) -- William From wmorgan-sup@masanjin.net Thu Feb 28 13:25:45 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 10:25:45 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204132459-sup-1072@south> References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk> <1204132459-sup-1072@south> Message-ID: <1204223070-sup-8156@south> Reformatted excerpts from William Morgan's message of 2008-02-27: > Good catch. This is an unintented consequence of that change. I'm > seeing it too. I'll work on a fix---I have an idea and I don't think > it will be too hard. I think I've solved this in next. Later versions of the same message can overwrite previous versions, except for labels, which are merged in. This should address a previous bug as well. Try it out and lmk. A sup-sync --changed should fix everything. (Make a backup first, of course!) -- William From marcus-sup@bar-coded.net Thu Feb 28 15:57:54 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 28 Feb 2008 20:57:54 +0000 Subject: [sup-talk] [PATCH] Additional attachment goodness... In-Reply-To: <1204218028-sup-7748@south> References: <1204151850-sup-9501@tomsk> <1204218028-sup-7748@south> Message-ID: <1204232067-sup-3518@tomsk> On 28.2.2008, William Morgan wrote: > The attachment icon should clearly be the little ASCII paperclip, "@"! > Who's with me? ... definitely! should have thought of that :) From marcus-sup@bar-coded.net Thu Feb 28 16:15:42 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 28 Feb 2008 21:15:42 +0000 Subject: [sup-talk] [PATCH] First draft of attachment processing for more gmail style searches In-Reply-To: <1204220051-sup-129@south> References: <1203972458-sup-5906@tomsk> <1204220051-sup-129@south> Message-ID: <1204232994-sup-628@tomsk> On 28.2.2008, William Morgan wrote: > Just reading the patch without having applied it yet, this looks pretty > good. To answer the question in the comments, attachments with generated > names are things that are meant to be displayed inline, not > "download-worthy attachments", so I don't think they should be included > in the list of attachments. Guessed as much (had to sup-sync -all about 10 times on a large imap account to figure this out though! - although this has made me move to offlineimap and maildirs which are _much_ faster so I gained something in the end :) The only thing I'm a little wary of is the join() I do of the attachment filenames for the index (like labels). This means that ferret doesnt actually know the difference between two files called file1 and file2 and a single file called "file1 file2". Not sure it matters that much for this usage though. Also I dont repopulate the attachments attribute on the message object and I couldnt figure out quite how you do it for labels (through the initialise?). Might be nice to be able to query the attachments field as a list on a message object much like labels. This then brought me back to the problem of how to deal with spaces in filenames. It might be that I should use some other character for the join thats unlikely to be in a filename. Not sure what though. Marcus From marcus-sup@bar-coded.net Thu Feb 28 18:05:20 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 28 Feb 2008 23:05:20 +0000 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204223070-sup-8156@south> References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk> <1204132459-sup-1072@south> <1204223070-sup-8156@south> Message-ID: <1204239818-sup-9440@tomsk> On 28.2.2008, William Morgan wrote: > I think I've solved this in next. I just did an update but didnt get anything new other than the pgp stuff. You sure its in next? :) Marcus From wmorgan-sup@masanjin.net Thu Feb 28 19:28:22 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 16:28:22 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204239818-sup-9440@tomsk> References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk> <1204132459-sup-1072@south> <1204223070-sup-8156@south> <1204239818-sup-9440@tomsk> Message-ID: <1204244881-sup-2122@south> Reformatted excerpts from Marcus Williams's message of 2008-02-28: > I just did an update but didnt get anything new other than the pgp > stuff. You sure its in next? :) Should be: commit 28f7a766f32040f993af88dae9fe2d994a80f16c. -- William From wmorgan-sup@masanjin.net Thu Feb 28 20:27:27 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 28 Feb 2008 17:27:27 -0800 Subject: [sup-talk] new in next: faster saving and bigger indexes In-Reply-To: <1204244881-sup-2122@south> References: <1203871982-sup-7942@south> <1204125329-sup-6077@tomsk> <1204132459-sup-1072@south> <1204223070-sup-8156@south> <1204239818-sup-9440@tomsk> <1204244881-sup-2122@south> Message-ID: <1204248415-sup-8393@south> Hah, I hadn't actually pushed it out yet. In the mean time I found another bug, and fixed it, so... try now. -- William From stipim@rpi.edu Fri Feb 29 19:45:03 2008 From: stipim@rpi.edu (Mike Stipicevic) Date: Fri, 29 Feb 2008 19:45:03 -0500 Subject: [sup-talk] error log Message-ID: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p> Hello, I am an infrequent sup user and just started playing with its archive abilities. I have not modified the local mailbox in any way until now when I archived several messages. I then browsed the help screen a few times and quit. While quitting, sup hung on "saving 2/17," using 0% of the cpu. I then hit ctrl-C to terminate the program. I use Slackware 11, ruby 1.8.6, and sup 0.4 (rubygem) Here is the contents of sup-exception-log.txt --- Interrupt from thread: main /usr/local/lib/ruby/1.8/monitor.rb:102:in `stop' /usr/local/lib/ruby/1.8/monitor.rb:102:in `wait' /usr/local/lib/ruby/1.8/net/imap.rb:967:in `get_tagged_response' /usr/local/lib/ruby/1.8/net/imap.rb:1027:in `send_command' /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize' /usr/local/lib/ruby/1.8/net/imap.rb:1012:in `send_command' /usr/local/lib/ruby/1.8/net/imap.rb:1165:in `fetch_internal' /usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize' /usr/local/lib/ruby/1.8/net/imap.rb:1163:in `fetch_internal' /usr/local/lib/ruby/1.8/net/imap.rb:707:in `fetch' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:188:in `fetch' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:302:in `safely' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:188:in `fetch' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:271:in `get_imap_fields' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:113:in `unsynchronized_raw_message' (eval):3:in `raw_message' (eval):3:in `synchronize' (eval):3:in `raw_message' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:97:in `load_message' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `send' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `__pass' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:523:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:195:in `load_from_source!' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:252:in `content' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:186:in `sync_message' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/message.rb:149:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:114:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:66:in `each' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:168:in `each_with_stuff' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:65:in `each' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:114:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :363:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/hook.rb:123:in `each_with_index' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :361:in `each' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :361:in `each_with_index' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :361:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:668:in `say' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :360:in `save' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb :377:in `cleanup' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:387:in `kill_buffer' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:369:in `kill_all_buffers_safely' /usr/local/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:229 /usr/local/bin/sup:16:in `load' /usr/local/bin/sup:16 Hope this helps, - Mike -- Mike Stipicevic Chairman, RPI Student Branch of the IEEE stipim at rpi.edu mstipicevic at ieee.org From wmorgan-sup@masanjin.net Fri Feb 29 23:16:21 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 29 Feb 2008 20:16:21 -0800 Subject: [sup-talk] error log In-Reply-To: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p> References: <000001c87b35$7d3a8750$0202a8c0@STIPIMT43p> Message-ID: <1204344959-sup-6336@south> Reformatted excerpts from Mike Stipicevic's message of 2008-02-29: > /usr/local/lib/ruby/1.8/monitor.rb:102:in `stop' > /usr/local/lib/ruby/1.8/monitor.rb:102:in `wait' > /usr/local/lib/ruby/1.8/net/imap.rb:967:in `get_tagged_response' > /usr/local/lib/ruby/1.8/net/imap.rb:1027:in `send_command' Looks like a deadlock in the IMAP library. Wow. Scary! -- William From chrisw@rice.edu Fri Feb 29 23:42:09 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Fri, 29 Feb 2008 22:42:09 -0600 Subject: [sup-talk] [PATCH] shell commands are now run in a child process In-Reply-To: <1203961671-sup-8158@south> References: <1203961671-sup-8158@south> Message-ID: <1645600603.20080229224209@rice.edu> William Morgan @ 2008-2-25 11:48:19 AM "[sup-talk] [PATCH] shell commands are now run in a child process" I've been getting more of these when playing with offlineimap. I submitted a bug upstream: http://ferret.davebalmain.com/trac/ticket/343 -- Christopher Warrington Today's Oxymoron: Twelve-ounce pound cake -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 183 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080229/bc3669a5/attachment.bin