[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,
AndyM
- What's the right way to detect libxml2?, Clément Pit-Claudel, 2017/10/22
- Re: What's the right way to detect libxml2?, Phillip Lord, 2017/10/22
- Re: What's the right way to detect libxml2?, Andy Moreton, 2017/10/24
- Re: What's the right way to detect libxml2?, Clément Pit-Claudel, 2017/10/24
- Re: What's the right way to detect libxml2?, Andy Moreton, 2017/10/24
- Re: What's the right way to detect libxml2?, Robert Pluim, 2017/10/24
- Re: What's the right way to detect libxml2?,
Andy Moreton <=
- Re: What's the right way to detect libxml2?, Robert Pluim, 2017/10/25
- Re: What's the right way to detect libxml2?, Eli Zaretskii, 2017/10/28
- Re: What's the right way to detect libxml2?, Robert Pluim, 2017/10/30
- Re: What's the right way to detect libxml2?, Eli Zaretskii, 2017/10/30
- Re: What's the right way to detect libxml2?, Eli Zaretskii, 2017/10/30
- Re: What's the right way to detect libxml2?, Richard Stallman, 2017/10/24
- Re: What's the right way to detect libxml2?, John Wiegley, 2017/10/24
- Re: What's the right way to detect libxml2?, Stefan Monnier, 2017/10/24
- Re: What's the right way to detect libxml2?, Paul Eggert, 2017/10/25
- Re: What's the right way to detect libxml2?, Richard Stallman, 2017/10/25