From: Ashutosh G. <ash...@gm...> - 2007-09-19 12:13:16
|
Hi, I have been using emacs-jabber-7.1 for connecting to gtalk. I found some times it is failing to parse the xml packate received from gtalk. If anyone remember i contacted few months back for buggy behavior of jabber.el while connecting with gtalk.Now, i have found the problem and its probable solution. Let me first explain you with the problem, While connecting to gtalk server i was seeing following error message: Debugger entered--Lisp error: (error "XML: End tag for iq not found before end of region") signal(error ("XML: End tag for iq not found before end of region")) error("XML: End tag for %s not found before end of region" "iq") I looked into and found that problem is combination of the packet filter of jabber-core.el, gtalk and xml.el in emacs library. some times gtalk sends xml packets which has a space at the end i.e. "<i>m</i> ". jabber-xml-skip-tag-forward (function in jabber-xml.el) ask xml-parse-region to parse only till last ">" and call (xml-parse-region 1 9). xml-parse-region should successfully parse it but it fails. ( xml.el in emacs must have a bug.) [If you don't understand my English then ask me i will send test code to demonstrate the problem.] Solution: But if you call (xml-parse-region 1 10), then it works fine. So the solution is, in function jabber-xml-skip-tag-farward (in jabber-xml.el) add following line: until (looking-at (regexp-quote (concat "</" node-name ">"))) do (jabber-xml-skip-tag-forward)) line no 119--> (goto-char (match-end 0)) +++Add this line--> (skip-chars-forward " ") t) Please note main developers of emacs-jabber. ashutosh gupta |