GNU bug report logs - #15840
libxml-parse-xml-region: Raise runtime error, don't return nil

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Sat, 9 Nov 2013 04:00:03 UTC

Severity: minor

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15840 in the body.
You can then email your comments to 15840 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15840; Package emacs. (Sat, 09 Nov 2013 04:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jambunathan K <kjambunathan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Nov 2013 04:00:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Christof Spitz <christof.spitz <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org, "emacs-orgmode <at> gnu.org" <emacs-orgmode <at> gnu.org>
Subject: libxml-parse-xml-region: Raise runtime error, don't return nil
Date: Sat, 09 Nov 2013 09:29:15 +0530
Christof

Christof Spitz <christof.spitz <at> gmail.com> writes:

> I found the bug: Windows-Emacs was missing the libxml2 library. I got
> the libxml2-2.7.8.-w32-bin.zip, copied the content of /bin into Emacs'
> /bin directory and now the formatting works.

This should have been very difficult to track down. 

ox-freemind.el does invoke `libxml-parse-xml-region'.  I think Emacs
should raise a runtime error (and not return nil) if the above API is
called but libxml is unavailable.

ps: This bug is a good excuse to audit "other" such wrapper calls (if
there are any) and make sure that they don't fall silently.









Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15840; Package emacs. (Sat, 09 Nov 2013 11:54:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Christof Spitz <christof.spitz <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org, "emacs-orgmode <at> gnu.org" <emacs-orgmode <at> gnu.org>
Subject: Re: libxml-parse-xml-region: Raise runtime error, don't return nil
Date: Sat, 09 Nov 2013 17:23:16 +0530
Christof Spitz <christof.spitz <at> gmail.com> writes:

> Emacs did return a runtime error

This is what Emacs does.  

From xml.c: 96
	  message1 ("libxml2 library not found");

and message1 (based on other uses elsewhere) seems to be used for
ordinary echo area messages (like prompt strings etc) as opposed to an
"error" message.

----------------------------------------------------------------

It is easy to check though.

I don't have access to a Windows machine.  It should really be an error
and not a simple informative message.  Try this:

1. Remove libxml
2. M-x toggle-debug-on-error RET
3. Export to freemind

Do you now get a backtrace buffer?  




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15840; Package emacs. (Sat, 09 Nov 2013 16:16:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christof Spitz <christof.spitz <at> gmail.com>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org, "emacs-orgmode <at> gnu.org" <emacs-orgmode <at> gnu.org>
Subject: Re: libxml-parse-xml-region: Raise runtime error, don't return nil
Date: Sat, 9 Nov 2013 08:44:32 +0100
[Message part 1 (text/plain, inline)]
Emacs did return a runtime error, it was simply my mistake not to have
noticed it in the Message buffer.


2013/11/9 Jambunathan K <kjambunathan <at> gmail.com>

>
> Christof
>
> Christof Spitz <christof.spitz <at> gmail.com> writes:
>
> > I found the bug: Windows-Emacs was missing the libxml2 library. I got
> > the libxml2-2.7.8.-w32-bin.zip, copied the content of /bin into Emacs'
> > /bin directory and now the formatting works.
>
> This should have been very difficult to track down.
>
> ox-freemind.el does invoke `libxml-parse-xml-region'.  I think Emacs
> should raise a runtime error (and not return nil) if the above API is
> called but libxml is unavailable.
>
> ps: This bug is a good excuse to audit "other" such wrapper calls (if
> there are any) and make sure that they don't fall silently.
>
>
>
>
>
>
[Message part 2 (text/html, inline)]

Reply sent to Jambunathan K <kjambunathan <at> gmail.com>:
You have taken responsibility. (Fri, 15 Nov 2013 05:14:02 GMT) Full text and rfc822 format available.

Notification sent to Jambunathan K <kjambunathan <at> gmail.com>:
bug acknowledged by developer. (Fri, 15 Nov 2013 05:14:02 GMT) Full text and rfc822 format available.

Message #16 received at 15840-done <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 15840-done <at> debbugs.gnu.org
Subject: Re: bug#15840: libxml-parse-xml-region: Raise runtime error,
 don't return nil
Date: Fri, 15 Nov 2013 10:42:53 +0530
OP here.  Closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 12:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.