]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/gnus/gnus-uu.el: Fix temporary files deletion bug
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 19 Dec 2013 04:41:35 +0000 (04:41 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 19 Dec 2013 04:41:35 +0000 (04:41 +0000)
lisp/gnus/ChangeLog
lisp/gnus/gnus-uu.el

index fb5b85356cde6b44afb50a225343168ec027222a..93abbde3bef18352d4dcf3a0f2aeb043623d89a1 100644 (file)
@@ -1,3 +1,12 @@
+2013-12-18  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-uu.el (gnus-uu-decode-binhex, gnus-uu-decode-binhex-view):
+       Make sure work directory exists.
+       (gnus-uu-digest-mail-forward): Store temporary files in work directory
+       rather than tmp directory.
+       (gnus-summary-prepare-exit-hook): Replace gnus-exit-group-hook, that is
+       not necessarily always run, with it.
+
 2013-12-18  Jan Tatarik  <jan.tatarik@gmail.com>
 
        * gnus-icalendar.el (gnus-icalendar-identities): Make changing the
index 16ed4f178019d83288ac8bb562edd19ba7d99534..0182361e6f329745cd20f8c79658a93fdfc2028d 100644 (file)
@@ -406,6 +406,7 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
          (read-directory-name "Unbinhex and save in dir: "
                          gnus-uu-default-dir
                          gnus-uu-default-dir))))
+  (gnus-uu-initialize)
   (setq gnus-uu-binhex-article-name
        (mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
   (gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
@@ -471,6 +472,7 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
    (list current-prefix-arg
         (read-file-name "Unbinhex, view and save in dir: "
                         gnus-uu-default-dir gnus-uu-default-dir)))
+  (gnus-uu-initialize)
   (setq gnus-uu-binhex-article-name
        (mm-make-temp-file (expand-file-name "binhex" gnus-uu-work-dir)))
   (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
@@ -482,8 +484,9 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
 (defun gnus-uu-digest-mail-forward (&optional n post)
   "Digests and forwards all articles in this series."
   (interactive "P")
+  (gnus-uu-initialize)
   (let ((gnus-uu-save-in-digest t)
-       (file (mm-make-temp-file (nnheader-concat gnus-uu-tmp-dir "forward")))
+       (file (mm-make-temp-file (nnheader-concat gnus-uu-work-dir "forward")))
        (message-forward-as-mime message-forward-as-mime)
        (mail-parse-charset gnus-newsgroup-charset)
        (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)
@@ -1836,8 +1839,8 @@ Gnus might fail to display all of it.")
 
 ;; Initializing
 
-(add-hook 'gnus-exit-group-hook 'gnus-uu-clean-up)
-(add-hook 'gnus-exit-group-hook        'gnus-uu-delete-work-dir)
+(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-clean-up)
+(add-hook 'gnus-summary-prepare-exit-hook 'gnus-uu-delete-work-dir)
 
 \f