From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/12427 Path: main.gmane.org!not-for-mail From: Jari Aalto Newsgroups: gmane.emacs.gnus.general Subject: Qgnus 0.11 gnus-start.el (patch) -- compression support Date: 30 Sep 1997 18:10:14 +0300 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Tue_Sep_30_18:10:10_1997-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035151965 3735 80.91.224.250 (20 Oct 2002 22:12:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:12:45 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.7/8.8.7) with ESMTP id KAA00995 for ; Tue, 30 Sep 1997 10:44:49 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id MAA21125 for ; Tue, 30 Sep 1997 12:38:12 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Tue, 30 Sep 1997 17:52:23 +0200 Original-Received: (qmail 15969 invoked by uid 504); 30 Sep 1997 15:52:21 -0000 Original-Received: (qmail 15966 invoked from network); 30 Sep 1997 15:52:21 -0000 Original-Received: from ns11.nokia.com (131.228.6.230) by claymore.vcinet.com with SMTP; 30 Sep 1997 15:52:20 -0000 Original-Received: from axl01it (axl01it.ntc.nokia.com [131.228.118.232]) by ns11.nokia.com (8.8.5/8.6.9) with ESMTP id SAA06019 for ; Tue, 30 Sep 1997 18:11:32 +0300 (EET DST) Original-Received: from zeus.tele.nokia.fi (zeus.tele.nokia.fi [131.228.134.50]) by axl01it (8.8.5/8.6.9) with SMTP id SAA11283 for ; Tue, 30 Sep 1997 18:10:03 +0300 (EET DST) Original-Received: from pegasus.tele.nokia.fi (pegasus.ntc.nokia.com [131.228.169.148]) by zeus.tele.nokia.fi (8.6.4/8.6.4) with ESMTP id SAA08158 for ; Tue, 30 Sep 1997 18:07:59 +0300 Original-Received: (from jaalto@localhost) by pegasus.tele.nokia.fi (8.7.5/8.7.1) id SAA01687; Tue, 30 Sep 1997 18:10:15 +0300 (EETDST) Original-To: Original-Lines: 157 X-Mailer: Quassia Gnus v0.11/Emacs 19.34 Xref: main.gmane.org gmane.emacs.gnus.general:12427 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:12427 --Multipart_Tue_Sep_30_18:10:10_1997-1 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Tue_Sep_30_18:10:10_1997-1 Content-Type: text/plain; charset=US-ASCII .http://www.lysator.liu.se/~petli/elisp/elint.tar.gz . 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 --Multipart_Tue_Sep_30_18:10:10_1997-1 Content-Type: text/plain; charset=US-ASCII ** function gnus-strip-killed-list ** Wrong number of args: (string-match gnus-save-killed-list), (REGEXP STRING &optional START) ** top level expression ** Linting complete. --Multipart_Tue_Sep_30_18:10:10_1997-1 Content-Type: text/plain; charset=US-ASCII Content-Disposition: attachment; filename="tmp.diff" Content-Transfer-Encoding: 7bit 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))) --Multipart_Tue_Sep_30_18:10:10_1997-1--