From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: How to test for native JSON support? Date: Tue, 4 May 2021 17:41:12 +0300 Message-ID: <6e5917e4-8aa5-9630-2f5c-737a3ac01ae0@yandex.ru> References: <87k0ohuybx.fsf@fastmail.fm> <785b4132-da32-0da8-519d-b39a58270f32@gmail.com> <87y2cuybeu.fsf@passepartout.tim-landscheidt.de> <838s4u66f0.fsf@gnu.org> <87fsz2n075.fsf@fastmail.fm> <834kfi64ts.fsf@gnu.org> <8a5699f0-5532-2f6f-f2dd-4f804f02468f@yandex.ru> <83v97y4my9.fsf@gnu.org> <2510de19-5b28-06d3-9a7b-631c9e506578@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4694"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: help-gnu-emacs To: Philipp Stephani Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 16:41:54 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldwFF-00018W-OJ for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 16:41:53 +0200 Original-Received: from localhost ([::1]:60130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldwFE-0003MM-Rx for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 10:41:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldwEg-0003MB-Am for help-gnu-emacs@gnu.org; Tue, 04 May 2021 10:41:19 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:53232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldwEe-0000A1-LJ; Tue, 04 May 2021 10:41:18 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id g65so5589008wmg.2; Tue, 04 May 2021 07:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+iAmmE/pjsWmhcycWZKvGeDyyZOP5ir0QcyRmjKi2rs=; b=X9Oy2poSrSoQGbWz287upu2ARTzShVkYxeLMcHx+fmqb2GEiCe/myHzG8Wf9nUasJX PQlL0/80AI9g+Mbv1diylmaTbqBtaX6J76rbhPt9M8V2rZ7+yhLAH72PlXuvuUKJhAkL qsleJWH2EQm58qYXlsqUrIwXSxOt4UfV5RQAKKZaId04dcxhh/eXyYmQ9xtj3hejaNyo DT660RWPY/zYx2i8gkZ0jAOoorGRphSsH0K6q0eYq+goh69ZE4On8x9i32eHrpQCO7MM sj1rkGifNARzzOYmn13CrVxmLfiJiCk1yL91trPKZUHATYp+3rrrcmm4JAjDmTKsYEp7 rA6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+iAmmE/pjsWmhcycWZKvGeDyyZOP5ir0QcyRmjKi2rs=; b=MphMqYIMafMHECprXBlbzSap9Q1oJ6Kb/wCA0se2UFu9Xoe0c+7w4Ieump4CpH6ZaE dNpAV0Rq71pAW6iL9Zcx4UQYYmGR+f00j8EUqbMbTxELgpA3hz+YJWpZxc3anzfPRhwb vbP7qWWCpDdqvtJlMXjwTxOcJIMUrhYMFm4DtaWD/H+Dtb6OfQ7G7yC6D33YOG3Yop+0 Gip4hJEShjGD3eMAqLNqjhOsSvLIPYWPSwwWxZ+B7KNGwXl87kmXd5F75vHcDCNCJ8FS dMj2dtbg1RRR6Esg2CfTKW+9l+10hFeHqWByWtp6snN2agP43JOuOyo4SZd3jPM0Lc56 0nhQ== X-Gm-Message-State: AOAM5315kmnXZ1whj9KslB+b5eYAw0I61zzz7wQMJgCcwQqC0z7Lsnq+ QE192xYFyhu1Erd8sbe9vrYMy0vqDKk= X-Google-Smtp-Source: ABdhPJxIQdrGNsx6LhN0ie5QYPapQpylf/7Q1RIe2lNcLum4qMIlwjn+gzHqbmkczyf5eNOfh8xfpA== X-Received: by 2002:a1c:193:: with SMTP id 141mr19157910wmb.99.1620139274818; Tue, 04 May 2021 07:41:14 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m11sm16469179wri.44.2021.05.04.07.41.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 07:41:14 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=raaahh@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129431 Archived-At: On 04.05.2021 17:32, Philipp Stephani wrote: > Can you make this signal a specific error symbol so that callers can > catch the error and react accordingly, e.g. by falling back to > json.el? I almost certainly can, and it does sound like a good idea. I can't test the resulting patch, though (having no access to a Windows machine), and our Windows developers can better choose the symbol to use (AFAICT the situation with libraries possibly being absent at runtime is solely Windows-specific). Step 2 might be to propagate the same error-signaling behavior to other features, like xml.c.