Subject: Re: bug#55278: json-parse-string

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 09 May 2022 12:45:15 +0200

Daniel Mendler <[email-masked]> writes:

> In osm-mode I have a list of requirements which must be satisfied before
> it can be used reasonably. These requirements are also listed in the
> README and in the Commentary of the package.
>
>   (unless (display-graphic-p)
>     (warn "osm: Graphical display is required"))
>   (dolist (type '(svg jpeg png))
>     (unless (image-type-available-p type)
>       (warn "osm: Support for %s images is missing" type)))
>   (unless (libxml-available-p)
>     (warn "osm: libxml is not available"))
>   (unless (ignore-errors (equal [] (json-parse-string "[]")))
>     (warn "osm: libjansson is not available"))

Perhaps it should be signalling errors here instead of warnings?  (And
it would probably be nice if it collected all the requirements and said
"Error: Need libjansson, libxml and" etc in one go.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no