Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,  ding@gnus.org
Subject: Re: Attachments broken since some time
Date: Fri, 15 May 2020 16:14:16 +0200	[thread overview]
Message-ID: <87y2ptxp3b.fsf@gnu.org> (raw)
In-Reply-To: <m2pnb5y0bh.fsf@gmail.com> (Robert Pluim's message of "Fri, 15 May 2020 12:11:46 +0200")

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



  reply	other threads:[~2020-05-15 14:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  7:39 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 [this message]
2020-05-24  6:38 ` Uwe Brauer
2020-05-24  7:26   ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2ptxp3b.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=ding@gnus.org \
    --cc=rpluim@gmail.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).