Gnus development mailing list
 help / color / mirror / Atom feed
* Patch: Allow nnrss to be verbose
@ 2005-02-19 18:23 Mark Plaksin
  2005-02-20  0:47 ` Katsumi Yamaoka
  2005-02-21 13:51 ` Arne Jørgensen
  0 siblings, 2 replies; 14+ messages in thread
From: Mark Plaksin @ 2005-02-19 18:23 UTC (permalink / raw)


This patch adds nnrss-verbose.  When t, nnrss writes to the minibuffer when
it requests a feed.

Sometimes fetching an RSS feed takes too long and I want to interrupt it.
Without this patch, I can't tell which feed it's trying to fetch.  I also
can't tell that Gnus is trying to fetch an RSS feed--it just looks stuck
and I wonder what I'm interrupting when I hit C-g :)

--- nnrss.el	2005-01-30 08:16:34.000000000 -0500
+++ ../../gnus/lisp/nnrss.el	2005-02-19 13:17:00.000000000 -0500
@@ -66,6 +66,9 @@
 
 (defvar nnrss-use-local nil)
 
+(defvar nnrss-verbose t
+  "Write messages when requesting group.")
+
 (defvar nnrss-description-field 'X-Gnus-Description
   "Field name used for DESCRIPTION.
 To use the description in headers, put this name into `nnmail-extra-headers'.")
@@ -145,6 +148,8 @@
   'nov)
 
 (deffoo nnrss-request-group (group &optional server dont-check)
+  (if nnrss-verbose
+      (message (concat "nnrss requesting " group "...")))
   (setq group (nnrss-decode-group-name group))
   (nnrss-possibly-change-group group server)
   (if dont-check
@@ -154,7 +159,10 @@
     (nnheader-insert
      "211 %d %d %d %s\n" nnrss-group-max nnrss-group-min nnrss-group-max
      (prin1-to-string group)
-     t)))
+     t))
+  (if nnrss-verbose
+      (message (concat "nnrss done with " group "."))
+    t))
 
 (deffoo nnrss-close-group (group &optional server)
   t)




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

* Re: Patch: Allow nnrss to be verbose
  2005-02-19 18:23 Patch: Allow nnrss to be verbose Mark Plaksin
@ 2005-02-20  0:47 ` Katsumi Yamaoka
  2005-02-20 10:42   ` Mark Plaksin
  2005-02-21 13:51 ` Arne Jørgensen
  1 sibling, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-02-20  0:47 UTC (permalink / raw)
  Cc: ding

>>>>> In <m3y8dko1db.fsf@water.tss.usg.edu> 
>>>>>	Mark Plaksin <happy@usg.edu> wrote:

> This patch adds nnrss-verbose.  When t, nnrss writes to the minibuffer when
> it requests a feed.

> Sometimes fetching an RSS feed takes too long and I want to interrupt it.
> Without this patch, I can't tell which feed it's trying to fetch.  I also
> can't tell that Gnus is trying to fetch an RSS feed--it just looks stuck
> and I wonder what I'm interrupting when I hit C-g :)

Thanks.  It seems to be useful.  Is there any reason we're
unable to make nnrss always verbose? (isn't the nnrss-verbose
variable needless?)



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

* Re: Patch: Allow nnrss to be verbose
  2005-02-20  0:47 ` Katsumi Yamaoka
@ 2005-02-20 10:42   ` Mark Plaksin
  2005-02-20 11:43     ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Plaksin @ 2005-02-20 10:42 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Thanks.  It seems to be useful.  Is there any reason we're
> unable to make nnrss always verbose? (isn't the nnrss-verbose
> variable needless?)

*I* always want it verbose.  I figured somebody would want it to be silent
:)




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

* Re: Patch: Allow nnrss to be verbose
  2005-02-20 10:42   ` Mark Plaksin
@ 2005-02-20 11:43     ` Katsumi Yamaoka
  0 siblings, 0 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-02-20 11:43 UTC (permalink / raw)
  Cc: ding

>>>>> In <m37jl3wlzu.fsf@water.tss.usg.edu> 
>>>>>	Mark Plaksin <happy@usg.edu> wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:

> > Thanks.  It seems to be useful.  Is there any reason we're
> > unable to make nnrss always verbose? (isn't the nnrss-verbose
> > variable needless?)

> *I* always want it verbose.  I figured somebody would want it to be silent
> :)

I see.  Nobody isn't able to assert it should always be verbose.
I've committed your change in the Gnus CVS trunk.  Thank you.



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

* Re: Patch: Allow nnrss to be verbose
  2005-02-19 18:23 Patch: Allow nnrss to be verbose Mark Plaksin
  2005-02-20  0:47 ` Katsumi Yamaoka
@ 2005-02-21 13:51 ` Arne Jørgensen
  2005-02-21 14:34   ` Reiner Steib
  1 sibling, 1 reply; 14+ messages in thread
From: Arne Jørgensen @ 2005-02-21 13:51 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

Mark Plaksin <happy@usg.edu> writes:

> This patch adds nnrss-verbose.  When t, nnrss writes to the minibuffer when
> it requests a feed.

Nice, but I think changing it to

      Requesting nnrss:Foo...
      Requesting nnrss:Foo...done

would be more emacsish. Patch attached.

Kind regards,
-- 
Arne Jørgensen <http://arnested.dk/>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnrss.patch --]
[-- Type: text/x-patch, Size: 960 bytes --]

Index: lisp/nnrss.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnrss.el,v
retrieving revision 7.25
diff -u -p -r7.25 nnrss.el
--- lisp/nnrss.el	20 Feb 2005 11:42:56 -0000	7.25
+++ lisp/nnrss.el	21 Feb 2005 13:49:10 -0000
@@ -149,7 +149,7 @@ ARTICLE is the article number of the cur
 
 (deffoo nnrss-request-group (group &optional server dont-check)
   (if nnrss-verbose
-      (message (concat "nnrss requesting " group "...")))
+      (message (concat "Requesting nnrss:" group "...")))
   (setq group (nnrss-decode-group-name group))
   (nnrss-possibly-change-group group server)
   (prog1
@@ -162,7 +162,7 @@ ARTICLE is the article number of the cur
 	 (prin1-to-string group)
 	 t))
     (when nnrss-verbose
-      (message (concat "nnrss done with " group ".")))))
+      (message (concat "Requesting nnrss:" group "...done")))))
 
 (deffoo nnrss-close-group (group &optional server)
   t)

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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 13:51 ` Arne Jørgensen
@ 2005-02-21 14:34   ` Reiner Steib
  2005-02-21 14:42     ` Arne Jørgensen
  0 siblings, 1 reply; 14+ messages in thread
From: Reiner Steib @ 2005-02-21 14:34 UTC (permalink / raw)


On Mon, Feb 21 2005, Arne Jørgensen wrote:

>       Requesting nnrss:Foo...
>       Requesting nnrss:Foo...done
>
> would be more emacsish.

ACK.

Additionally, I would suggest to use `nnheader-message' (i.e. use the
variable `gnus-verbose-backends') instead of introducing
`nnrss-verbose'.

As I don't use nnrss, I don't know which LEVEL would be suitable here.

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




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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 14:34   ` Reiner Steib
@ 2005-02-21 14:42     ` Arne Jørgensen
  2005-02-21 14:54       ` Arne Jørgensen
  0 siblings, 1 reply; 14+ messages in thread
From: Arne Jørgensen @ 2005-02-21 14:42 UTC (permalink / raw)


Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Mon, Feb 21 2005, Arne Jørgensen wrote:
>
>>       Requesting nnrss:Foo...
>>       Requesting nnrss:Foo...done
>>
>> would be more emacsish.
>
> ACK.
>
> Additionally, I would suggest to use `nnheader-message' (i.e. use the
> variable `gnus-verbose-backends') instead of introducing
> `nnrss-verbose'.

Didn't know about `nnheader-message' or `gnus-verbose-backends' before
now, but I agree.

> As I don't use nnrss, I don't know which LEVEL would be suitable here.

I use nnrss, but have no clue about which level to use either. What
are other backends using for similar messages?

Kind regards,
-- 
Arne Jørgensen <http://arnested.dk/>




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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 14:42     ` Arne Jørgensen
@ 2005-02-21 14:54       ` Arne Jørgensen
  2005-02-21 16:05         ` Reiner Steib
  0 siblings, 1 reply; 14+ messages in thread
From: Arne Jørgensen @ 2005-02-21 14:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Arne Jørgensen <arne@arnested.dk> writes:

> I use nnrss, but have no clue about which level to use either. What
> are other backends using for similar messages?

5 or 6 it seems.

And it looks like the normal thing to write would be

    nnrss: Requesting Foo...
    nnrss: Requesting Foo...done

Patch attached.

Kind regards,
-- 
Arne Jørgensen <http://arnested.dk/>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnrss.patch --]
[-- Type: text/x-patch, Size: 1350 bytes --]

Index: lisp/nnrss.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnrss.el,v
retrieving revision 7.25
diff -u -p -r7.25 nnrss.el
--- lisp/nnrss.el	20 Feb 2005 11:42:56 -0000	7.25
+++ lisp/nnrss.el	21 Feb 2005 14:53:11 -0000
@@ -66,9 +66,6 @@
 
 (defvar nnrss-use-local nil)
 
-(defvar nnrss-verbose t
-  "Write messages when requesting group.")
-
 (defvar nnrss-description-field 'X-Gnus-Description
   "Field name used for DESCRIPTION.
 To use the description in headers, put this name into `nnmail-extra-headers'.")
@@ -148,8 +145,7 @@ ARTICLE is the article number of the cur
   'nov)
 
 (deffoo nnrss-request-group (group &optional server dont-check)
-  (if nnrss-verbose
-      (message (concat "nnrss requesting " group "...")))
+  (nnheader-message 6 (concat "nnrss: Requesting " group "..."))
   (setq group (nnrss-decode-group-name group))
   (nnrss-possibly-change-group group server)
   (prog1
@@ -161,8 +157,7 @@ ARTICLE is the article number of the cur
 	 "211 %d %d %d %s\n" nnrss-group-max nnrss-group-min nnrss-group-max
 	 (prin1-to-string group)
 	 t))
-    (when nnrss-verbose
-      (message (concat "nnrss done with " group ".")))))
+    (nnheader-message 6 (concat "nnrss: Requesting " group "...done"))))
 
 (deffoo nnrss-close-group (group &optional server)
   t)

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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 14:54       ` Arne Jørgensen
@ 2005-02-21 16:05         ` Reiner Steib
  2005-02-21 22:52           ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Reiner Steib @ 2005-02-21 16:05 UTC (permalink / raw)


On Mon, Feb 21 2005, Arne Jørgensen wrote:

> Arne Jørgensen <arne@arnested.dk> writes:
>
>> I use nnrss, but have no clue about which level to use either. What
>> are other backends using for similar messages?
>
> 5 or 6 it seems.

As this is below the default of `gnus-verbose-backends' (7), it is
okay.

> And it looks like the normal thing to write would be
>
>     nnrss: Requesting Foo...
>     nnrss: Requesting Foo...done
>
> Patch attached.

Committed (on the trunk), thanks.

I think such changes should go in the v5-10 branch, too.  But applying
the patch (cvs diff -r7.24 -r7.26) fails on v5-10.

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




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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 16:05         ` Reiner Steib
@ 2005-02-21 22:52           ` Katsumi Yamaoka
  2005-02-21 23:25             ` Katsumi Yamaoka
  2005-03-02 16:48             ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch (was: Patch: Allow nnrss to be verbose) Reiner Steib
  0 siblings, 2 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-02-21 22:52 UTC (permalink / raw)


>>>>> In <v93bvpyk3d.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:

> Committed (on the trunk), thanks.

Thanks for putting it right.

> I think such changes should go in the v5-10 branch, too.  But applying
> the patch (cvs diff -r7.24 -r7.26) fails on v5-10.


I can make it support multilingual text as in the trunk (it
includes the verbose patch, of course), although it might not be
a bugfix.  Am I able to do it?  Actually, nnrss in the v5-10
branch cannot be used at least for Japanese sites, for example:

http://www3.asahi.com/rss/index.rdf

P.S.
Though, in reality, I'm neither interested in nnrss nor using it
because it only shows subjects, links and possibly brief texts.
nnshimbun provided by emacs-w3m is much better for me.



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

* Re: Patch: Allow nnrss to be verbose
  2005-02-21 22:52           ` Katsumi Yamaoka
@ 2005-02-21 23:25             ` Katsumi Yamaoka
  2005-03-02 16:48             ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch (was: Patch: Allow nnrss to be verbose) Reiner Steib
  1 sibling, 0 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-02-21 23:25 UTC (permalink / raw)


>>>>> In <b9ybradv84l.fsf@jpl.org> Katsumi Yamaoka wrote:

>> I think such changes should go in the v5-10 branch, too.  But applying
>> the patch (cvs diff -r7.24 -r7.26) fails on v5-10.

> I can make it support multilingual text as in the trunk (it
> includes the verbose patch, of course), although it might not be
> a bugfix.  Am I able to do it?

Ouch!  It requires an overall replacing of rfc2047.el with the
one in the trunk.  The main load to me is to write the ChangeLog,
though.



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

* Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch (was: Patch: Allow nnrss to be verbose)
  2005-02-21 22:52           ` Katsumi Yamaoka
  2005-02-21 23:25             ` Katsumi Yamaoka
@ 2005-03-02 16:48             ` Reiner Steib
  2005-04-05  0:43               ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch Katsumi Yamaoka
  1 sibling, 1 reply; 14+ messages in thread
From: Reiner Steib @ 2005-03-02 16:48 UTC (permalink / raw)
  Cc: Gaetan Leurent

On Mon, Feb 21 2005, Katsumi Yamaoka wrote:

>>>>>> In <v93bvpyk3d.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:
>> I think such changes should go in the v5-10 branch, too.  But applying
>> the patch (cvs diff -r7.24 -r7.26) fails on v5-10.
>
> I can make it support multilingual text as in the trunk (it
> includes the verbose patch, of course), although it might not be
> a bugfix.  Am I able to do it?  Actually, nnrss in the v5-10
> branch cannot be used at least for Japanese sites, for example:
>
> http://www3.asahi.com/rss/index.rdf
[...]

On Tue, Feb 22 2005, Katsumi Yamaoka wrote:

> Ouch!  It requires an overall replacing of rfc2047.el with the
> one in the trunk.  The main load to me is to write the ChangeLog,
> though.

Katsumi told me that he will try to look into this after releasing the
next version of emacs-w3m.

But if anyone else want to work on it, here are some remarks when
trying to sync `rfc2047.el' and `nnrss.el':

- It seems that nobody has merged the bugfixes from the trunk yet.  We
  should surely do this[1].  Jesper Harder has committed most of them
  on the trunk, but probably he didn't have time for merging them to
  v5-10 (the stable branch) yet.

- We cannot apply all changes blindly (see: "cvs diff -r7.1 -r7.26
  nnrss.el" or better `C-u C-x v = nnrss.el RET 7.1 RET 7.26 RET')
  since we want to keep the v5-10 compatible with Emacs 20.7 and
  XEmacs 21.1.  (E.g. `make-hash-table' is not available in Emacs
  20.7.)

  OTOH, `nnrss.el' is comparable to `gnus-registry.el' and
  `spam-stat.el' where we already use `make-hash-table' there in
  v5-10.  Opinions?

Bye, Reiner.

[1] See a recent bug report from Gaetan Leurent on emacs-devel:
    http://thread.gmane.org/qlkoee2ernr.fsf%40clipper.ens.fr
    <news:qlkoee2ernr.fsf@clipper.ens.fr>
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch
  2005-03-02 16:48             ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch (was: Patch: Allow nnrss to be verbose) Reiner Steib
@ 2005-04-05  0:43               ` Katsumi Yamaoka
  2005-04-06  8:37                 ` Katsumi Yamaoka
  0 siblings, 1 reply; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-04-05  0:43 UTC (permalink / raw)


>>>>> In <v93bveouya.fsf_-_@marauder.physik.uni-ulm.de> Reiner Steib wrote:

> Katsumi told me that he will try to look into this after releasing the
> next version of emacs-w3m.

I'm now working on merging nnrss.el into the v5-10 branch and I
noticed there are some German web sites using the windows-1252
encoding even if they declare that the encoding is iso-8859-1.
For instance, the following rss feed declares
encoding="ISO-8859-1" and uses characters in 0x80-0x9f which are
out of the iso-8859-1 specification.

http://www.laut.de/partner/allgemein/news.rdf

I'm groping for the way (which can be used with old Emacsen too)
to solve the problem.

[...]

>   OTOH, `nnrss.el' is comparable to `gnus-registry.el' and
>   `spam-stat.el' where we already use `make-hash-table' there in
>   v5-10.  Opinions?

I've changed nnrss.el for the v5-10 branch so that it may use
`gnus-make-hashtable'.  In addition, there are other problems
which I've fixed in the local system:

time-date.el uses `#x10000' and `#xffff' which cannot be read by
Emacs 20.

`rfc2047-decode' won't work in XEmacs because
`mm-subst-char-in-string' doesn't allow the fourth argument.

I will commit those fixes together with nnrss.el and others.

Regards,



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

* Re: Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch
  2005-04-05  0:43               ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch Katsumi Yamaoka
@ 2005-04-06  8:37                 ` Katsumi Yamaoka
  0 siblings, 0 replies; 14+ messages in thread
From: Katsumi Yamaoka @ 2005-04-06  8:37 UTC (permalink / raw)


I've committed the changes in both the Gnus trunk and the v5-10
branch.  The changes in the v5-10 branch are for only Gnus v5.11,
so please don't merge them back into the Gnus trunk.

>>>>> In <b9ymzseaw9m.fsf@jpl.org> Katsumi Yamaoka wrote:

> I'm now working on merging nnrss.el into the v5-10 branch and I
> noticed there are some German web sites using the windows-1252
> encoding even if they declare that the encoding is iso-8859-1.

I solved it by using windows-1252 if it is available, or making
a text/plain article instead of a MIME article for old Emacsen
which sometimes caused an error.

FYI: you can use the windows-1252 coding system even in Emacs 21
by using ARISAWA Akihiro's codepage-ex.el, which is available at:

http://www.nijino.com/ari/emacs/codepage-ex.html

I've put the following in my ~/.emacs file.

(if (and (not (featurep 'xemacs))
	 (= emacs-major-version 21)
	 (not (require 'code-pages nil t)))
    (progn
      (require 'codepage-ex)
      (mapc (lambda (cp) (codepage-ex-setup (car cp)))
	    (cp-ex-supported-codepages))
      (define-coding-system-alias 'windows-1250 'cp1250)
      (define-coding-system-alias 'windows-1251 'cp1251)
      (define-coding-system-alias 'windows-1252 'cp1252)
      (define-coding-system-alias 'windows-1253 'cp1253)
      (define-coding-system-alias 'windows-1254 'cp1254)
      (define-coding-system-alias 'windows-1255 'cp1255)
      (define-coding-system-alias 'windows-1257 'cp1257)))

> I will commit those fixes together with nnrss.el and others.

Done.




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

end of thread, other threads:[~2005-04-06  8:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-19 18:23 Patch: Allow nnrss to be verbose Mark Plaksin
2005-02-20  0:47 ` Katsumi Yamaoka
2005-02-20 10:42   ` Mark Plaksin
2005-02-20 11:43     ` Katsumi Yamaoka
2005-02-21 13:51 ` Arne Jørgensen
2005-02-21 14:34   ` Reiner Steib
2005-02-21 14:42     ` Arne Jørgensen
2005-02-21 14:54       ` Arne Jørgensen
2005-02-21 16:05         ` Reiner Steib
2005-02-21 22:52           ` Katsumi Yamaoka
2005-02-21 23:25             ` Katsumi Yamaoka
2005-03-02 16:48             ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch (was: Patch: Allow nnrss to be verbose) Reiner Steib
2005-04-05  0:43               ` Fixes for nnrss.el (and rfc2047.el) in the v5-10 branch Katsumi Yamaoka
2005-04-06  8:37                 ` Katsumi Yamaoka

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