From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64140 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Wrong use of "path" in spam.el Date: Tue, 26 Dec 2006 18:33:32 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167154525 14570 80.91.229.10 (26 Dec 2006 17:35:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Dec 2006 17:35:25 +0000 (UTC) Original-X-From: ding-owner+M12663@lists.math.uh.edu Tue Dec 26 18:35:24 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by dough.gmane.org with esmtp (Exim 4.50) id 1GzGCr-0002UF-Cu for ding-account@gmane.org; Tue, 26 Dec 2006 18:35:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1GzGBt-0006qH-83; Tue, 26 Dec 2006 11:34:17 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1GzGBr-0006pt-IS for ding@lists.math.uh.edu; Tue, 26 Dec 2006 11:34:15 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1GzGBk-0002Ml-Vk for ding@lists.math.uh.edu; Tue, 26 Dec 2006 11:34:15 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1GzGBk-0002Zw-00 for ; Tue, 26 Dec 2006 18:34:08 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GzGBe-0005cG-Un for ding@gnus.org; Tue, 26 Dec 2006 18:34:02 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Dec 2006 18:34:02 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Dec 2006 18:34:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 141 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:1u9TqTml4GD4yotFnrdWQBquRxk= X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64140 Archived-At: Hi, in GNU, we use the term "path" only for a list of directories to search, like the value of PATH. So we should *not* use "path" in in all those `spam-*-path' variables and doc strings. We should rename those variables to `spam-*-program' and mark the former as obsolete. I'm not 100% sure that it's a good idea to do this now (while Emacs 22 is in pretest), but OTOH spam.el was not part of Emacs 21 so it's probably better to do it now so that Emacs 22 will have the right names. Opinions? I've installed this change in v5-10 now. If people think that we should _not_ do this now, I will install it only in the trunk instead. Bye, Reiner. --8<---------------cut here---------------start------------->8--- --- spam.el 21 Mar 2006 12:54:04 +0100 6.146.2.18 +++ spam.el 26 Dec 2006 18:25:37 +0100 @@ -351,17 +351,21 @@ "Spam ifile configuration." :group 'spam) -(defcustom spam-ifile-path (executable-find "ifile") - "File path of the ifile executable program." +(defcustom spam-ifile-program (executable-find "ifile") + "Name of the ifile program." :type '(choice (file :tag "Location of ifile") (const :tag "ifile is not installed")) :group 'spam-ifile) +(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program) +;; "22.1" ;; Gnus 5.10.9 -(defcustom spam-ifile-database-path nil - "File path of the ifile database." +(defcustom spam-ifile-database nil + "File name of the ifile database." :type '(choice (file :tag "Location of the ifile database") (const :tag "Use the default")) :group 'spam-ifile) +(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database) +;; "22.1" ;; Gnus 5.10.9 (defcustom spam-ifile-spam-category "spam" "Name of the spam ifile category." @@ -386,11 +390,13 @@ "Spam bogofilter configuration." :group 'spam) -(defcustom spam-bogofilter-path (executable-find "bogofilter") - "File path of the Bogofilter executable program." +(defcustom spam-bogofilter-program (executable-find "bogofilter") + "Name of the Bogofilter program." :type '(choice (file :tag "Location of bogofilter") (const :tag "Bogofilter is not installed")) :group 'spam-bogofilter) +(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program) +;; "22.1" ;; Gnus 5.10.9 (defcustom spam-bogofilter-header "X-Bogosity" "The header that Bogofilter inserts in messages." @@ -423,7 +429,8 @@ :group 'spam-bogofilter) (defcustom spam-bogofilter-database-directory nil - "Directory path of the Bogofilter databases." + "Location of the Bogofilter database. +When nil, use the default location." :type '(choice (directory :tag "Location of the Bogofilter database directory") (const :tag "Use the default")) @@ -434,8 +441,8 @@ :group 'spam) (defcustom spam-spamoracle-database nil - "Location of spamoracle database file. When nil, use the default -spamoracle database." + "Location of spamoracle database file. +When nil, use the default spamoracle database." :type '(choice (directory :tag "Location of spamoracle database file.") (const :tag "Use the default")) :group 'spam-spamoracle) @@ -1370,11 +1377,12 @@ ;;; check the ifile backend; return nil if the mail was NOT classified ;;; as spam + (defun spam-get-ifile-database-parameter () - "Get the command-line parameter for ifile's database from - spam-ifile-database-path." - (if spam-ifile-database-path - (format "--db-file=%s" spam-ifile-database-path) + "Return the command-line parameter for ifile's database. +See `spam-ifile-database'." + (if spam-ifile-database + (format "--db-file=%s" spam-ifile-database) nil)) (defun spam-check-ifile () @@ -1390,7 +1398,7 @@ (save-excursion (set-buffer article-buffer-name) (apply 'call-process-region - (point-min) (point-max) spam-ifile-path + (point-min) (point-max) spam-ifile-program nil temp-buffer-name nil "-c" (if db-param `(,db-param "-q") `("-q")))) ;; check the return now (we're back in the temp buffer) @@ -1418,7 +1426,7 @@ (when (stringp article-string) (insert article-string)))) (apply 'call-process-region - (point-min) (point-max) spam-ifile-path + (point-min) (point-max) spam-ifile-program nil nil nil add-or-delete-option category (if db `(,db "-h") `("-h")))))) @@ -1702,7 +1710,7 @@ (set-buffer article-buffer-name) (apply 'call-process-region (point-min) (point-max) - spam-bogofilter-path + spam-bogofilter-program nil temp-buffer-name nil (if db `("-d" ,db "-v") `("-v")))) (setq return (spam-check-bogofilter-headers score)))) @@ -1728,7 +1736,7 @@ (apply 'call-process-region (point-min) (point-max) - spam-bogofilter-path + spam-bogofilter-program nil nil nil switch (if db `("-d" ,db "-v") `("-v")))))))) --8<---------------cut here---------------end--------------->8--- -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/