Hello! One thing I find myself doing all the time is highlighting a web address and pasting it into Firefox. For long URLs (a sad but common truth), it''s even more annoying... hit ''D'' to open it up in vim, navigate to the link, Jx a few times, then *finally* copy and paste. Is there a better way to do this? Since I couldn''t find any feature like this in the help, I''m going to assume the answer is no. So, here''s my real question: how hard would it be for me to allow Enter to try to open a (potentially-multiline) link? I am aware that there are some subtleties about detecting addresses'' beginning/ending points here; what I''m really interested in is whether it is easy within sup''s architecture. Thanks! ~d
Reformatted excerpts from Daniel Wagner''s message of 2008-01-29:> One thing I find myself doing all the time is highlighting a web > address and pasting it into Firefox. For long URLs (a sad but common > truth), it''s even more annoying... hit ''D'' to open it up in vim, > navigate to the link, Jx a few times, then *finally* copy and paste. > Is there a better way to do this?On my system this is actually handled by the terminal (I''m using gnome-terminal) directly. You can click on any link and it launches the default web browser.> So, here''s my real question: how hard would it be for me to allow > Enter to try to open a (potentially-multiline) link? I am aware that > there are some subtleties about detecting addresses'' beginning/ending > points here; what I''m really interested in is whether it is easy > within sup''s architecture.Fairly easy, with some caveats. Sup is fundamentally line-based, at least at this point. A URL-detecting regex could pick out individual URLs from the message, pack them into their own kind of Chunk (see message-chunks.rb) the same way that quoted regions and attachments are handled, and the rest would follow more or less trivially. That might make the email look a little weird, as any URLs would sit on their own line. But Sup has never shied away from reformatting emails for display. :) -- William <wmorgan-sup at masanjin.net>
Excerpts from Daniel Wagner''s message of Tue Jan 29 20:47:22 +0100 2008:> Hello! > > One thing I find myself doing all the time is highlighting a web address > and pasting it into Firefox. For long URLs (a sad but common truth), > it''s even more annoying... hit ''D'' to open it up in vim, navigate to the > link, Jx a few times, then *finally* copy and paste. Is there a better > way to do this? Since I couldn''t find any feature like this in the > help, I''m going to assume the answer is no.Concerning multiline links, I''ve hacked sup to don''t wrap at 80 columns but at 160. This fixes the problem at least when the mail has not been wrapped by the sender. -- 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/20080130/5a26c0cd/attachment.bin
Excerpts from Nicolas Pouillard''s message of Wed Jan 30 04:21:28 -0500 2008:> Concerning multiline links, I''ve hacked sup to don''t wrap at 80 columns but > at 160. This fixes the problem at least when the mail has not been wrapped by > the sender.Care to share? I''d like to see this so I can figure out a way to make sup wrap where I want to. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart
Excerpts from vasudeva''s message of Thu Jan 31 01:29:17 +0100 2008:> Excerpts from Nicolas Pouillard''s message of Wed Jan 30 04:21:28 -0500 2008: > > Concerning multiline links, I''ve hacked sup to don''t wrap at 80 columns but > > at 160. This fixes the problem at least when the mail has not been wrapped by > > the sender. > > Care to share? I''d like to see this so I can figure out a way to make > sup wrap where I want to.That''s not really clean and produce a warning the first time. I''ve added this line to one of my hooks (after-poll.rb) Redwood::Chunk::Text.const_set :WRAP_LEN, 160 unless Redwood::Chunk::Text::WRAP_LEN == 160 -- Nicolas Pouillard aka Ertai -------------- 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/20080131/911bc2df/attachment.bin