Subject: bug#23069: 25.1.50; in Gnus temporary browse files are always deleted

From: Katsumi Yamaoka <[email-masked]>
Date: Thu, 14 Jul 2016 08:27:55 +0900

On Wed, 13 Jul 2016 10:14:18 -0400, Ted Zlatanov wrote:
> On Wed, 13 Jul 2016 17:42:39 +0900 Katsumi Yamaoka <[email-masked]> wrote:
KY> 3. Don't add `gnus-article-browse-delete-temp-files' to
KY>    `gnus-exit-gnus-hook'.

KY> I vote for 3.
KY> `gnus-summary-prepare-exit-hook' is sufficient for those who
KY> want to delete temp files automatically, I think.

> I think it's much more common to want temporary files deleted by Gnus
> when it exits, than to keep them. By definition those files are
> transient.

Roger.  Ivan, here is a solution for you. :)

(defadvice gnus-article-browse-html-parts
    (after dont-delete-temp-files-when-gnus-exits activate)
  "Never delete temp files if `gnus-article-browse-delete-temp' is nil."
  (unless gnus-article-browse-delete-temp
    (remove-hook 'gnus-exit-gnus-hook
		 (byte-compile
		  (lambda ()
		    (gnus-article-browse-delete-temp-files t))))))

If it's ok, please close this bug.

Regards,