[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the right way to detect libxml2?

From: Andy Moreton
Subject: Re: What's the right way to detect libxml2?
Date: Tue, 24 Oct 2017 18:46:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Tue 24 Oct 2017, Robert Pluim wrote:

> Andy Moreton <address@hidden> writes:
>> On Tue 24 Oct 2017, Clément Pit-Claudel wrote:
>>> On 2017-10-24 09:38, Andy Moreton wrote:
>>>> For libxml2, try using (shr-render-buffer) on an HTML/XML buffer to get
>>>> the library loaded.
>>> Is that better than just calling libxml-parse-xml-region and checking for a
>>> nil return value? It sounds like shr-render-buffer would do a lot more — do 
>>> we
>>> need that?
>> No, it was just an example of doing something to force the library to be
>> loaded. Your version is simpler, and having (libxml-available-p) would
>> be even better.
>>     AndyM
> Like thus? Very lightly tested on GNU/Linux only. Might need a NEWS
> entry.
Works for me on a 64bit MinGW64/MSYS2 build of emacs-26 on Windows 10.

I don't think you need to remove the HAVE_LIBXML2 conditionals, as lisp
code can check (fboundp 'libxml-available-p) before calling it, and it
may break builds without libxml2 support.

Also, the libxml-available-p doc string claims it returns a list of
capabilities (which is true for gnutls-available-p), but it only returns
nil or t.

Thanks for working on this,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]