On Tue, Oct 29, 2019 at 07:39:34PM -0400, José María Mateos wrote:
To me, the gold standard of "selecting URLs while in text mode to be sent to the browser" is a plugin for irssi ("the mutt of IRC clients", I'd say) called simply url.pl. It tracks which URLs have been posted to all channels one is into and prepends a number between brackets. When one wants to visit a given address (let's say, just for this example, that I want to visit the third URL that was posted), just has to send the command /url 3, and it will be sent to Firefox.

Thinking a bit more about this: is there any way to replicate this behavior in mutt using some external script?

Using elinks/w3m/whatever we can have a list of numbered links from the HTML portion of the message we are reading. That dump can be piped to a temporary file and then read using bash/python/perl/yougettheidea to extract link number N (we need a way of passing N to the script), which is then sent to firefox.

I know this can't be done with a macro because it can't get any user input, unless I'm mistaken, but I was wondering if the above pipeline could be implemented somehow with the existing parts.


José María (Chema) Mateos || https://rinzewind.org/

Reply via email to