From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: What's the right way to detect libxml2?
Date: Tue, 24 Oct 2017 18:46:07 +0100 [thread overview]
Message-ID: <vz160b4e8ww.fsf@gmail.com> (raw)
In-Reply-To: 877evkfpe1.fsf@gmail.com
On Tue 24 Oct 2017, Robert Pluim wrote:
> Andy Moreton <andrewjmoreton@gmail.com> 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
next prev parent reply other threads:[~2017-10-24 17:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-22 14:14 What's the right way to detect libxml2? Clément Pit-Claudel
2017-10-22 16:27 ` Phillip Lord
2017-10-24 13:38 ` Andy Moreton
2017-10-24 14:01 ` Clément Pit-Claudel
2017-10-24 15:33 ` Andy Moreton
2017-10-24 17:04 ` Robert Pluim
2017-10-24 17:46 ` Andy Moreton [this message]
2017-10-25 11:24 ` Robert Pluim
2017-10-28 9:10 ` Eli Zaretskii
2017-10-30 8:49 ` Robert Pluim
2017-10-30 18:07 ` Eli Zaretskii
2017-10-30 18:10 ` Eli Zaretskii
2017-11-03 9:36 ` Eli Zaretskii
2017-11-03 17:17 ` Robert Pluim
2017-10-24 21:49 ` Richard Stallman
2017-10-24 22:32 ` John Wiegley
2017-10-25 1:45 ` Stefan Monnier
2017-10-25 22:05 ` Paul Eggert
2017-10-26 3:42 ` Richard Stallman
2017-10-25 4:39 ` Werner LEMBERG
2017-10-25 7:19 ` To Tramp or not to Tramp (was: What's the right way to detect libxml2?) Michael Albinus
2017-10-25 10:56 ` Kaushal Modi
2017-10-26 7:56 ` To Tramp or not to Tramp martin rudalics
2017-10-27 2:44 ` Richard Stallman
2017-10-27 4:01 ` John Wiegley
2017-10-27 20:58 ` Richard Stallman
2017-10-25 22:29 ` What's the right way to detect libxml2? Richard Copley
2017-10-26 10:48 ` Marcin Borkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vz160b4e8ww.fsf@gmail.com \
--to=andrewjmoreton@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).