Gnus development mailing list
 help / color / mirror / Atom feed
* Attachments broken since some time
@ 2020-05-15  7:39 Tassilo Horn
  2020-05-15  8:32 ` Adam Sjøgren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tassilo Horn @ 2020-05-15  7:39 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

Hi all,

for some time, running the current Emacs master and the Gnus version
coming with it, it seems that all attachments are broken for me.  Below
is a message from emacs-devel with a png image attachment.  I get a gnus
button but only a box is displayed (see screenshot).

[-- Attachment #2: Screenshot-20200515093440-926x840.png --]
[-- Type: image/png, Size: 111071 bytes --]

[-- Attachment #3: Type: text/plain, Size: 773 bytes --]


(I hope that attaching and Mail Forward still work...)

That seems to apply to all attachments.  For example, when a PDF file is
attached and I use gnus-article-save-part (o) on it to save it, the
result is a zero-byte file.  In other mail clients, the attachments are
displayed and get downloaded just fine.

It might very well be a configuration issue on my side, tho I haven't
changed those for years.

Any pointers and help for debugging is very welcome.

Bye,
Tassilo

-------------------- Start of forwarded message --------------------
Subject: Re: Consistent vanilla Emacs
To: Stefan Kangas <stefankangas@gmail.com>,
 "Nicolas P. Rougier" <nicolas.rougier@inria.fr>, emacs-devel@gnu.org
From: Dmitry Gutov <dgutov@yandex.ru>
Date: Fri, 15 May 2020 02:45:14 +0300


[-- Attachment #4.1: Type: text/plain, Size: 404 bytes --]

On 15.05.2020 01:44, Stefan Kangas wrote:
> One improvement which I believe only requires code changes is support
> for a "dark" theme.  It seems to me that a dark theme is the default for
> most editors these days, and N percent of our users prefer them.  See
> also Bug#11590.

I'm not a fan of those, but it seems fine over here if I choose a dark 
WM theme plus dark Emacs theme. See the attachment.

[-- Attachment #4.2: Type: image/png, Size: 0 bytes --]

[-- Attachment #5: Type: text/plain, Size: 67 bytes --]

-------------------- End of forwarded message --------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15  7:39 Attachments broken since some time Tassilo Horn
@ 2020-05-15  8:32 ` Adam Sjøgren
  2020-05-15  9:11 ` Andreas Schwab
  2020-05-24  6:38 ` Uwe Brauer
  2 siblings, 0 replies; 8+ messages in thread
From: Adam Sjøgren @ 2020-05-15  8:32 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Tassilo writes:

> for some time, running the current Emacs master and the Gnus version
> coming with it, it seems that all attachments are broken for me.  Below
> is a message from emacs-devel with a png image attachment.  I get a gnus
> button but only a box is displayed (see screenshot).

It works for me, see attached picture (haha):


[-- Attachment #2: attachment.png --]
[-- Type: image/png, Size: 156217 bytes --]

[-- Attachment #3: Type: text/plain, Size: 260 bytes --]


(Can also be found here: https://koldfront.dk/misc/gnus/attachment.png O:-))


  Best regards,

    Adam

-- 
 "En monoton vers behöver en stark refräng"                 Adam Sjøgren
                                                       asjo@koldfront.dk

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15  7:39 Attachments broken since some time Tassilo Horn
  2020-05-15  8:32 ` Adam Sjøgren
@ 2020-05-15  9:11 ` Andreas Schwab
  2020-05-15  9:50   ` Tassilo Horn
  2020-05-24  6:38 ` Uwe Brauer
  2 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2020-05-15  9:11 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: ding

On Mai 15 2020, Tassilo Horn wrote:

> for some time, running the current Emacs master and the Gnus version
> coming with it, it seems that all attachments are broken for me.  Below
> is a message from emacs-devel with a png image attachment.  I get a gnus
> button but only a box is displayed (see screenshot).

Does it also happen if you type C-d (gnus-summary-enter-digest-group)
and navigate through the parts?  Is the attachment unmangled in the raw
mail (C-u g)?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15  9:11 ` Andreas Schwab
@ 2020-05-15  9:50   ` Tassilo Horn
  2020-05-15 10:11     ` Robert Pluim
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2020-05-15  9:50 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: ding

Andreas Schwab <schwab@linux-m68k.org> writes:

>> for some time, running the current Emacs master and the Gnus version
>> coming with it, it seems that all attachments are broken for me.
>> Below is a message from emacs-devel with a png image attachment.  I
>> get a gnus button but only a box is displayed (see screenshot).
>
> Does it also happen if you type C-d (gnus-summary-enter-digest-group)
> and navigate through the parts?

Yes.

> Is the attachment unmangled in the raw mail (C-u g)?

Hm, apparently it seems those parts are indeed empty.

Ah, now I have it!  Some time back I added

  (nnimap-fetch-partial-articles "text/")

to all my nnimap select methods.  I've thought that would do what is
documented but also fetch those missing parts as soon as I actually read
such a mail.  Seems that's not the case. :-)

I think that's a bit unfortunate.  If at least the button would have
some indicator (undownloaded) or something alike...

Bye,
Tassilo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15  9:50   ` Tassilo Horn
@ 2020-05-15 10:11     ` Robert Pluim
  2020-05-15 14:14       ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2020-05-15 10:11 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Andreas Schwab, ding

>>>>> On Fri, 15 May 2020 11:50:14 +0200, Tassilo Horn <tsdh@gnu.org> said:

    Tassilo> Ah, now I have it!  Some time back I added

    Tassilo>   (nnimap-fetch-partial-articles "text/")

    Tassilo> to all my nnimap select methods.  I've thought that would do what is
    Tassilo> documented but also fetch those missing parts as soon as I actually read
    Tassilo> such a mail.  Seems that's not the case. :-)

    Tassilo> I think that's a bit unfortunate.  If at least the button would have
    Tassilo> some indicator (undownloaded) or something alike...

‘A C’
     If ‘<backend>-fetch-partial-articles’ is non-‘nil’, Gnus will fetch
     partial articles, if the backend it fetches them from supports it.
     Currently only ‘nnimap’ does.  If you’re looking at a partial
     article, and want to see the complete article instead, then the ‘A
     C’ command (‘gnus-summary-show-complete-article’) will do so.

although it would be nice if there was a visual indication.

Robert


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15 10:11     ` Robert Pluim
@ 2020-05-15 14:14       ` Tassilo Horn
  0 siblings, 0 replies; 8+ messages in thread
From: Tassilo Horn @ 2020-05-15 14:14 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Andreas Schwab, ding

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Fri, 15 May 2020 11:50:14 +0200, Tassilo Horn <tsdh@gnu.org> said:
>
>     Tassilo> Ah, now I have it!  Some time back I added
>
>     Tassilo>   (nnimap-fetch-partial-articles "text/")
>
>     Tassilo> to all my nnimap select methods.  I've thought that would do what is
>     Tassilo> documented but also fetch those missing parts as soon as I actually read
>     Tassilo> such a mail.  Seems that's not the case. :-)
>
>     Tassilo> I think that's a bit unfortunate.  If at least the button would have
>     Tassilo> some indicator (undownloaded) or something alike...
>
> ‘A C’
>      If ‘<backend>-fetch-partial-articles’ is non-‘nil’, Gnus will fetch
>      partial articles, if the backend it fetches them from supports it.
>      Currently only ‘nnimap’ does.  If you’re looking at a partial
>      article, and want to see the complete article instead, then the ‘A
>      C’ command (‘gnus-summary-show-complete-article’) will do so.
>
> although it would be nice if there was a visual indication.

The below does the job for me.  The button then reads

  [2. image/png (undownloaded, A C to fetch.)]

and the help-echo also mentions the A C command.

--8<---------------cut here---------------start------------->8---
modified   lisp/gnus/gnus-art.el
@@ -5833,6 +5833,7 @@ gnus-insert-mime-button
 	     "" "..."))
 	(gnus-tmp-length (with-current-buffer (mm-handle-buffer handle)
 			   (buffer-size)))
+        (help-echo "mouse-2: toggle the MIME part; down-mouse-3: more options")
 	gnus-tmp-type-long b e)
     (when (string-match ".*/" gnus-tmp-name)
       (setq gnus-tmp-name (replace-match "" t t gnus-tmp-name)))
@@ -5841,6 +5842,16 @@ gnus-insert-mime-button
 					  (concat "; " gnus-tmp-name))))
     (unless (equal gnus-tmp-description "")
       (setq gnus-tmp-type-long (concat " --- " gnus-tmp-type-long)))
+    (when (= 0 gnus-tmp-length)
+      (setq gnus-tmp-type-long
+            (concat
+             gnus-tmp-type-long
+             (substitute-command-keys
+              (concat "\\<gnus-summary-mode-map> (undownloaded, "
+                      "\\[gnus-summary-show-complete-article] to fetch.)"))))
+      (setq help-echo
+            (concat "Type \\[gnus-summary-show-complete-article] "
+                    "to download complete article. " help-echo)))
     (setq b (point))
     (gnus-eval-format
      gnus-mime-button-line-format gnus-mime-button-line-format-alist
@@ -5859,8 +5870,7 @@ gnus-insert-mime-button
      'keymap gnus-mime-button-map
      'face gnus-article-button-face
      'follow-link t
-     'help-echo
-     "mouse-2: toggle the MIME part; down-mouse-3: more options")))
+     'help-echo help-echo)))
 
 (defvar gnus-displaying-mime nil)
--8<---------------cut here---------------end--------------->8---

Any objections to pushing that change?  Honestly, I didn't find a way to
distinguish between "intentionally not downloaded" and "broken zero-byte
attachment", so A C with a mail with the latter will result in the same
button again, I guess.

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-15  7:39 Attachments broken since some time Tassilo Horn
  2020-05-15  8:32 ` Adam Sjøgren
  2020-05-15  9:11 ` Andreas Schwab
@ 2020-05-24  6:38 ` Uwe Brauer
  2020-05-24  7:26   ` Tassilo Horn
  2 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2020-05-24  6:38 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

>>> "TH" == Tassilo Horn <tsdh@gnu.org> writes:

> Hi all,
> for some time, running the current Emacs master and the Gnus version
> coming with it, it seems that all attachments are broken for me.  Below
> is a message from emacs-devel with a png image attachment.  I get a gnus
> button but only a box is displayed (see screenshot).

I can confirm this. I am using, because of a problem with signed and
encrypted smime message, GNU emacs master from august.

The strange thing is that text files, such as tex or matlab files work
fine, images, don't.

Uwe Brauer 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Attachments broken since some time
  2020-05-24  6:38 ` Uwe Brauer
@ 2020-05-24  7:26   ` Tassilo Horn
  0 siblings, 0 replies; 8+ messages in thread
From: Tassilo Horn @ 2020-05-24  7:26 UTC (permalink / raw)
  To: ding

Uwe Brauer <oub@mat.ucm.es> writes:

>> for some time, running the current Emacs master and the Gnus version
>> coming with it, it seems that all attachments are broken for me.
>> Below is a message from emacs-devel with a png image attachment.  I
>> get a gnus button but only a box is displayed (see screenshot).
>
> I can confirm this. I am using, because of a problem with signed and
> encrypted smime message, GNU emacs master from august.
>
> The strange thing is that text files, such as tex or matlab files work
> fine, images, don't.

Well, in my case it was the result of a configuration I did myself
without actually knowing what the consequences where.  I've set for my
nnimap select methods

(add-to-list 'gnus-secondary-select-methods
  '(nnimap "Fastmail"
    (nnimap-address "imap.fastmail.com")
    (nnimap-fetch-partial-articles "\\(text\\|image\\)/")))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

which means that Gnus won't download non-text and non-image parts.
However, the buttons will still be there, just the parts will be empty.
Before acting on them, you need to fetch the complete article using `A
C'.

In Emacs master, I enhanced that so that now the buttons read like

  [name --- type (not downloaded, A C to fetch.)]

for those parts.

Bye,
Tassilo


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-24  7:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  7:39 Attachments broken since some time Tassilo Horn
2020-05-15  8:32 ` Adam Sjøgren
2020-05-15  9:11 ` Andreas Schwab
2020-05-15  9:50   ` Tassilo Horn
2020-05-15 10:11     ` Robert Pluim
2020-05-15 14:14       ` Tassilo Horn
2020-05-24  6:38 ` Uwe Brauer
2020-05-24  7:26   ` Tassilo Horn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).