Discussion:
Long subject lines
David Woodfall
2018-08-19 02:17:58 UTC
Permalink
I sent a message with a rather long subject line earlier and it was
split into two lines.

Is there a way to avoid that? I tried setting tw=0 in an autocmd in
vim but it still got cut. I checked that tw was still set to 0, so I
assume that mutt cuts it before vim opens it.

Or is this a limitation of the RFC that subject lines need to be
under a certain length?

--

As usual, this being a 1.3.x release, I haven't even compiled this
kernel yet. So if it works, you should be doubly impressed.
-- Linus Torvalds, announcing kernel 1.3.3

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Mihai Lazarescu
2018-08-19 06:25:19 UTC
Permalink
Post by David Woodfall
Or is this a limitation of the RFC that subject lines need
to be under a certain length?
Yes, RFC 5322. Header lines cannot exceed 998 characters and
should be folded at less than 78 character per line:

https://tools.ietf.org/html/rfc5322#section-2.1.1

https://tools.ietf.org/html/rfc5322#section-2.2.3

Mihai
David Woodfall
2018-08-19 06:35:21 UTC
Permalink
On Sunday 19 August 2018 08:25,
Post by David Woodfall
Or is this a limitation of the RFC that subject lines need
to be under a certain length?
Yes, RFC 5322. Header lines cannot exceed 998 characters and should be folded at less than 78
https://tools.ietf.org/html/rfc5322#section-2.1.1
https://tools.ietf.org/html/rfc5322#section-2.2.3
Mihai
Thanks.

Dave

--

Go not unto the Usenet for advice, for you will be told both yea and nay (and
quite a few things that just have nothing at all to do with the question).
-- seen in a .sig somewhere

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Erik Christiansen
2018-08-19 06:52:47 UTC
Permalink
Post by David Woodfall
I sent a message with a rather long subject line earlier and it was
split into two lines.
OK, I'm a laggard, still on mutt 1.8.0, but when I compose a three-line
subject in vim¹, separated by newlines, it is visually _joined_ into a
single line on return to mutt. Sending it to myself, it is displayed as
three lines in mutt, but more compact than composed. That may just be
wrapping of the single line.

The only other MUA I have any familiarity with is ancient "mail", and it
shows the same for the received message.
Post by David Woodfall
Is there a way to avoid that? I tried setting tw=0 in an autocmd in
vim but it still got cut. I checked that tw was still set to 0, so I
assume that mutt cuts it before vim opens it.
Seeing three lines in vim being joined to one in mutt, I don't expect
vim settings to have much effect in the MUA.
Post by David Woodfall
Or is this a limitation of the RFC that subject lines need to be
under a certain length?
My simple experiments suggest that it's just mutt joining vim's multiple
lines into one, then wrapping that for useful display on receipt.

Erik

¹ edit_headers is set.
David Woodfall
2018-08-19 09:33:35 UTC
Permalink
On Sunday 19 August 2018 16:52,
Post by Erik Christiansen
Post by David Woodfall
I sent a message with a rather long subject line earlier and it was
split into two lines.
OK, I'm a laggard, still on mutt 1.8.0, but when I compose a three-line
subject in vim¹, separated by newlines, it is visually _joined_ into a
single line on return to mutt. Sending it to myself, it is displayed as
three lines in mutt, but more compact than composed. That may just be
wrapping of the single line.
The only other MUA I have any familiarity with is ancient "mail", and it
shows the same for the received message.
Post by David Woodfall
Is there a way to avoid that? I tried setting tw=0 in an autocmd in
vim but it still got cut. I checked that tw was still set to 0, so I
assume that mutt cuts it before vim opens it.
Seeing three lines in vim being joined to one in mutt, I don't expect
vim settings to have much effect in the MUA.
Post by David Woodfall
Or is this a limitation of the RFC that subject lines need to be
under a certain length?
My simple experiments suggest that it's just mutt joining vim's multiple
lines into one, then wrapping that for useful display on receipt.
Erik
¹ edit_headers is set.
It was kind of an xy problem really. My vim function that gets called
when I edit a message needs fixing for subjects of > 1 line. Or it
will drop me in insert mode after the first line, and the second and
any subsequent lines are under that.

Easy to fix anyway, but this is the first time that it's happened so
it was a bit of a surprise.

Dave

--

Never make any mistaeks.
-- Anonymous, in a mail discussion about to a kernel bug report

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Mihai Lazarescu
2018-08-19 11:58:12 UTC
Permalink
It was kind of an xy problem really. My vim function that
gets called when I edit a message needs fixing for subjects
of 1 line. Or it will drop me in insert mode after the first
line, and the second and any subsequent lines are under that.
Easy to fix anyway, but this is the first time that it's
happened so it was a bit of a surprise.
BTW, piping the message through "formail -c" would concatenate
continued fields in the header.

Mihai
David Woodfall
2018-08-19 13:57:20 UTC
Permalink
On Sunday 19 August 2018 13:58,
It was kind of an xy problem really. My vim function that
gets called when I edit a message needs fixing for subjects
of 1 line. Or it will drop me in insert mode after the first
line, and the second and any subsequent lines are under that.
Easy to fix anyway, but this is the first time that it's
happened so it was a bit of a surprise.
BTW, piping the message through "formail -c" would concatenate continued fields in
the header.
Mihai
Can I add a pipe to the editor command somehow, or how would I go
about it?

--

I'm telling you that the kernel is stable not because it's a kernel,
but because I refuse to listen to arguments like this.
-- Linus Torvalds

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Mihai Lazarescu
2018-08-19 16:38:35 UTC
Permalink
Post by David Woodfall
Post by Mihai Lazarescu
BTW, piping the message through "formail -c" would
concatenate continued fields in the header.
Can I add a pipe to the editor command somehow, or how would
I go about it?
I'd do the pipe in vim — you were using vim, right?
Something like:

autocmd BufRead /tmp/mutt-* silent! normal ggV}k!formail -fc^M}dd

where ^M is actually the ASCII 13 Ctrl-M (carriage return)
control character.

Mihai
David Woodfall
2018-08-20 01:03:03 UTC
Permalink
On Sunday 19 August 2018 18:38,
Post by Mihai Lazarescu
Post by David Woodfall
Post by Mihai Lazarescu
BTW, piping the message through "formail -c" would
concatenate continued fields in the header.
Can I add a pipe to the editor command somehow, or how would
I go about it?
autocmd BufRead /tmp/mutt-* silent! normal ggV}k!formail -fc^M}dd
where ^M is actually the ASCII 13 Ctrl-M (carriage return) control character.
Mihai
OK. Thanks.

Dave

--

'Mounting' is used for three things: climbing on a horse, linking in a
hard disk unit in data systems, and, well, mounting during sex.
-- Christa Keil

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
Continue reading on narkive:
Loading...