Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-xmas-format in ~/.newsrc.eld
@ 2003-04-23 13:17 Reiner Steib
  2003-04-23 14:18 ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2003-04-23 13:17 UTC (permalink / raw)


Hi,

when using Oort with XEmacs, the following gets written to
~/.newsrc.eld:

,----
| (setq
|  gnus-format-specs
|  '((article-mode "Gnus: %g [%w] %S%m"
| 		 (concat (gnus-xmas-format "Gnus: %s [%s] %s%s" ...)))))
`----

When a user wants to switch back to Gnus 5.8.8 (e.g. to see if some
bug has been introduced in Oort), displaying articles fails, because
`gnus-xmas-format' isn't bound.

Couldn't we (defalias 'gnus-xmas-format 'format) in this case?

--8<---------------cut here---------------start------------->8---
--- lisp/gnus-start.el	5 Apr 2003 05:40:29 -0000	6.72
+++ lisp/gnus-start.el	23 Apr 2003 13:19:12 -0000
@@ -460,6 +460,12 @@
 ;; Byte-compiler warning.
 (defvar gnus-group-line-format)
 
+(defvar gnus-newsrc-gnus-compatibility
+  (concat "(unless (fboundp 'gnus-xmas-format)\n"
+	  "  (defalias 'gnus-xmas-format 'format))\n")
+  "String added to `~/.newsrc.eld' for compatibility.
+Must be a valid lisp expression.")
+
 ;; Suggested by Brian Edmonds <edmonds@cs.ubc.ca>.
 (defvar gnus-init-inhibit nil)
 (defun gnus-read-init-file (&optional inhibit-next)
@@ -2641,6 +2647,8 @@
     (princ "(setq gnus-newsrc-file-version ")
     (princ (gnus-prin1-to-string gnus-version))
     (princ ")\n")
+    (when (stringp gnus-newsrc-gnus-compatibility)
+      (insert gnus-newsrc-gnus-compatibility))
     (let* ((print-quoted t)
            (print-readably t)
            (print-escape-multibyte nil)
--8<---------------cut here---------------end--------------->8---

Is there a better name instead of `gnus-newsrc-gnus-compatibility'?

I'm using `defvar' (and not `defcustom') on purpose, because I don't
think it should be customizable.

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




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

* Re: gnus-xmas-format in ~/.newsrc.eld
  2003-04-23 13:17 gnus-xmas-format in ~/.newsrc.eld Reiner Steib
@ 2003-04-23 14:18 ` Simon Josefsson
  2003-04-23 18:06   ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Josefsson @ 2003-04-23 14:18 UTC (permalink / raw)


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

> When a user wants to switch back to Gnus 5.8.8 (e.g. to see if some
> bug has been introduced in Oort), displaying articles fails, because
> `gnus-xmas-format' isn't bound.

Downgrading does not work well, so maybe instead of adding workarounds
for some of the problems, we should add a version check in .newsrc.eld
explaining that the user is on their own?

One thing that will break after downgrade + upgrade are flags.  Any
flag changes made using the old gnus version will be lost.  Given the
changes to agent/cache/etc, I think there are more problems.

Hm.




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

* Re: gnus-xmas-format in ~/.newsrc.eld
  2003-04-23 14:18 ` Simon Josefsson
@ 2003-04-23 18:06   ` Reiner Steib
  2003-04-23 20:10     ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2003-04-23 18:06 UTC (permalink / raw)


On Wed, Apr 23 2003, Simon Josefsson wrote:

> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
>
>> When a user wants to switch back to Gnus 5.8.8 (e.g. to see if some
>> bug has been introduced in Oort), displaying articles fails, because
>> `gnus-xmas-format' isn't bound.
>
> Downgrading does not work well, so maybe instead of adding workarounds
> for some of the problems, 

Yes, it's a workaround.  But why should we make downgrading harder
than is necessary?

> we should add a version check in .newsrc.eld explaining that the
> user is on their own?

This would make sense.

> One thing that will break after downgrade + upgrade are flags.  Any
> flag changes made using the old gnus version will be lost.  

Are you talking about the marks files (nnml, nnfolder, ...?)?  It
worked for me in nndoc and nntp groups.  I didn't try other back ends.

> Given the changes to agent/cache/etc, I think there are more
> problems.

Is there an entry in GNUS-NEWS for this?  (I couldn't find any.)

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




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

* Re: gnus-xmas-format in ~/.newsrc.eld
  2003-04-23 18:06   ` Reiner Steib
@ 2003-04-23 20:10     ` Simon Josefsson
  2003-04-23 21:05       ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Josefsson @ 2003-04-23 20:10 UTC (permalink / raw)


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

> On Wed, Apr 23 2003, Simon Josefsson wrote:
>
>> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
>>
>>> When a user wants to switch back to Gnus 5.8.8 (e.g. to see if some
>>> bug has been introduced in Oort), displaying articles fails, because
>>> `gnus-xmas-format' isn't bound.
>>
>> Downgrading does not work well, so maybe instead of adding workarounds
>> for some of the problems, 
>
> Yes, it's a workaround.  But why should we make downgrading harder
> than is necessary?

Since right it now perhaps it is too easy, fooling people into
believing everything will work.  But I'm probably being over
protective.  People should take backups, too.

>> One thing that will break after downgrade + upgrade are flags.  Any
>> flag changes made using the old gnus version will be lost.  
>
> Are you talking about the marks files (nnml, nnfolder, ...?)?  

Yup.

> It worked for me in nndoc and nntp groups.  I didn't try other back
> ends.

Those doesn't use marks.

>> Given the changes to agent/cache/etc, I think there are more
>> problems.
>
> Is there an entry in GNUS-NEWS for this?  (I couldn't find any.)

I don't think there is.  Could you suggest something?  Maybe something
like the following.

** Upgrading from previous (stable) version if you have used Oort.

If you have tried Oort (the unstable Gnus branch leading to this
release) but went back to a stable version, be careful when upgrading
to this version.  In particular, you will probably want to remove all
.marks (nnml) and .mrk (nnfolder) files, so that flags are read from
your .newsrc.eld instead of from the .marks/.mrk file where this
release store flags.  See a later entry for more information about
marks.




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

* Re: gnus-xmas-format in ~/.newsrc.eld
  2003-04-23 20:10     ` Simon Josefsson
@ 2003-04-23 21:05       ` Reiner Steib
  0 siblings, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2003-04-23 21:05 UTC (permalink / raw)


On Wed, Apr 23 2003, Simon Josefsson wrote:

> Since right it now perhaps it is too easy, fooling people into
> believing everything will work.  

Okay, I see.

[ I'll use some function in gnus-save-quick-newsrc-hook to be able to
switch back and forth in my test setup. ]

> ** Upgrading from previous (stable) version if you have used Oort.
>
> If you have tried Oort (the unstable Gnus branch leading to this
> release) but went back to a stable version, be careful when upgrading
> to this version.  In particular, you will probably want to remove all
> .marks (nnml) and .mrk (nnfolder) files, so that flags are read from
> your .newsrc.eld instead of from the .marks/.mrk file where this
> release store flags.  See a later entry for more information about
> marks.

Fine.

Maybe mention, that downgrading (e.g. "Gnus 5.10 --> Gnus 5.8/5.9")
isn't save in general.  Or is this assumed to be a matter of course?

Adding the version check you suggested earlier is a good idea, too.
Hm, but this will only apply when downgrading _to_ 5.10.  Or should
this function be written to ~/.newsrc.eld?

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




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

end of thread, other threads:[~2003-04-23 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 13:17 gnus-xmas-format in ~/.newsrc.eld Reiner Steib
2003-04-23 14:18 ` Simon Josefsson
2003-04-23 18:06   ` Reiner Steib
2003-04-23 20:10     ` Simon Josefsson
2003-04-23 21:05       ` 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).