* [sup-talk] sup crash on tab completion @ 2008-01-19 5:21 John Bent 2008-01-22 7:41 ` William Morgan 0 siblings, 1 reply; 7+ messages in thread From: John Bent @ 2008-01-19 5:21 UTC (permalink / raw) Hey William, I'm just trying out sup and I'm really excited about it so far. My deal is that I really like gmail but my work doesn't allow us to use any external web servers so I can't forward my work email to gmail. My work's webmail absolutely sucks so I want to run some client on my own computer but I also want to use it when I'm on a different computer. So I need something that works over X-windows or in the console. I was using pine but I got completely frustrated by the lack of search. So sup looks really great. I'm only just starting to mess with it and some things do seem a little strange. For example, can I remove a label? By I'm hoping that most of the problems I'm seeing so far are just learning curve. So really, thank you so much for writing sup - it's exactly what I want / need. Anyway, I did just crash it when I was doing tab completion on a contact. The two possible contacts were: John Bent <johnbent at lanl.gov> and John Bent (gmail) <johnbent at gmail.com>. It was prompting me to either add a < or a (. It died when I added the ( and hit TAB: --- RegexpError from thread: main premature end of regular expression: /^John Bent (/ /opt/local/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:426:in `ask_many_emails_with_completions' Also, I can't figure out how to search on the from field. I'm doing from:Username and getting an empty thing. Also, can I automatically archive sent-messages that aren't part of a thread that includes received messages? Thanks again! John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/sup-talk/attachments/20080118/57f947c7/attachment.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-19 5:21 [sup-talk] sup crash on tab completion John Bent @ 2008-01-22 7:41 ` William Morgan 2008-01-22 9:40 ` Marcus Williams 0 siblings, 1 reply; 7+ messages in thread From: William Morgan @ 2008-01-22 7:41 UTC (permalink / raw) Hi John, Reformatted excerpts from John Bent's message of 2008-01-18: > I'm just trying out sup and I'm really excited about it so far. Great! > My deal is that I really like gmail but my work doesn't allow us to > use any external web servers so I can't forward my work email to > gmail. My work's webmail absolutely sucks so I want to run some > client on my own computer but I also want to use it when I'm on a > different computer. So I need something that works over X-windows or > in the console. I was using pine but I got completely frustrated by > the lack of search. Sounds like Sup is perfect for you. > I'm only just starting to mess with it and some things do seem a > little strange. For example, can I remove a label? You can remove labels by editing the labels for a thread. If you press 'l' while in a thread-index-mode, you can then backspace over any labels you don't want. > premature end of regular expression: /^John Bent (/ > /opt/local/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:426:in > `ask_many_emails_with_completions' I have a fix for this that I've just applied to master. I've attached the patch below if you just want to update your local copy, or you can wait for the next release (any day now), or you can get the latest version form git. > Also, I can't figure out how to search on the from field. I'm doing > from:Username and getting an empty thing. Searcing on from: currently requires a full email address or a contact nickname. Hm, I should improve this. > Also, can I automatically archive sent-messages that aren't part of a > thread that includes received messages? I'm not sure I entirely understand. Currently, sent messages appear in your inbox. Do you want sent messages to instead be archived automatically, unless they're part of a thread that already appears in your inbox? If so, this would be a pretty easy change, and possibly worthy of a config option. Here's the patch that fixes tab completion: --- lib/sup/buffer.rb | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index 2a78787..4374fa8 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -398,7 +398,7 @@ EOS def ask_with_completions domain, question, completions, default=nil ask domain, question, default do |s| - completions.select { |x| x =~ /^#{s}/i }.map { |x| [x, x] } + completions.select { |x| x =~ /^#{Regexp::escape s}/i }.map { |x| [x, x] } end end @@ -414,7 +414,7 @@ EOS raise "william screwed up completion: #{partial.inspect}" end - completions.select { |x| x =~ /^#{target}/i }.map { |x| [prefix + x, x] } + completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] } end end @@ -423,7 +423,7 @@ EOS prefix, target = partial.split_on_commas_with_remainder target ||= prefix.pop || "" prefix = prefix.join(", ") + (prefix.empty? ? "" : ", ") - completions.select { |x| x =~ /^#{target}/i }.map { |x| [prefix + x, x] } + completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] } end end @@ -436,7 +436,7 @@ EOS if dir [[s.sub(full, dir), "~#{name}"]] else - users.select { |u| u =~ /^#{name}/ }.map do |u| + users.select { |u| u =~ /^#{Regexp::escape name}/ }.map do |u| [s.sub("~#{name}", "~#{u}"), "~#{u}"] end end -- 1.5.4.rc2.69.g10f0 -- William <wmorgan-sup at masanjin.net> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-22 7:41 ` William Morgan @ 2008-01-22 9:40 ` Marcus Williams 2008-01-23 7:09 ` William Morgan 0 siblings, 1 reply; 7+ messages in thread From: Marcus Williams @ 2008-01-22 9:40 UTC (permalink / raw) On 22.1.2008, William Morgan wrote: > > Also, I can't figure out how to search on the from field. I'm doing > > from:Username and getting an empty thing. > > Searcing on from: currently requires a full email address or a contact > nickname. Hm, I should improve this. Note that you can use wildcards... "from:joe*" will find emails from joey/joe.bloggs/joel etc. Although it must be said I was pondering yesterday whether it was possible to get searches assume wildcards some how so when you searched for from:joe you would actually be searching for from:*joe* or maybe from:joe* automagically. I dug around in the ferret docs to see if this was possible but only came up with the fuzzy operators and you might as well use a wildcard instead. Marcus ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-22 9:40 ` Marcus Williams @ 2008-01-23 7:09 ` William Morgan 2008-01-23 12:41 ` Grant Hollingworth 2008-01-23 19:25 ` Gabriel Sean Farrell 0 siblings, 2 replies; 7+ messages in thread From: William Morgan @ 2008-01-23 7:09 UTC (permalink / raw) Reformatted excerpts from Marcus Williams's message of 2008-01-22: > Note that you can use wildcards... "from:joe*" will find emails from > joey/joe.bloggs/joel etc. Wow, I totally forgot about that. > Although it must be said I was pondering yesterday whether it was > possible to get searches assume wildcards some how so when you > searched for from:joe you would actually be searching for from:*joe* > or maybe from:joe* automagically. I dug around in the ferret docs to > see if this was possible but only came up with the fuzzy operators and > you might as well use a wildcard instead. I don't recall seeing anything like this in the Ferret docs, so it's probably not possible. What I'm thinking of doing, which will kind of approximate this, is adding the LHS of the email address and the sender's name to the from: field at index time, so that email from you would match e.g. from:marcus, from:williams, and from:marcus-sup. -- William <wmorgan-sup at masanjin.net> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-23 7:09 ` William Morgan @ 2008-01-23 12:41 ` Grant Hollingworth 2008-01-23 19:25 ` Gabriel Sean Farrell 1 sibling, 0 replies; 7+ messages in thread From: Grant Hollingworth @ 2008-01-23 12:41 UTC (permalink / raw) * William Morgan [Wed Jan 23 02:09:10 -0500 2008]: > I don't recall seeing anything like this in the Ferret docs, so it's > probably not possible. What I'm thinking of doing, which will kind of > approximate this, is adding the LHS of the email address and the > sender's name to the from: field at index time, so that email from you > would match e.g. from:marcus, from:williams, and from:marcus-sup. That would be excellent. I try to search like that all the time. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-23 7:09 ` William Morgan 2008-01-23 12:41 ` Grant Hollingworth @ 2008-01-23 19:25 ` Gabriel Sean Farrell 2008-01-25 5:04 ` William Morgan 1 sibling, 1 reply; 7+ messages in thread From: Gabriel Sean Farrell @ 2008-01-23 19:25 UTC (permalink / raw) On Tue, Jan 22, 2008 at 11:09:10PM -0800, William Morgan wrote: > Reformatted excerpts from Marcus Williams's message of 2008-01-22: > > Note that you can use wildcards... "from:joe*" will find emails from > > joey/joe.bloggs/joel etc. > > Wow, I totally forgot about that. > > > Although it must be said I was pondering yesterday whether it was > > possible to get searches assume wildcards some how so when you > > searched for from:joe you would actually be searching for from:*joe* > > or maybe from:joe* automagically. I dug around in the ferret docs to > > see if this was possible but only came up with the fuzzy operators and > > you might as well use a wildcard instead. > > I don't recall seeing anything like this in the Ferret docs, so it's > probably not possible. What I'm thinking of doing, which will kind of > approximate this, is adding the LHS of the email address and the > sender's name to the from: field at index time, so that email from you > would match e.g. from:marcus, from:williams, and from:marcus-sup. Using Ferret's LetterAnalyzer on the "from" and "to" fields should do this for you (i.e., create the appropriate tokens). I've stuck it in the code, but I haven't been able to make it work. Something to do with the twice-over query parsing, I think. gsf ^ permalink raw reply [flat|nested] 7+ messages in thread
* [sup-talk] sup crash on tab completion 2008-01-23 19:25 ` Gabriel Sean Farrell @ 2008-01-25 5:04 ` William Morgan 0 siblings, 0 replies; 7+ messages in thread From: William Morgan @ 2008-01-25 5:04 UTC (permalink / raw) Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > Using Ferret's LetterAnalyzer on the "from" and "to" fields should do > this for you (i.e., create the appropriate tokens). I've stuck it in > the code, but I haven't been able to make it work. Something to do > with the twice-over query parsing, I think. I don't think we even need to be so sophisticated. Check out commits d09d4afbeb035c497f3682559ecb30ab42c009c6 and 360e105c0d08a5765b23c37b2026bff586b3d136 which I just merged into next. You should be able to search the from: field with email address LHSes and first and last names. Of course you will need to run sup-sync --all to reindex the sources you're interested in, if you want to apply this retroactively. -- William <wmorgan-sup at masanjin.net> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-25 5:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-01-19 5:21 [sup-talk] sup crash on tab completion John Bent 2008-01-22 7:41 ` William Morgan 2008-01-22 9:40 ` Marcus Williams 2008-01-23 7:09 ` William Morgan 2008-01-23 12:41 ` Grant Hollingworth 2008-01-23 19:25 ` Gabriel Sean Farrell 2008-01-25 5:04 ` William Morgan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox