On Fri, Nov 27, 2015 at 07:01:24PM +0000, David Woodfall wrote:
>Hi!
>
>I'm currently using mutt in xterm, and I finally got tired of copy&paste
>long urls (wrapped in multiple lines) from mutt to browser. Ideally, I'd
>like to be able to open urls by clicking them.
>
>It looks like xterm doesn't support clicking on urls, so I'm ready to
>switch to any other terminal emulator which will support this feature.
>Right now I'm experimenting with Konsole, but it's just a random choice.
>
>   Side note about 'markers': I'd like them, but had to switch them off
>   to avoid junk inside urls. Ideally, I'd like to be able to have
>   markers in all wrapped lines except inside urls - is that possible?
>
>Problem is, konsole doesn't detect wrapped urls as single line. While
>investigating this issue I noticed line selection (using triple-click) also
>doesn't detect lines wrapped by mutt as single line (but it does work for
>lines wrapped by other apps like less or bash, both in xterm and konsole).
>
>So, looks like something is broken in mutt.
>Maybe this issue is already known: http://dev.mutt.org/trac/ticket/3453
>
>
>I don't like to use url shorteners because of several reasons:
>- I wanna see real url before opening it
>- private urls unintentionally made public
>- changing content of incoming emails may break things (like pgp signatures)
>- probably won't work for outgoing emails
>and first reason is most important.
>
>I know about urlview, but it both doesn't show long urls well and more
>complicated to use than just copy&paste (with disabled markers).
>
>Can anyone recommend any other solutions? How you open long urls?
>
>--
>                    WBR, Alex.

It would be nice to see this fixed somehow. I've used urlview in the
past but I prefer to see links in the context of the surrounding text.

Dave

I use a Ubuntu terminal and the url above shows up highlighted in blue.
I hold the mouse over it and right click brings up a menu. I select
"open in browser" and it does just that. For attached html I use
mutt_bgrun. I have a script with several alternatives:-

#!/bin/bash
#
# see_html
# script to give choice of viewer for html attachments
#
# Brian Salter-Duke <b_d...@bigpond.net.au>
# This version: 13 May 2007
#-----------------------------------------------------------
#
view2="4"
echo "Menu for possible applications."
echo
echo "      1   Use lynx"
echo "      2   Use w3m"
echo "      3   Use Firefox"
echo "      4   Use Google Chrome"
echo "      0   Exit"
echo
echo
echo -n "Type in the number of the application you want: "
read viewer
if [ -z $viewer ]; then
viewer=$view2
fi
#
case $viewer in
0)
exit
;;
1)
echo "lynx -dump -force_html $1"
lynx -dump -force_html $1 > /tmp/out$$
/usr/bin/less /tmp/out$$
rm /tmp/out$$
;;
2)
echo "w3m -dump $1"
#/usr/bin/w3m -dump $1 > /tmp/out$$
/usr/bin/w3m -dump -T text/html -I %{charseti} $1 | /usr/bin/less
#/usr/bin/less /tmp/out$$
#rm /tmp/out$$
;;
3)
echo "Using Firefox for $1"
mutt_bgrun firefox $1
;;
4)
echo "Using google-chrome for $1"
mutt_bgrun google-chrome -enable-plugins $1
;;
esac

These solutions have been around for a long time. Am I missing something?

Brian
--
"The box said 'Windows 95 or better', so I installed Linux"
                                               -- Unknown
Brian Salter-Duke (Brian Duke) Email: b_duke(AT)bigpond(DOT)net(DOT)au

Yes, long URLs are wrapped in a way that breaks the link in most
terminals. I've used urxvt, xfce terminal and currently terminator,
and long URLs are always broken. Long URLs in other apps, like irssi,
vim and less are fine. Currently I'm using less as the mutt pager,
which works OK for now.

I don't know which terminal Ubuntu uses, but I suspect it's gnome.

Dave

Reply via email to