Discussion:
Solution for "very long urls in urlview"
(too old to reply)
Tyger
2006-02-21 02:23:14 UTC
Permalink
Hi,
Everyone. Did you come across a problem when you want use urlview
extract a url from mutt but only get a part of it, for the url is too
long to be broken by mutt with a "=" ? If the answer is yes,
congraduations! You are in a right place. I got that problem yesterday,
then I "googled", at last I find a solution in the net after several
hours(you can say I'm lucky). Then you are more lucky because what you
should do is just click the folloing link and read that page.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=127090

Why I write this message, because I want anyone who has the same
trouble will find a solution easier, then I list the key words
following:
mutt urlview long url long urls break lines cut lines quoted-printable


Tyger
Christopher Anderson
2022-09-20 09:04:03 UTC
Permalink
Thanks!

I had a different problem, where mutt breaks URLs across lines with +'s, and it stops them being clickable from a terminal session.

But finding out about urlview was enough to produce a solution.

For anyone else in a similar situation, I made a shell script ~/bin/url_handler.sh

```
/usr/bin/env bash
echo -e "\n\n$1\n\n"
read -r -n 1
```

and in ~/.urlview

```
COMMAND ~/bin/url_handler.sh
```

Now I get the URL wrapped normally, and it waits for a keypress before resuming. Brilliant.
Roger Bell_West
2022-09-20 10:03:41 UTC
Permalink
Post by Christopher Anderson
I had a different problem, where mutt breaks URLs across lines with +'s, and it stops them being clickable from a terminal session.
set markers=no
Rich
2022-09-20 10:23:59 UTC
Permalink
Post by Christopher Anderson
Thanks!
I had a different problem, where mutt breaks URLs across lines with
+'s, and it stops them being clickable from a terminal session.
But finding out about urlview was enough to produce a solution.
Or, alternately, tell mutt not to add those "+" characters by unsetting
the "markers" config variable:

3.125. markers

Type: boolean
Default: yes

Controls the display of wrapped lines in the internal pager. If set, a
"+" marker is displayed at the beginning of wrapped lines.

Also see the $smart_wrap variable.
Chris Green
2022-09-20 11:10:18 UTC
Permalink
Post by Rich
Post by Christopher Anderson
Thanks!
I had a different problem, where mutt breaks URLs across lines with
+'s, and it stops them being clickable from a terminal session.
But finding out about urlview was enough to produce a solution.
Or, alternately, tell mutt not to add those "+" characters by unsetting
3.125. markers
Type: boolean
Default: yes
Controls the display of wrapped lines in the internal pager. If set, a
"+" marker is displayed at the beginning of wrapped lines.
Also see the $smart_wrap variable.
But this doesn't fix the inability to click on long URLs, mutt still
breaks them into separate lines.
--
Chris Green
·
Roger Bell_West
2022-09-20 11:48:45 UTC
Permalink
Post by Chris Green
But this doesn't fix the inability to click on long URLs, mutt still
breaks them into separate lines.
That depends on your terminal emulator.
Chris Green
2022-09-20 12:09:01 UTC
Permalink
Post by Roger Bell_West
Post by Chris Green
But this doesn't fix the inability to click on long URLs, mutt still
breaks them into separate lines.
That depends on your terminal emulator.
No, it's only in mutt that long lines are split rather than wrapped.
It's the mutt internal pager that splits the lines, all other programs
using the same terminal emulator (xfce4-terminal) don't split long
wrapped lines.
--
Chris Green
·
Roger Bell_West
2022-09-20 13:14:01 UTC
Permalink
Post by Chris Green
No, it's only in mutt that long lines are split rather than wrapped.
It's the mutt internal pager that splits the lines, all other programs
using the same terminal emulator (xfce4-terminal) don't split long
wrapped lines.
...and some terminal emulators treat a split line as a separate thing,
and some don't care.

(Personally I don't care because my preferred terminal emulator,
urxvt, doesn't get to launch a web browser.)

Loading...