Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Wrong use of "path" in spam.el
Date: Tue, 26 Dec 2006 18:33:32 +0100	[thread overview]
Message-ID: <v9vejyh89f.fsf@marauder.physik.uni-ulm.de> (raw)

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/




             reply	other threads:[~2006-12-26 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-26 17:33 Reiner Steib [this message]
2006-12-27 13:53 ` Ted Zlatanov
2006-12-27 16:50   ` Reiner Steib
2006-12-27 19:24     ` Ted Zlatanov
2006-12-27 21:49       ` Reiner Steib
2006-12-27 23:31         ` Miles Bader
2006-12-28 14:57           ` Reiner Steib
2006-12-28 19:55         ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9vejyh89f.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).