Re: URLs in Mutt

2024-01-02 Thread Jonathan Matthew Gresham
Install urlview

Re: URLs in Mutt

2024-01-02 Thread Nicolas George
Paul M Foster (12024-01-01):
> Of course, it doesn't fix the retarded way Mutt handles links.

To the better of my knowledge, Mutt does not handle links at all. Please
refrain from calling it retarded.

>   For those
> familiar with Mutt, it allows you to view the file with numbers referring
> to each link. Then you get a screen with just the numbered links. Here's
> the fun part: if the link you want is, say, number 4, when you get to the
> screen with only numbered links, the number 4 link is often some other
> link. You have to push each link around the one you want to the browser
> until you find the one you want. It's a pain.

What you describe does not look like a feature of Mutt but the
combination of two configuration options to use external programs, one
to display HTML as text (as I described elsewhere in the thread) and one
to catch URLs in the text, probably urlview (mentioned by somebody
else).

No need to blame Mutt at all.

Regards,

-- 
  Nicolas George



Re: URLs in Mutt

2024-01-01 Thread Paul M Foster
On Sun, Dec 31, 2023 at 11:12:12PM -0500, Greg Wooledge wrote:

> On Sun, Dec 31, 2023 at 10:51:25PM -0500, Paul M Foster wrote:
> > Apparently, something was wrapping lines to
> > about 75 characters, and putting an equals sign at the end of every line
> > which had been wrapped.
> 
> This is "quoted-printable" encoding.  You need to use a properly decoded
> version of the file, rather than the raw text.[1]
> 
> > As a solution, I took that email from my mutt mail file and stripped out
> > all the headers and non-HTML content. Then I fed that to my browser.
> 
> If you received a correctly formatted email, it should contain one or more
> parts, each of which is identified by a MIME Content-Type.  Pressing 'v'
> while reading the message takes you to a page which shows you the parts
> in a tree form.
> 
> Use the arrow keys to select the part you want to save (in this case, the
> text/html one), and then save it to a file.  I use "foo.html" usually,
> and just overwrite foo.html every time.
> 
> Have your browser load THAT file.
> 
> [1] The SMTP standard requires all transmitted lines to be 1000 characters
> or less, and to contain only 7-bit ASCII characters.  Therefore, any
> content which doesn't conform to these restrictions has to be encoded.
> The two choices for encoding are quoted-printable, and base64.
> Quoted-printable is nearly human-readable, and is more efficient if
> there are relatively few 8-bit characters or long lines, so it's
> a common choice.  Some MUAs will use q-p even on files that don't
> *strictly* need it, just in case.
> 

This is an excellent reply, and explains the situation entirely. I tried
your method, and it worked. Thanks.

Of course, it doesn't fix the retarded way Mutt handles links. For those
familiar with Mutt, it allows you to view the file with numbers referring
to each link. Then you get a screen with just the numbered links. Here's
the fun part: if the link you want is, say, number 4, when you get to the
screen with only numbered links, the number 4 link is often some other
link. You have to push each link around the one you want to the browser
until you find the one you want. It's a pain.

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster



Re: URLs in Mutt

2024-01-01 Thread fxkl47BF
On Mon, 1 Jan 2024, Nicolas George wrote:

> This was not a reply to the original mail. You might consider using a
> MUA with proper threading to better understand what is going on.

from the negative nature of your communications
every one understands what's going on



Re: URLs in Mutt

2024-01-01 Thread Nicolas George
fxkl4...@protonmail.com (12024-01-01):
> actually the question was
> " what is wrapping the lines on my incoming emails, and how do I fix it "
> please try to keep up

This was not a reply to the original mail. You might consider using a
MUA with proper threading to better understand what is going on.

-- 
  Nicolas George



Re: URLs in Mutt

2024-01-01 Thread fxkl47BF
On Mon, 1 Jan 2024, Nicolas George wrote:

> gene heskett (12024-01-01):
>> Most browsers to well with such as long as the link is surrounded by 
>> the left-right arrows delineate the links contents even if it is wrapped to
>> several lines on your screen.
>
> Please try to keep up with the context of the discussion, we were
> talking about links displayed by “lynx -dump”.

actually the question was
" what is wrapping the lines on my incoming emails, and how do I fix it "
please try to keep up



Re: URLs in Mutt

2024-01-01 Thread Nicolas George
gene heskett (12024-01-01):
> Most browsers to well with such as long as the link is surrounded by 
> the left-right arrows delineate the links contents even if it is wrapped to
> several lines on your screen.

Please try to keep up with the context of the discussion, we were
talking about links displayed by “lynx -dump”.

Regards,

-- 
  Nicolas George



Re: URLs in Mutt

2024-01-01 Thread gene heskett

On 1/1/24 11:52, Nicolas George wrote:

Greg Wooledge (12024-01-01):

It's been my experience that the hyperlinks I'm meant to click are so
long that they wrap around the terminal width multiple times.  This
makes copy/pasting them tedious at best, and even then it still
sometimes fails for me.


Surprising. The graphical web browsers I know are actually very tolerant
of spurious newline characters inserted in pasted URLs, and I suspect it
is on purpose. PDFs from magazines might also have wrapped links.

Regards,

Most browsers to well with such as long as the link is surrounded by 
 the left-right arrows delineate the links contents even if it is 
wrapped to several lines on your screen.


Take care all.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: URLs in Mutt

2024-01-01 Thread John Hasler
Greg Wooledge:
> It's been my experience that the hyperlinks I'm meant to click are so
> long that they wrap around the terminal width multiple times.  This
> makes copy/pasting them tedious at best, and even then it still
> sometimes fails for me.

My wife has the same problem.
-- 
John Hasler 
j...@sugarbit.com
Elmwood, WI USA



Re: URLs in Mutt

2024-01-01 Thread Nicolas George
Greg Wooledge (12024-01-01):
> It's been my experience that the hyperlinks I'm meant to click are so
> long that they wrap around the terminal width multiple times.  This
> makes copy/pasting them tedious at best, and even then it still
> sometimes fails for me.

Surprising. The graphical web browsers I know are actually very tolerant
of spurious newline characters inserted in pasted URLs, and I suspect it
is on purpose. PDFs from magazines might also have wrapped links.

Regards,

-- 
  Nicolas George



Re: URLs in Mutt

2024-01-01 Thread Andy Smith
Hello,

On Mon, Jan 01, 2024 at 09:23:03AM -0500, Greg Wooledge wrote:
> Passing the entire text/html part to an actual web browser has been
> what works best for me.

Me too. I'll do the mailcap thing to visually skim the text/html
part with w3m, but there are so many broken HTML messes that I'm
obliged to read that I also have a hotkey to send that text/html
part to Firefox for proper viewing when necessary.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: URLs in Mutt

2024-01-01 Thread Greg Wooledge
On Mon, Jan 01, 2024 at 11:42:59AM +0100, Nicolas George wrote:
> Greg Wooledge (12023-12-31):
> > Have your browser load THAT file.
> 
> Or just have this:
> 
> text/html; lynx -force_html -dump %s; copiousoutput
> 
> in your .mailcap file. Possibly along with:
> 
> auto_view text/html
> 
> in the .muttrc.

It's been my experience that the hyperlinks I'm meant to click are so
long that they wrap around the terminal width multiple times.  This
makes copy/pasting them tedious at best, and even then it still
sometimes fails for me.  (Either because I can't actually tell which
one I'm supposed to click, just from reading the lynx-dumped source,
or because there's some Javascript that has to be loaded first?)

Passing the entire text/html part to an actual web browser has been
what works best for me.

On the other hand, if I *don't* want to click anything, the lynx-dumped
source code usually gives me a nice synopsis of what the email is
trying to tell me.  So, it's still worth having, even if I don't
try to copy the URLs out of it manually.



Re: URLs in Mutt

2024-01-01 Thread Nicolas George
Greg Wooledge (12023-12-31):
> Have your browser load THAT file.

Or just have this:

text/html; lynx -force_html -dump %s; copiousoutput

in your .mailcap file. Possibly along with:

auto_view text/html

in the .muttrc.

Regards,

-- 
  Nicolas George



Re: URLs in Mutt

2024-01-01 Thread Michael Kjörling
On 31 Dec 2023 22:51 -0500, from pa...@quillandmouse.com (Paul M Foster):
> As a solution, I took that email from my mutt mail file and stripped out
> all the headers and non-HTML content. Then I fed that to my browser. Sorta
> worked. However, the button I was supposed to click didn't work properly.
> It attempted to retrieve a page it couldn't find. Digging deeper, I looked
> into the actual HTML file. Apparently, something was wrapping lines to
> about 75 characters, and putting an equals sign at the end of every line
> which had been wrapped. This apparently interfered with the browser
> correctly interpreting the HTML.

Install the urlview package, and then pass the mail text/html part to
urlview. (I think it'll accept a simple pipe input.) See urlview(1)
for details.

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: URLs in Mutt

2023-12-31 Thread Greg Marks
> Like everyone else, I get emails with links in them which need to be
> clicked to change passwords, verify identity and such. I was a loyal mutt
> user for years, but problems with URLs caused me to eventually change to
> claws-mail. Recently, I tweaked my mutt config, and URLs seemed to work
> better. So I switched back to mutt. All was fine until now. I got a
> critical email with links in it, and it wouldn't work.

In my opinion, being unable to inadvertently click on hyperlinks in
e-mail messages is a major security benefit of Mutt.  If you do want to
open a hyperlink without reading through the HTML source code, finding
the URL, and pasting it into a Web browser, you could include a line
in your .muttrc file such as the following:

   macro attach "\ef" "cat > 
/tmp/mutt_attachment_temporary_file.html ; /usr/bin/firefox 
/tmp/mutt_attachment_temporary_file.html"

Then, when viewing the e-mail in the Mutt pager, type "v" (without the
quotation marks), highlight the main text/html "attachment" (it should
be listed with "no description"), and type "Escape-f" (on my keyboard
"Escape" is the "Alt" key to the left of the space bar), and a copy of
the e-mail will open in Firefox.  You can then click on any hyperlinks
if you're sure they are safe.

Best regards,
Greg Marks


signature.asc
Description: PGP signature


Re: URLs in Mutt

2023-12-31 Thread Greg Wooledge
On Sun, Dec 31, 2023 at 10:51:25PM -0500, Paul M Foster wrote:
> Apparently, something was wrapping lines to
> about 75 characters, and putting an equals sign at the end of every line
> which had been wrapped.

This is "quoted-printable" encoding.  You need to use a properly decoded
version of the file, rather than the raw text.[1]

> As a solution, I took that email from my mutt mail file and stripped out
> all the headers and non-HTML content. Then I fed that to my browser.

If you received a correctly formatted email, it should contain one or more
parts, each of which is identified by a MIME Content-Type.  Pressing 'v'
while reading the message takes you to a page which shows you the parts
in a tree form.

Use the arrow keys to select the part you want to save (in this case, the
text/html one), and then save it to a file.  I use "foo.html" usually,
and just overwrite foo.html every time.

Have your browser load THAT file.

[1] The SMTP standard requires all transmitted lines to be 1000 characters
or less, and to contain only 7-bit ASCII characters.  Therefore, any
content which doesn't conform to these restrictions has to be encoded.
The two choices for encoding are quoted-printable, and base64.
Quoted-printable is nearly human-readable, and is more efficient if
there are relatively few 8-bit characters or long lines, so it's
a common choice.  Some MUAs will use q-p even on files that don't
*strictly* need it, just in case.



URLs in Mutt

2023-12-31 Thread Paul M Foster
Folks:

Like everyone else, I get emails with links in them which need to be
clicked to change passwords, verify identity and such. I was a loyal mutt
user for years, but problems with URLs caused me to eventually change to
claws-mail. Recently, I tweaked my mutt config, and URLs seemed to work
better. So I switched back to mutt. All was fine until now. I got a
critical email with links in it, and it wouldn't work. (I know, that's not
a great description.)

As a solution, I took that email from my mutt mail file and stripped out
all the headers and non-HTML content. Then I fed that to my browser. Sorta
worked. However, the button I was supposed to click didn't work properly.
It attempted to retrieve a page it couldn't find. Digging deeper, I looked
into the actual HTML file. Apparently, something was wrapping lines to
about 75 characters, and putting an equals sign at the end of every line
which had been wrapped. This apparently interfered with the browser
correctly interpreting the HTML.

One wrinkle here is that mail is fed to maildrop. In my config file for
this, there is only one line which messes with incoming mail:

xfilter "reformail -f1"

All this does is add a From if an email isn't properly formatted.

So my first question is, what is wrapping the lines on my incoming emails,
and how do I fix it?

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster