Gnus development mailing list
 help / color / mirror / Atom feed
* Qgnus 0.11 gnus-start.el (patch) -- compression support
@ 1997-09-30 15:10 Jari Aalto
  1997-09-30 16:34 ` Lars Balker Rasmussen
  0 siblings, 1 reply; 2+ messages in thread
From: Jari Aalto @ 1997-09-30 15:10 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 596 bytes --]



	Hi,

	I have an account where I'm real tight on disk space. My quota
	limit makes me be on my toes every time I open gnus and it
	saves the huge .newrc or .newsrc.el

	The following patch adds new variable

		gnus-startup-file-compress-extension

	Which is by default "" and lets gnus to work as usual. It can be
	set to ".gz" or ".Z" or anything the jka-comp understands. And
	voila! Now Gnus saves lot of space!

	There was also some problem according to Elint.el 1.10, that I
	tried to correct by using (car list). Would you check that it
	really was the right correction.

	Cheers!
	jari


[-- Attachment #2: Type: text/plain, Size: 361 bytes --]

        .http://www.lysator.liu.se/~petli/elisp/elint.tar.gz
        .<petli@lysator.liu.se>         Peter Liljenberg

        ...Now I've finished a new version of elint, an Elisp
        linter. The most important improvement is that it now knows about
        standard variables, and it should work not only with 19.34, but
        also at least with 19.28


[-- Attachment #3: Type: text/plain, Size: 178 bytes --]


** function gnus-strip-killed-list **
Wrong number of args: (string-match gnus-save-killed-list), (REGEXP STRING &optional START)

** top level expression **

Linting complete.

[-- Attachment #4: tmp.diff --]
[-- Type: text/plain, Size: 3518 bytes --]

Prereq: 11.0

===================================================================
RCS file: RCS/gnus-start.el,v
retrieving revision 11.0
retrieving revision 11.0.1.1
diff -ubw -r11.0 -r11.0.1.1
--- 11.0	1997/09/30 14:33:41
+++ 11.0.1.1	1997/09/30 14:48:55
@@ -34,6 +34,11 @@
 (require 'message)
 (eval-when-compile (require 'cl))
 
+
+(defvar gnus-startup-file-compress-extension ""
+  "If you want to use compressed .newsrc.eld.gz; set this to \".gz\".")
+
+
 (defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc")
   "Your `.newsrc' file.
 `.newsrc-SERVER' will be used instead if that exists."
@@ -1075,7 +1080,11 @@
   (if (or (> (length gnus-newsrc-alist) 1)
 	  (file-exists-p gnus-startup-file)
 	  (file-exists-p (concat gnus-startup-file ".el"))
-	  (file-exists-p (concat gnus-startup-file ".eld")))
+	  (file-exists-p (concat gnus-startup-file ".eld"))
+	  (file-exists-p (concat gnus-startup-file
+				 ".eld"
+				 gnus-startup-file-compress-extension))
+	  )
       nil
     (gnus-message 6 "First time user; subscribing you to default groups")
     (unless (gnus-read-active-file-p)
@@ -1827,8 +1836,12 @@
       (when (and (file-exists-p gnus-current-startup-file)
 		 (or force
 		     (and (file-newer-than-file-p newsrc-file quick-file)
-			  (file-newer-than-file-p newsrc-file
-						  (concat quick-file "d")))
+			  (file-newer-than-file-p
+			   newsrc-file
+			   (concat
+			    quick-file "d"
+			    gnus-startup-file-compress-extension
+			    )))
 		     (not gnus-newsrc-alist)))
 	;; We read the .newsrc file.  Note that if there if a
 	;; .newsrc.eld file exists, it has already been read, and
@@ -1875,7 +1888,7 @@
 		   (gnus-uncompress-range ticked)))))))))
 
 (defun gnus-read-newsrc-el-file (file)
-  (let ((ding-file (concat file "d")))
+  (let ((ding-file (concat file "d" gnus-startup-file-compress-extension)))
     ;; We always, always read the .eld file.
     (gnus-message 5 "Reading %s..." ding-file)
     (let (gnus-newsrc-assoc)
@@ -1955,10 +1968,19 @@
   "Make server dependent file name by catenating FILE and server host name."
   (let* ((file (expand-file-name file nil))
 	 (real-file (concat file "-" (nth 1 gnus-select-method))))
-    (if (or (file-exists-p real-file)
+     (cond
+      ((file-exists-p (concat real-file ".el"
+			      gnus-startup-file-compress-extension))
+       (concat real-file  ".el" gnus-startup-file-compress-extension))
+      ((file-exists-p (concat file gnus-startup-file-compress-extension))
+       (concat file gnus-startup-file-compress-extension))
+      ((or (file-exists-p real-file)
 	    (file-exists-p (concat real-file ".el"))
 	    (file-exists-p (concat real-file ".eld")))
-	real-file file)))
+       real-file)
+      (t
+       file
+       ))))
 
 (defun gnus-newsrc-to-gnus-format ()
   (setq gnus-newsrc-options "")
@@ -2232,7 +2254,9 @@
 	  (make-local-variable 'version-control)
 	  (setq version-control 'never)
 	  (setq buffer-file-name
-		(concat gnus-current-startup-file ".eld"))
+		(concat gnus-current-startup-file ".eld"
+			gnus-startup-file-compress-extension
+			))
 	  (setq default-directory (file-name-directory buffer-file-name))
 	  (gnus-add-current-to-buffer-list)
 	  (buffer-disable-undo (current-buffer))
@@ -2284,7 +2308,7 @@
   (let ((list gnus-killed-list)
 	olist)
     (while list
-      (when (string-match gnus-save-killed-list)
+      (when (string-match gnus-save-killed-list (car list))
 	(push (car list) olist))
       (pop list))
     (nreverse olist)))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Qgnus 0.11 gnus-start.el (patch) -- compression support
  1997-09-30 15:10 Qgnus 0.11 gnus-start.el (patch) -- compression support Jari Aalto
@ 1997-09-30 16:34 ` Lars Balker Rasmussen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Balker Rasmussen @ 1997-09-30 16:34 UTC (permalink / raw)


Jari Aalto <jari.aalto@ntc.nokia.com> writes:
> 	I have an account where I'm real tight on disk space. My quota
> 	limit makes me be on my toes every time I open gnus and it
> 	saves the huge .newrc or .newsrc.el

"Huge"?

/users/lbr-odin% ll .news*
-rw-------   1 lbr      staff         901 Sep 30 18:30 .newsrc
-rw-------   1 lbr      staff       10473 Sep 30 18:30 .newsrc.eld
-rw-------   1 lbr      staff       10294 Sep 30 18:20 .newsrc.eld~
-rw-------   1 lbr      staff         726 Sep 30 18:20 .newsrc~

How?

(setq
 ;; ask news server for new groups...
 gnus-check-new-newsgroups	nil

 ;; ...so don't keep a list of the killed ones...
 gnus-save-killed-list		nil

 ;; ...and kill the zombies generated because of this before we save 
 gnus-save-newsrc-hook		'gnus-group-kill-all-zombies
)

Don't save it if you don't want it!
-- 
Lars Balker Rasmussen, Software Engineer, Mjolner Informatics ApS
lbr@mjolner.dk


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-30 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-30 15:10 Qgnus 0.11 gnus-start.el (patch) -- compression support Jari Aalto
1997-09-30 16:34 ` Lars Balker Rasmussen

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).