Nickolai writes:

>> Can you share the raw article of one of them (C-u g in the *Summary*)?
>> It sounds curious, but I don't think I have ever noticed an article
>> with empty body and attached plain text.
>
> Here it is. I e-mailed this example to myself.
>
> Return-Path: ...
> Received: ...
> From: ...
> To: ...
> Subject: Test message
> Date: Sun, 30 Nov 2025 20:50:21 +0100
> Message-ID:
> <87o6oj2tc2....@qustrxieql2mqe0rhrtcbvdmk1npdfyuhwg8h6chhv1t8docvcibllllbocy.dobrynin.net>
> MIME-Version: 1.0
> Content-Type: text/plain
> Content-Disposition: attachment; filename=attachment.txt
>
> This is an attachment.

Ah, so if there is no content, the attachment /becomes/ the body. I
tried the same as you, I think, and got:

== =
    Subject: Empty content, attached text/plain
    Date: Sun, 30 Nov 2025 21:27:58 +0100
    Message-ID: <[email protected]>
    User-Agent: Gnus/5.13 (Gnus v5.13)
    MIME-Version: 1.0
    Content-Type: text/plain
    Content-Disposition: attachment; filename=test.txt

    This is the content.
== =

And that is shown with no buttons - I guess because there is no
multipart.

Then I tried an email with content and attaching a text/plain file
again, which resulted in a button, and the email looking like this:

== =
    Subject: Line in body, attached text/plain
    Date: Sun, 30 Nov 2025 21:29:06 +0100
    Message-ID: <[email protected]>
    User-Agent: Gnus/5.13 (Gnus v5.13)
    MIME-Version: 1.0
    Content-Type: multipart/mixed; boundary="=-=-="

    --=-=-=
    Content-Type: text/plain
    Content-Disposition: attachment; filename=test.txt

    This is the content.

    --=-=-=
    Content-Type: text/plain

    This is the line in body

    --=-=-=--
== =

I guess a solution could be to try and improve
gnus-summary-save-article-body-file to automatically suggest the
filename from the Content-Disposition header, if there is one?

Perhaps one could change gnus-file-save-name, which defaults to
'gnus-numeric-save-name, to a function that looks at the header? I
can't really see how to get to the Content-Disposition: from there,
though.


  Best regards,

    Adam

-- 
 "Here comes my darling, saying hello you                   Adam Sjøgren
  Why you look so worried, whats a-wrong with you?"    [email protected]


Reply via email to