Gnus development mailing list
 help / color / mirror / Atom feed
* Problems with Oort Gnus 0.18 and XEmacs 21.4.6.
@ 2003-04-23 21:45 Juha Autero
  2003-04-24 13:40 ` Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: Juha Autero @ 2003-04-23 21:45 UTC (permalink / raw)


I've been lately having problems with Oort Gnus and XEmacs 21.4.6.
I have several nnrss groups and nnrss.el started complaining that 
Symbol's function definition is void: replace-regexp-in-string

That seemed easy enough since XEmacs 21.4.6 doesn't have
replace-regexp-in-string, but  gnus-util.el defines
gnus-replace-in-string that does the same thing, but has arguments in
different order, which crashed my XEmacs. After fixing that XEmacs no
longer crashes. It just eats up CPU. I gave up after 10 minutes and
tried to debug with M-x load-library nnrss and M-x debug-on-entry
nnrss-node-text (where replace-regexp-in-string were). And what do you
know, now it decides that information stored about nnrss groups is
wrong and asks URL to search group and complains "Wrong argument type:
stringp, ((description "<description of rss group>"..." or something
like that after I give the URL. Since I have no idea how to delete 
information stored by nnrss, I decided to give up and complain instead
of sending a patch.

BTW. sieve.el seems also have replace-regexp-in-string, but luckily I
don't use that one.

-- 
Juha Autero
http://www.iki.fi/jautero/
Eschew obscurity!




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

* Re: Problems with Oort Gnus 0.18 and XEmacs 21.4.6.
  2003-04-23 21:45 Problems with Oort Gnus 0.18 and XEmacs 21.4.6 Juha Autero
@ 2003-04-24 13:40 ` Simon Josefsson
  2003-04-24 20:39   ` Juha Autero
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2003-04-24 13:40 UTC (permalink / raw)
  Cc: ding

Juha Autero <Juha.Autero@iki.fi> writes:

> I've been lately having problems with Oort Gnus and XEmacs 21.4.6.
> I have several nnrss groups and nnrss.el started complaining that 
> Symbol's function definition is void: replace-regexp-in-string
>
> That seemed easy enough since XEmacs 21.4.6 doesn't have
> replace-regexp-in-string, but  gnus-util.el defines
> gnus-replace-in-string that does the same thing, but has arguments in
> different order, which crashed my XEmacs. After fixing that XEmacs no
> longer crashes. It just eats up CPU. I gave up after 10 minutes and
> tried to debug with M-x load-library nnrss and M-x debug-on-entry
> nnrss-node-text (where replace-regexp-in-string were). And what do you
> know, now it decides that information stored about nnrss groups is
> wrong and asks URL to search group and complains "Wrong argument type:
> stringp, ((description "<description of rss group>"..." or something
> like that after I give the URL. Since I have no idea how to delete 
> information stored by nnrss, I decided to give up and complain instead
> of sending a patch.
>
> BTW. sieve.el seems also have replace-regexp-in-string, but luckily I
> don't use that one.

I made both files not use r-r-i-s, which seems to be the correct
solution (Emacs 20 doesn't have r-r-i-s either), but I don't know the
solution to the two other problems.  Perhaps the implementation of
gnus-r-r-i-s is buggy when the NEWTEXT is ""?  Edebugging really
should work.  Perhaps instead of debugging, you could insert a
(message "foo: %s" text) statement in the function and then try to
evaluate gnus-r-r-i-s manually on it to see why it eats CPU.




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

* Re: Problems with Oort Gnus 0.18 and XEmacs 21.4.6.
  2003-04-24 13:40 ` Simon Josefsson
@ 2003-04-24 20:39   ` Juha Autero
  2003-04-24 21:48     ` Juha Autero
  0 siblings, 1 reply; 4+ messages in thread
From: Juha Autero @ 2003-04-24 20:39 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> I made both files not use r-r-i-s, which seems to be the correct
> solution (Emacs 20 doesn't have r-r-i-s either), but I don't know the
> solution to the two other problems.  Perhaps the implementation of
> gnus-r-r-i-s is buggy when the NEWTEXT is ""?  Edebugging really
> should work.  Perhaps instead of debugging, you could insert a
> (message "foo: %s" text) statement in the function and then try to
> evaluate gnus-r-r-i-s manually on it to see why it eats CPU.

Now I managed to debug it and seem to have found the problem.  The
regexps that remove spaces are wrong. They use '*' which matches also
zero occurances. That causes regexp to always match and there is an
infinite loop. 

-- 
Juha Autero
http://www.iki.fi/jautero/
Eschew obscurity!




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

* Re: Problems with Oort Gnus 0.18 and XEmacs 21.4.6.
  2003-04-24 20:39   ` Juha Autero
@ 2003-04-24 21:48     ` Juha Autero
  0 siblings, 0 replies; 4+ messages in thread
From: Juha Autero @ 2003-04-24 21:48 UTC (permalink / raw)


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

Juha Autero <Juha.Autero@iki.fi> writes:

> Now I managed to debug it and seem to have found the problem.  The
> regexps that remove spaces are wrong. They use '*' which matches also
> zero occurances. That causes regexp to always match and there is an
> infinite loop. 

Also the name of the function is 'gnus-replace-in-string' here's a
patch. 

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

Index: nnrss.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnrss.el,v
retrieving revision 6.38
diff -u -r6.38 nnrss.el
--- nnrss.el	24 Apr 2003 13:41:25 -0000	6.38
+++ nnrss.el	24 Apr 2003 21:49:35 -0000
@@ -514,12 +514,12 @@
 	 (text (if (and node (listp node))
 		   (nnrss-node-just-text node)
 		 node))
-	 (cleaned-text (if text (gnus-replace-regexp-in-string
-				 (gnus-replace-regexp-in-string
-				  (gnus-replace-regexp-in-string
+	 (cleaned-text (if text (gnus-replace-in-string
+				 (gnus-replace-in-string
+				  (gnus-replace-in-string
 				   text "^[[:cntrl:]]+" "")
-				  "^ *" "")
-				 " *$" ""))))
+				  "^ +" "")
+				 " +$" ""))))
     (if (string-equal "" cleaned-text)
 	nil
       cleaned-text)))

[-- Attachment #3: Type: text/plain, Size: 62 bytes --]


-- 
Juha Autero
http://www.iki.fi/jautero/
Eschew obscurity!

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 21:45 Problems with Oort Gnus 0.18 and XEmacs 21.4.6 Juha Autero
2003-04-24 13:40 ` Simon Josefsson
2003-04-24 20:39   ` Juha Autero
2003-04-24 21:48     ` Juha Autero

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