Hi,

I can only reproduce [1.5.21] this "behavior" (not a bug) /if/ I don't
leave a blank line after the headers (which is an RFC; you have to
separate the headers from body with a blank line).

By using "edit_headers" you gain that responsibility to put a blank line
after the headers.

Other than "the blank line" there is NO way mutt can detect whether the
line is part of the header or body.

Sinan.

(18/12/2013 08:09) Mutt:

>#3673: when $edit_headers is set, mutt mangles first-line URLs in the message
>body.
>------------------------+----------------------
> Reporter:  balderdash  |      Owner:  mutt-dev
>     Type:  defect      |     Status:  new
> Priority:  major       |  Milestone:
>Component:  mutt        |    Version:  1.5.22
> Keywords:              |
>------------------------+----------------------
> There is a bug in mutt, latest head, OSX 10.9.  (I suspect it's been
> around for ages, but I've only just now found semi-proof that it's a bug).
>
> To reproduce, make sure that edit_headers is set to "yes".
>
> Then compose a message, wherein the very first line after the last header
> shown in the editor is a web URL, like `http://www.mutt.org`.
>
> Quit the editor.  Now hit 'e' to bring it back up.  Notice that mutt has
> garbled the URL so that the first part is now `'http: //'` as opposed to
> `'http://'`.
>
> Now hit 'q' to go back the compose menu.  Now hit return to view your text
> "attachment".  You'll see that mutt is displaying it as if it's empty.
> Probably this is because mutt is treating the `'http: '` as the name of a
> header and the remainder of the URL as the header content.
>
> (If you send this message to yourself and view it in mutt, you will appear
> to have a body-less message).
>
> Notice that if instead you start over with "set noedit_headers" in effect,
> there is no such bug.
>
> I'm guessing the source of the problem is mutt's converting
>
> `'http://www.mutt.org'` into
>
> `'http: //www.mutt.org'`.
>
> Once it's been (wrongfully) converted, mutt is behaving as it should.  The
> conversion's what needs to be fixed when $edit_headers is set.
>
> Possibly it would suffice to make mutt look for a space after the first
> colon.  Since `'http://www.mutt.org'` has no such space, mutt should not
> believe it to be a header and thus insert a space.  If you instead
> purposely make the first line after the real headers read "Attach: blah",
> then the space will tip mutt off that it's supposed to be a header.
>
> I bet this bug has been around forever, because I've sent colleagues
> messages starting with links and they reply that no URL was present.  This
> has happened too many times for it to just be me being forgetful!

Reply via email to