;;; gnus-uu.el --- extract (uu)encoded files in Gnus
-;; Copyright (C) 1985-1987, 1993-1998, 2000-2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1993-1998, 2000-2014 Free Software
+;; Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Created: 2 Oct 1993
:group 'gnus)
(defgroup gnus-extract-view nil
- "Viewwing extracted files."
+ "Viewing extracted files."
:group 'gnus-extract)
(defgroup gnus-extract-archive nil
(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))
(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)))
(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)
(let ((level (gnus-summary-thread-level)))
(while (and (gnus-summary-set-process-mark
(gnus-summary-article-number))
- (zerop (gnus-summary-next-subject 1 nil t))
+ (zerop (forward-line 1))
(> (gnus-summary-thread-level) level)))))
(gnus-summary-position-point))
(let ((level (gnus-summary-thread-level)))
(while (and (gnus-summary-remove-process-mark
(gnus-summary-article-number))
- (zerop (gnus-summary-next-subject 1))
+ (zerop (forward-line 1))
(> (gnus-summary-thread-level) level))))
(gnus-summary-position-point))
;; All PostScript functions written by Erik Selberg <speed@cs.washington.edu>.
(defun gnus-uu-decode-postscript (&optional n)
- "Gets postscript of the current article."
+ "Gets PostScript of the current article."
(interactive "P")
(gnus-uu-decode-with-method 'gnus-uu-decode-postscript-article n))
(gnus-uu-decode-postscript n)))
(defun gnus-uu-decode-postscript-and-save (n dir)
- "Extracts postscript and saves the current article."
+ "Extracts PostScript and saves the current article."
(interactive
(list current-prefix-arg
(file-name-as-directory
;; the process-function has been successful and nil otherwise.
(defun gnus-uu-grab-articles (articles process-function
&optional sloppy limit no-errors)
+ (require 'gnus-async)
(let ((state 'first)
(gnus-asynchronous nil)
(gnus-inhibit-treatment t)
gnus-shell-command-separator " sh")))))
state))
-;; Returns the name of what the shar file is going to unpack.
-(defun gnus-uu-find-name-in-shar ()
- (let ((oldpoint (point))
- res)
- (goto-char (point-min))
- (when (re-search-forward gnus-uu-shar-name-marker nil t)
- (setq res (buffer-substring (match-beginning 1) (match-end 1))))
- (goto-char oldpoint)
- res))
-
;; `gnus-uu-choose-action' chooses what action to perform given the name
;; and `gnus-uu-file-action-list'. Returns either nil if no action is
;; found, or the name of the command to run if such a rule is found.
;; 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