From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/8580 Path: main.gmane.org!not-for-mail From: Randal Schwartz Newsgroups: gmane.emacs.gnus.general Subject: 0.53 feature enhancement for gnus-uu, patch included Date: 02 Nov 1996 12:30:42 -0700 Sender: merlyn@cscaper.com Message-ID: <8cramc5m71.fsf@gadget.cscaper.com> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148727 13001 80.91.224.250 (20 Oct 2002 21:18:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:18:47 +0000 (UTC) Return-Path: Original-Received: (qmail 21603 invoked from smtpd); 2 Nov 1996 19:43:36 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by deanna.miranova.com with SMTP; 2 Nov 1996 19:43:35 -0000 Original-Received: from nander.cscaper.com (nander.cscaper.com [206.67.186.1]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sat, 2 Nov 1996 20:30:48 +0100 Original-Received: from gadget.cscaper.com (gadget.cscaper.com [206.67.186.3]) by nander.cscaper.com (8.7.1/8.7.1) with SMTP id MAA27732 for ; Sat, 2 Nov 1996 12:30:52 -0700 (MST) Original-Received: by gadget.cscaper.com (SMI-8.6/SMI-SVR4) id MAA08915; Sat, 2 Nov 1996 12:30:42 -0700 Original-To: ding@ifi.uio.no Original-Lines: 102 X-Mailer: Red Gnus v0.53/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:8580 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:8580 [also sent to gnus-bug] I got tired of being asked all those goshdurned questions when I was decoding the last week's worth of alt.binaries.pictures.monolith.stonehenge, so I created a new variable. I *did not* patch the texi, though. --- gnus-uu.el-ORIG Fri Oct 11 03:07:39 1996 +++ gnus-uu.el Sat Nov 2 09:45:30 1996 @@ -234,6 +234,11 @@ (defvar gnus-uu-save-separate-articles nil "*Non-nil means that gnus-uu will save articles in separate files.") +(defvar gnus-uu-be-dangerous 'ask + "*Specifies what to do if unusual situations arise during decoding. +If nil, be as conservative as possible. If t, ignore things that +didn't work, and overwrite existing files. Otherwise, ask each time.") + ;; Internal variables (defvar gnus-uu-saved-article-name nil) @@ -718,7 +723,9 @@ (gnus-make-directory (concat dir fromdir)) (setq to-file (concat dir fromdir)) (when (or (not (file-exists-p to-file)) - (gnus-y-or-n-p (format "%s exists; overwrite? " to-file))) + (eq gnus-uu-be-dangerous t) + (and gnus-uu-be-dangerous + (gnus-y-or-n-p (format "%s exists; overwrite? " to-file)))) (copy-file file to-file t t))))) (gnus-message 5 "Saved %d file%s" len (if (= len 1) "" "s")))) @@ -1185,9 +1192,11 @@ ;; file was unsuccessfully decoded, so we delete it. (when (and result-file (file-exists-p result-file) - (gnus-y-or-n-p - (format "Delete unsuccessfully decoded file %s" - result-file))) + (not gnus-uu-be-dangerous) + (or (eq gnus-uu-be-dangerous t) + (gnus-y-or-n-p + (format "Delete unsuccessfully decoded file %s" + result-file)))) (delete-file result-file))) (when (memq 'begin process-state) (setq result-file (car process-state))) @@ -1224,7 +1233,9 @@ (not (memq 'end process-state)) result-file (file-exists-p result-file) - (gnus-y-or-n-p (format "Delete incomplete file %s? " result-file)) + (not gnus-uu-be-dangerous) + (or (eq gnus-uu-be-dangerous t) + (gnus-y-or-n-p (format "Delete incomplete file %s? " result-file))) (delete-file result-file)) ;; If this was a file of the wrong sort, then -- Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095 Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying Email: Snail: (Call) PGP-Key: (finger merlyn@ora.com) Web: My Home Page! Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me