Gnus development mailing list
 help / color / mirror / Atom feed
* ":version" entries in defcustoms
@ 2004-09-19 20:26 Reiner Steib
  2004-09-19 22:29 ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2004-09-19 20:26 UTC (permalink / raw)


Hi,

I went through lisp/ChangeLog.2[1] (in the v5-10 branch) and added
`:version "21.4"' entries to most/all new defcustoms.  "all" might be
too optimistic: I did `M-x occur RET new.*variable RET' which should
cover most new variables.

I don't know what to do with libraries as pgg*.el.  Should we add
`:version "21.4"' to all defcustoms there?

Adding the custom version later (like I did) is annoying.  How can we
simplify this in the future?  The problem is that we don't know the
correct Emacs version number (which Emacs will contain this version of
Gnus) to add when adding a variable in Gnus.

Bye, Reiner.

[1] lisp/ChangeLog.2 now contains changes upto the release of 5.10.6.
    It probably starts from Oort, but I'm not sure about this.

[2] "all" might be too optimistic: I did `M-x occur RET new.*variable
    RET' which should cover most new variables.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: ":version" entries in defcustoms
  2004-09-19 20:26 ":version" entries in defcustoms Reiner Steib
@ 2004-09-19 22:29 ` Simon Josefsson
  2004-09-19 23:02   ` Miles Bader
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Josefsson @ 2004-09-19 22:29 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> I don't know what to do with libraries as pgg*.el.  Should we add
> `:version "21.4"' to all defcustoms there?

Is there a reason not to?

> Adding the custom version later (like I did) is annoying.  How can we
> simplify this in the future?  The problem is that we don't know the
> correct Emacs version number (which Emacs will contain this version of
> Gnus) to add when adding a variable in Gnus.

How about the approach of adding the proper :version cookies when the
files are integrated into Emacs?  Then you know which version number
to use (i.e., the next one).  If Gnus developers start to guess next
non-bugfix Emacs release numbers, things might be more difficult when
merging Gnus into Emacs in case the guess was wrong.  If there is a
better way, then that's better, but I don't see it.




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

* Re: ":version" entries in defcustoms
  2004-09-19 22:29 ` Simon Josefsson
@ 2004-09-19 23:02   ` Miles Bader
  2004-09-20 16:39     ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2004-09-19 23:02 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:
>> Adding the custom version later (like I did) is annoying.  How can we
>> simplify this in the future?  The problem is that we don't know the
>> correct Emacs version number (which Emacs will contain this version of
>> Gnus) to add when adding a variable in Gnus.
>
> How about the approach of adding the proper :version cookies when the
> files are integrated into Emacs?  Then you know which version number
> to use (i.e., the next one).  If Gnus developers start to guess next
> non-bugfix Emacs release numbers, things might be more difficult when
> merging Gnus into Emacs in case the guess was wrong.  If there is a
> better way, then that's better, but I don't see it.

I'd suggest adding some sort of unique placeholder when the code gets
originally written, e.g.:

   :version "21.4" ;; rainbow-orangutan

so that later filling in the real version becomes a simple grep (or
tags-query-replace) job.

[The actual value needs to be a real version because
`customize-version-lessp' barfs if you give it anything else]

-Miles
-- 
If you can't beat them, arrange to have them beaten.  [George Carlin]




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

* Re: ":version" entries in defcustoms
  2004-09-19 23:02   ` Miles Bader
@ 2004-09-20 16:39     ` Reiner Steib
  2004-09-20 17:18       ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2004-09-20 16:39 UTC (permalink / raw)


On Mon, Sep 20 2004, Miles Bader wrote:

> Simon Josefsson <jas@extundo.com> writes:

>> I don't know what to do with libraries as pgg*.el.  Should we add
>> `:version "21.4"' to all defcustoms there?
>
> Is there a reason not to?

None, AFAIK.

At least the following Lisp files are new in Oort Gnus (did I miss
some?):

  compface.el deuglify.el dig.el dns.el gnus-delay.el gnus-dired.el \
  gnus-fun.el gpg-ring.el gpg.el html2text.el message-utils.el \
  mm-extern.el mm-url.el mml-sec.el mml-smime.el mml1991.el \
  mml2015.el netrc.el nnmaildir.el nnnil.el nnrss.el nnwfm.el \
  pgg*.el sieve*.el smime.el spam.el tls.el yenc.el

Could someone add the versions in (some of) the news files or better
write some function to do this semi-automatically.  ;-)

> I'd suggest adding some sort of unique placeholder when the code gets
> originally written, e.g.:
>
>    :version "21.4" ;; rainbow-orangutan
>
> so that later filling in the real version becomes a simple grep (or
> tags-query-replace) job.

Good idea.  How about...

   :version "22.0" ;; New in No Gnus

No Gnus will most probably not go into Emacs 21.*.  (We could also use
21.99 or similar.)

Could someone do this for all the new defcustoms in No Gnus?

> [The actual value needs to be a real version because
> `customize-version-lessp' barfs if you give it anything else]

BTW:

,----
| (defun customize-version-lessp (version1 version2)
|   ;; Why are the versions strings, and given that they are, why aren't
|   ;; they converted to numbers and compared as such here?  -- fx
| 
|   ;; In case someone made a mistake and left out the quotes
|   ;; in the :version value.
`----

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




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

* Re: ":version" entries in defcustoms
  2004-09-20 16:39     ` Reiner Steib
@ 2004-09-20 17:18       ` Simon Josefsson
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Josefsson @ 2004-09-20 17:18 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> Could someone add the versions in (some of) the news files or better
> write some function to do this semi-automatically.  ;-)

How about this?

;;; versionfix.el --- Add :version cookies to defcustom without them.
;; Copyright (C) 2004 Free Software Foundation, Inc.

;; Author: Simon Josefsson
;; Keywords: custom

;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this file; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;;; Code:

(defun version-fix (version)
  (interactive "sVersion: ")
  (goto-char (point-min))
  (let (a b)
    (while (and (setq a (re-search-forward "^(defcustom" nil t))
		(setq b (progn (goto-char (match-beginning 0))
			       (forward-sexp)
			       (point))))
      (save-restriction
	(narrow-to-region a b)
	(goto-char (point-min))
	(unless (re-search-forward ":version \"[0-9.]+\"" nil t)
	  (goto-char (point-min))
	  (if (re-search-forward ":group" nil t)
	      (goto-char (match-beginning 0))
	    (goto-char (1- (point-max))))
	  (insert (format ":version \"%s\"\n  " version)))))))

;; versionfix.el ends here




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

end of thread, other threads:[~2004-09-20 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-19 20:26 ":version" entries in defcustoms Reiner Steib
2004-09-19 22:29 ` Simon Josefsson
2004-09-19 23:02   ` Miles Bader
2004-09-20 16:39     ` Reiner Steib
2004-09-20 17:18       ` Simon Josefsson

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