bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Katsumi Yamaoka
Subject: bug#23069: 25.1.50; in Gnus temporary browse files are always deleted
Date: Wed, 13 Jul 2016 17:42:39 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (i686-pc-cygwin)

On Mon, 11 Jul 2016 20:58:11 +0200, Ivan Kanis <ivan@kanis.fr> wrote:
> I have read again the documentation of gnus-article-browse-delete-temp.
> Here is the bit that interests me:

> "If nil, don't delete temporary files"

> I understand that if the variable is set to nil the temporary files
> should not be deleted.

I can understand it so, too.

> I am trying to keep those files so I am guessing the bit you quoted
> Reiner Steib will not help me.

;;; gnus-art.el ;;;
(defun gnus-article-browse-html-parts (list &optional header)
    [...]
    (add-hook 'gnus-summary-prepare-exit-hook
              'gnus-article-browse-delete-temp-files)
    (add-hook 'gnus-exit-gnus-hook
              (lambda  ()
                (gnus-article-browse-delete-temp-files t)))

These two hooks are what Reiner added over a decade ago, and
the last `t' forces it to delete temp files regardless of
`gnus-article-browse-delete-temp'.  I think there are three
ways to fix this issue:

1. Add a note, like the following, to the documentation of
   `gnus-article-browse-delete-temp':

   Note that temporary files will be deleted when exiting Gnus
   no matter what the value of this variable is.

2. Don't pass `t' to `gnus-article-browse-delete-temp-files'
   that `gnus-exit-gnus-hook' runs.

3. Don't add `gnus-article-browse-delete-temp-files' to
   `gnus-exit-gnus-hook'.

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

WDYT?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]