Gnus development mailing list
 help / color / mirror / Atom feed
* Wrong use of "path" in spam.el
@ 2006-12-26 17:33 Reiner Steib
  2006-12-27 13:53 ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2006-12-26 17:33 UTC (permalink / 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/




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

* Re: Wrong use of "path" in spam.el
  2006-12-26 17:33 Wrong use of "path" in spam.el Reiner Steib
@ 2006-12-27 13:53 ` Ted Zlatanov
  2006-12-27 16:50   ` Reiner Steib
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2006-12-27 13:53 UTC (permalink / raw)


On 26 Dec 2006, reinersteib+gmane@imap.cc wrote:

> 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'm OK with that.  Since the old variable names will work today, I
expect the support issues to be minimal.  But the manual will also
have to be updated, and we need to check with the Emacs maintainers
regarding the 22 prerelease.

Ted



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

* Re: Wrong use of "path" in spam.el
  2006-12-27 13:53 ` Ted Zlatanov
@ 2006-12-27 16:50   ` Reiner Steib
  2006-12-27 19:24     ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2006-12-27 16:50 UTC (permalink / raw)


On Wed, Dec 27 2006, Ted Zlatanov wrote:

> On 26 Dec 2006, reinersteib+gmane@imap.cc wrote:
>> [...] `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'm OK with that.  Since the old variable names will work today, I
> expect the support issues to be minimal.  

Maybe we should better use `defvaralias' instead of
`make-obsolete-variable'?  I wasn't sure which one is more suitable
here.

> But the manual will also have to be updated,

AFAICS, it's only the following change (installed in v5-10):

--8<---------------cut here---------------start------------->8---
--- gnus.texi	26 Dec 2006 19:10:32 +0100	6.603.2.107
+++ gnus.texi	27 Dec 2006 17:38:39 +0100	
@@ -23952,7 +23952,7 @@
 the default value of @samp{spam}.
 @end defvar
 
-@defvar spam-ifile-database-path
+@defvar spam-ifile-database
 
 This is the filename for the ifile database.  It is not specified by
 default, so ifile will use its own default database name.
--8<---------------cut here---------------end--------------->8---

> and we need to check with the Emacs maintainers regarding the 22
> prerelease.

The changes will automatically be included in the next pretest after
Miles next sync.  Do you have something else in mind?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Wrong use of "path" in spam.el
  2006-12-27 16:50   ` Reiner Steib
@ 2006-12-27 19:24     ` Ted Zlatanov
  2006-12-27 21:49       ` Reiner Steib
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2006-12-27 19:24 UTC (permalink / raw)


On 27 Dec 2006, reinersteib+gmane@imap.cc wrote:

On Wed, Dec 27 2006, Ted Zlatanov wrote: 
> On 26 Dec 2006, reinersteib+gmane@imap.cc wrote:
>>> [...] `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'm OK with that.  Since the old variable names will work today, I
>> expect the support issues to be minimal.  
>
> Maybe we should better use `defvaralias' instead of
> `make-obsolete-variable'?  I wasn't sure which one is more suitable
> here.

I'm OK with either; I don't know the right one though.

>> But the manual will also have to be updated,
>
> AFAICS, it's only the following change (installed in v5-10):
> --- gnus.texi	26 Dec 2006 19:10:32 +0100	6.603.2.107
> +++ gnus.texi	27 Dec 2006 17:38:39 +0100	
> @@ -23952,7 +23952,7 @@
> the default value of @samp{spam}.
> @end defvar
>
> -@defvar spam-ifile-database-path
> +@defvar spam-ifile-database
>
> This is the filename for the ifile database.  It is not specified by
> default, so ifile will use its own default database name.

OK, I thought there were more.  Sorry.

>> and we need to check with the Emacs maintainers regarding the 22
>> prerelease.
>
> The changes will automatically be included in the next pretest after
> Miles next sync.  Do you have something else in mind?

That was all, I didn't know if we need to ask before making such
changes since they are not really bug fixes.

Ted



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

* Re: Wrong use of "path" in spam.el
  2006-12-27 19:24     ` Ted Zlatanov
@ 2006-12-27 21:49       ` Reiner Steib
  2006-12-27 23:31         ` Miles Bader
  2006-12-28 19:55         ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Reiner Steib @ 2006-12-27 21:49 UTC (permalink / raw)


On Wed, Dec 27 2006, Ted Zlatanov wrote:

> On 27 Dec 2006, reinersteib+gmane@imap.cc wrote:
>> Maybe we should better use `defvaralias' instead of
>> `make-obsolete-variable'?  I wasn't sure which one is more suitable
>> here.
>
> I'm OK with either; I don't know the right one though.

I changed it to use define-obsolete-variable-alias' now:

,----[ (info "(elisp)Variable Aliases") ]
|    Variable aliases are convenient for replacing an old name for a
| variable with a new name.  `make-obsolete-variable' declares that the
| old name is obsolete and therefore that it may be removed at some stage
| in the future.
| [...]
|    You can make two variables synonyms and declare one obsolete at the
| same time using the macro `define-obsolete-variable-alias'.
`----

We can't use the argument WHEN, because XEmacs 21.4 doesn't support
it.

> That was all, I didn't know if we need to ask before making such
> changes since they are not really bug fixes.

I'm quite sure that non-conformance to GNU standards counts as a bug
in Richard's opinion.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Wrong use of "path" in spam.el
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Miles Bader @ 2006-12-27 23:31 UTC (permalink / raw)


BTW, I've merged those spam.el changes from 5.10 into the Gnus trunk,
but there are other variables using the incorrect "-path" suffix in the
version of spam.el which is in the Gnus trunk.  Someone should fix those
up too.

-Miles

-- 
The automobile has not merely taken over the street, it has dissolved the
living tissue of the city.  Its appetite for space is absolutely insatiable;
moving and parked, it devours urban land, leaving the buildings as mere islands
of habitable space in a sea of dangerous and ugly traffic.
[James Marston Fitch, New York Times, 1 May 1960]




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

* Re: Wrong use of "path" in spam.el
  2006-12-27 23:31         ` Miles Bader
@ 2006-12-28 14:57           ` Reiner Steib
  0 siblings, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2006-12-28 14:57 UTC (permalink / raw)


On Thu, Dec 28 2006, Miles Bader wrote:

> BTW, I've merged those spam.el changes from 5.10 into the Gnus trunk,

The use of define-obsolete-variable-alias was not merged to the trunk
yet.  I've done so now.

Could you please also sync from v5-10 to Emacs soon?

> but there are other variables using the incorrect "-path" suffix in the
> version of spam.el which is in the Gnus trunk.  Someone should fix those
> up too.

Done.  Thanks for pointing this out.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Wrong use of "path" in spam.el
  2006-12-27 21:49       ` Reiner Steib
  2006-12-27 23:31         ` Miles Bader
@ 2006-12-28 19:55         ` Reiner Steib
  1 sibling, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2006-12-28 19:55 UTC (permalink / raw)


On Wed, Dec 27 2006, Reiner Steib wrote:

> I changed it to use define-obsolete-variable-alias' now:
>
> ,----[ (info "(elisp)Variable Aliases") ]

I checked for compatibility with XEmacs 21.4, but didn't check Emacs
21: Alas, Emacs 21 doesn't have define-obsolete-variable-alias' (and
`defvaralias').  So I'll switched back to `make-obsolete-variable'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

end of thread, other threads:[~2006-12-28 19:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-26 17:33 Wrong use of "path" in spam.el Reiner Steib
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

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