* [sup-talk] Enter on links
@ 2008-01-29 19:47 Daniel Wagner
2008-01-30 3:58 ` William Morgan
2008-01-30 9:21 ` Nicolas Pouillard
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Wagner @ 2008-01-29 19:47 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] Enter on links
2008-01-29 19:47 [sup-talk] Enter on links Daniel Wagner
@ 2008-01-30 3:58 ` William Morgan
2008-01-30 9:21 ` Nicolas Pouillard
1 sibling, 0 replies; 5+ messages in thread
From: William Morgan @ 2008-01-30 3:58 UTC (permalink / raw)
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] Enter on links
2008-01-29 19:47 [sup-talk] Enter on links Daniel Wagner
2008-01-30 3:58 ` William Morgan
@ 2008-01-30 9:21 ` Nicolas Pouillard
2008-01-31 0:29 ` vasudeva
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2008-01-30 9:21 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] Enter on links
2008-01-30 9:21 ` Nicolas Pouillard
@ 2008-01-31 0:29 ` vasudeva
2008-01-31 11:58 ` Nicolas Pouillard
0 siblings, 1 reply; 5+ messages in thread
From: vasudeva @ 2008-01-31 0:29 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sup-talk] Enter on links
2008-01-31 0:29 ` vasudeva
@ 2008-01-31 11:58 ` Nicolas Pouillard
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2008-01-31 11:58 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-31 11:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 19:47 [sup-talk] Enter on links Daniel Wagner
2008-01-30 3:58 ` William Morgan
2008-01-30 9:21 ` Nicolas Pouillard
2008-01-31 0:29 ` vasudeva
2008-01-31 11:58 ` Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox