From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 29 Jan 2008 19:58:15 -0800 Subject: [sup-talk] Enter on links In-Reply-To: <1201636010-sup-8816@buckwheat> References: <1201636010-sup-8816@buckwheat> Message-ID: <1201665171-sup-7233@south> 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