Gnus development mailing list
 help / color / mirror / Atom feed
* 0.53 feature enhancement for gnus-uu, patch included
@ 1996-11-02 19:30 Randal Schwartz
  0 siblings, 0 replies; only message in thread
From: Randal Schwartz @ 1996-11-02 19:30 UTC (permalink / raw)


[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: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-11-02 19:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-02 19:30 0.53 feature enhancement for gnus-uu, patch included Randal Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).