Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
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. Cheers! -- José María (Chema) Mateos || https://rinzewind.org/
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Tue, Oct 29, 2019 at 01:37:29PM +1300, martin f krafft wrote: Yes, it does. I think Chris' and José's points were more about requiring an external tool to provide functionality which has become so core to everyday email use that mutt could learn to do it. Urlview also obstructs your view to context when using it. I've opened it a million times only to find myself staring at a list of tracking URLs that all look the same, now knowing which one appeared in the paragraph I was just reading. Mutt could do a much better job, with a UI/UX similar to what rxvt-unicode offers (but cannot due to ncurses…), i.e.: Yes, that's precisely what I meant. Problems when selecting URLs come precisely from two very precise e-mail types: 1. Very long URL compilations. Say RISKS Digest, for instance. If anyone here is subscribed, they know what I mean. 2. Newsletters with tracking links. 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. Now, visualizing HTML e-mail with elinks -dumps or something similar also prepends a number between brackets, but I have found that urlview and elinks don't always agree on the numbering. In the end, if the e-mail is a complex HTML newsletter, I just open it with Firefox and click on whatever links I want to read. If it's a text message, I select the URL with the mouse and paste it in the address bar of a new Firefox tab. It takes just a few seconds of my time, it's not a big deal... but it could be better :-) Cheers, -- José María (Chema) Mateos || https://rinzewind.org
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Tue, Oct 29, 2019 at 10:05:10PM +1300, martin f krafft wrote: >Regarding the following, written by "Dave Woodfall" on 2019-10-29 at >08:53 Uhr +: > > I deal with very long links, or long lists of links where the > context is lost, by opening the message in elinks, and then using > elinks' option to pass a link or current URL to an external > application or command, if elinks can't deal with it itself. That > way it's possible to copy the URL into /tmp/screen-exhange, then do > something in screen. > >Sounds like a lot of ifs and loose parts to a task that we all end up >doing dozen times a day. A good tool would let me accomplish such a >task without engaging my brain, and with one or two key presses, don't >you think? Well, since you asked what I think: I think that following links without engaging my brain is dangerous behavior, and one of the reasons I use Mutt is to interrupt that behavior before it becomes established. -- Mark H. Wood Lead Technology Analyst University Library Indiana University - Purdue University Indianapolis 755 W. Michigan Street Indianapolis, IN 46202 317-274-0749 www.ulib.iupui.edu signature.asc Description: PGP signature
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Tuesday, October 29, 2019 at 13:37:29 +1300, martin f krafft wrote: Regarding the following, written by "Dave Woodfall" on 2019-10-29 at 00:10 Uhr +: >Urlview handles long and short links just fine. I've been >using it for over 10 years. Urlview also obstructs your view to context when using it. I've opened it a million times only to find myself staring at a list of tracking URLs that all look the same, now knowing which one appeared in the paragraph I was just reading. urlscan shows context, usually enough to figure out quickly which is which. Mihai
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
Regarding the following, written by “Dave Woodfall” on 2019-10-29 at 08:53 Uhr +: I deal with very long links, or long lists of links where the context is lost, by opening the message in elinks, and then using elinks’ option to pass a link or current URL to an external application or command, if elinks can’t deal with it itself. That way it’s possible to copy the URL into /tmp/screen-exhange, then do something in screen. Sounds like a lot of ifs and loose parts to a task that we all end up doing dozen times a day. A good tool would let me accomplish such a task without engaging my brain, and with one or two key presses, don’t you think? -- @martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net the unix philosophy basically involves giving you enough rope to hang yourself. and then some more, just to be sure. spamtraps: madduck.bo...@madduck.net
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Mon 28 Oct 2019 20:28, Ben Boeckel put forth the proposition: > On Tue, Oct 29, 2019 at 00:10:09 +, Dave Woodfall wrote: > > Urlview handles long and short links just fine. I've been using it > > for over 10 years. > > One issue I have with it is that context is lost. Marketing emails today > tend to be massive strings with embedded IDs in them. Telling one from > another in urlview means I'm bouncing back and forth between it and the > message (or having 2 mutt instances to coordinate). I deal with very long links, or long lists of links where the context is lost, by opening the message in elinks, and then using elinks' option to pass a link or current URL to an external application or command, if elinks can't deal with it itself. That way it's possible to copy the URL into /tmp/screen-exhange, then do something in screen. -- Government spending? I don't know what it's all about. I don't know any more about this thing than an economist does, and, God knows, he doesn't know much. -- The Best of Will Rogers
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
Regarding the following, written by “雨宫恋叶” on 2019-10-29 at 00:41 Uhr +: For this, I think we should design a pager for that purpose. Urlview could probably be extended accordingly. It’d still be disruptive. Imagine reading a long email, and 75% down you encounter a link you want to follow. If you now fire up the external pager, it won’t be scrolled to the right location in the email, so you’d first have to find that paragraph first… -- @martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net "literature always anticipates life. it does not copy it, but moulds it to its purpose. the nineteenth century, as we know it, is largely an invention of balzac." -- oscar wilde spamtraps: madduck.bo...@madduck.net
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
October 29, 2019 8:38 AM, "martin f krafft" wrote: > Regarding the following, written by "Dave Woodfall" on 2019-10-29 at 00:10 > Uhr +: > >> Urlview handles long and short links just fine. I've been using it >> for over 10 years. > > Yes, it does. I think Chris' and José's points were more about > requiring an external tool to provide functionality which has become > so core to everyday email use that mutt could learn to do it. > > Urlview also obstructs your view to context when using it. I've > opened it a million times only to find myself staring at a list of > tracking URLs that all look the same, now knowing which one appeared > in the paragraph I was just reading. Mutt could do a much better > job, with a UI/UX similar to what rxvt-unicode offers (but cannot > due to ncurses…), i.e.: > > 1. enter URL selection mode; > 2. use arrow keys to select the URL you want, while the message is > being shown; > 3. press enter to fire up mailcap handler. For this, I think we should design a pager for that purpose. -- 旋转少女
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
Regarding the following, written by "Dave Woodfall" on 2019-10-29 at 00:10 Uhr +: Urlview handles long and short links just fine. I've been using it for over 10 years. Yes, it does. I think Chris' and José's points were more about requiring an external tool to provide functionality which has become so core to everyday email use that mutt could learn to do it. Urlview also obstructs your view to context when using it. I've opened it a million times only to find myself staring at a list of tracking URLs that all look the same, now knowing which one appeared in the paragraph I was just reading. Mutt could do a much better job, with a UI/UX similar to what rxvt-unicode offers (but cannot due to ncurses…), i.e.: 1. enter URL selection mode; 2. use arrow keys to select the URL you want, while the message is being shown; 3. press enter to fire up mailcap handler. -- @martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net "never attribute to malice what can be adequately explained by incompetence." -- mark twain spamtraps: madduck.bo...@madduck.net digital_signature_gpg.asc Description: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Tue, Oct 29, 2019 at 00:10:09 +, Dave Woodfall wrote: > Urlview handles long and short links just fine. I've been using it > for over 10 years. One issue I have with it is that context is lost. Marketing emails today tend to be massive strings with embedded IDs in them. Telling one from another in urlview means I'm bouncing back and forth between it and the message (or having 2 mutt instances to coordinate). Other than that, I really enjoy urlview. I even have a binding in tmux to this script: #!/bin/sh [ -z "$TMUX" ] && exit 1 tempfile="$( mktemp )" tmux capture-pane tmux save-buffer "$tempfile" tmux delete-buffer tmux new-window -n urlview "urlview $tempfile; rm $tempfile" which allows me to have wrapped lines work even with vertical splits (which confuses the terminal just like the sidebar does). --Ben
Re: Opening URLs from mutt (was: Creating HTML emails with mutt)
On Tue 29 Oct 2019 12:04, martin f krafft put forth the proposition: > Regarding the following, written by "Chris Green" on 2019-10-28 at 22:40 Uhr > +: > > Isn't that handled by your terminal program? Mine certainly allows > > one to right click on any URL to open it. > > rxvt-unicode also has an extension ("matcher") that allows you to select > and open URLs using the keyboard only. > > However, when URLs wrap across lines, things often break, and especially > when you have the sidebar shown, then your terminal emulator has no way to > make sense of the URL anymore. Mutt, however, does know about message > contents, and can interpret line breaks much better. Urlview handles long and short links just fine. I've been using it for over 10 years. -dw -- Under a government which imprisons any unjustly, the true place for a just man is also a prison. -- Henry David Thoreau