From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 12:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 49660@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162678558816379 (code B ref -1); Tue, 20 Jul 2021 12:54:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2021 12:53:08 +0000 Received: from localhost ([127.0.0.1]:33185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5pFE-0004G7-KK for submit@debbugs.gnu.org; Tue, 20 Jul 2021 08:53:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:57906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5pFD-0004Fz-KU for submit@debbugs.gnu.org; Tue, 20 Jul 2021 08:53:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5pFD-0003jH-Bf for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 08:53:07 -0400 Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:46930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5pFB-00082n-SA for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 08:53:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Y7bmREfgNWWfwV6MVSplfFg0Sz6mZOJ4yrLK24Bj9yQ=; b=cCEIA3bfkiFh7eIrc4aguL2Sax O5ooqoZKbL3Zrw1NeMgkmFE8tFicWCRffyONJ+ydKstJK331d485Ikd7M0ubtU720rYxNMGc0Pj8j wxcCNLutT2cdrSXKEws4k6/ccNDC5EUZDeB1BHJlKSPvnFsTS75IrHrClu9XFWLO9dG0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5pF7-0003Lv-6l for bug-gnu-emacs@gnu.org; Tue, 20 Jul 2021 14:53:03 +0200 From: Lars Ingebrigtsen X-Now-Playing: Pet Shop Boys's _Hotspot_: "I don't wanna" Date: Tue, 20 Jul 2021 14:53:00 +0200 Message-ID: <87pmvddu4z.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: All other libraries like this have an -available-p function, but not json.c. But json.c is slightly unusual in that it's not compiled at all if jansson isn't available, so the function will have to go somewhere else, which is rather, er, inconvenient. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) All other libraries like this have an -available-p function, but not json.c. But json.c is slightly unusual in that it's not compiled at all if jansson isn't available, so the function will have to go somewhere else, which is rather, er, inconvenient. Anybody have an idea how to solve that problem? In GNU Emacs 28.0.50 (build 93, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-07-19 built on elva Repository revision: b0c73439932eefb8302ec10c61d95ffcf2ef39be Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.162678627725995 (code B ref 49660); Tue, 20 Jul 2021 13:05:02 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 13:04:37 +0000 Received: from localhost ([127.0.0.1]:33195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5pQK-0006lD-RX for submit@debbugs.gnu.org; Tue, 20 Jul 2021 09:04:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5pQI-0006ky-NL for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 09:04:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42686) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5pQD-0001LD-Hd; Tue, 20 Jul 2021 09:04:29 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4557 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5pQD-0006d3-5b; Tue, 20 Jul 2021 09:04:29 -0400 Date: Tue, 20 Jul 2021 16:04:25 +0300 Message-Id: <83im155e7a.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87pmvddu4z.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 20 Jul 2021 14:53:00 +0200) References: <87pmvddu4z.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Tue, 20 Jul 2021 14:53:00 +0200 > > > All other libraries like this have an -available-p function, but not > json.c. > > But json.c is slightly unusual in that it's not compiled at all if > jansson isn't available, so the function will have to go somewhere else, > which is rather, er, inconvenient. > > Anybody have an idea how to solve that problem? Compile json.c always, but have a HAVE_LIBJANSSON preprocessor symbol that would effectively ifdef away all of json.c except that single function (and syms_of_json). From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.162678863329677 (code B ref 49660); Tue, 20 Jul 2021 13:44:02 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 13:43:53 +0000 Received: from localhost ([127.0.0.1]:33244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5q2L-0007ia-3P for submit@debbugs.gnu.org; Tue, 20 Jul 2021 09:43:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5q2J-0007iN-9p for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 09:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wleguDk9sB/Q9EfErkwsqfmgQRkStO2q8zYjUhK53p8=; b=j+9Hmb9rnWUR5HosiIApn/TO6I 8mwPKgB/Gu37pXtP5lXdXBcdYwwwDFyxmke4CBUagxihfKE9ncBuenKJijJ9FBlI41ubgaXSmtMVn hq/+dLoM9ve2+zutTh38WhZI9LxjquUcTL8FRPvNlDVTwMz421PbmD0XTHs5dEcthOgI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5q2A-0003lm-Fi; Tue, 20 Jul 2021 15:43:45 +0200 From: Lars Ingebrigtsen References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEWFEReKKiilnJGS WVRyDxNgIx4qJR56hHn///9MMD0NAAAAAWJLR0QIht6VegAAAAd0SU1FB+UHFA0qIlXVItYAAAGU SURBVDjLddHBUuMwDAZgZUju0TbhAWCmPZelu1czyD3HOM6dqWMegAOvj2S7JS6pD53WX35JUQHK g/HAn0eADe6vAeDuAeDpgT9qle4rh9hCgs1ffgKGDCjQJoiPnBO4kUoR0skAhqH6DVWLsdbvBBpc LyUAqVS+cTxyrVTjuQUuYVJ0DN40I0O7hKPSIcxDbzoZaglDwwD3JvYWIEXyrfF1CD5thCOvDEQS qgOXer+fGZAXlyBGjkHOUGFbldDI/dzKFutLKTonnJKN1KBygpsogdm2e1nJpRQXUxPDZJ1ssf0B UDxsOAX3abCrgH4SsVI4/ft8R6j59wVojtN+nSwiFTDGxO602SO9LEAPU4zMThKwAr0xRPUCKN4H ezCu6DHlwMejNgWMCUL4r/sS8v3But4V4NPavdVuDbbe9lc9xnOiH8s3dwIf28EeSnCjTn+t7Yi6 AtIbDq/PVCR0BnLPssMF+Ay64/WUCenuBa5LcWSWwUuIGMZ1oBDnW4G8g1XQ+gbQRLdKZdjdgLft Ouin8A0rqO3Ehwu7/gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0yMFQxMzo0MjozNCswMDow MGufFEkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMjBUMTM6NDI6MzQrMDA6MDAawqz1AAAA AElFTkSuQmCC X-Now-Playing: L.u.c.a.'s _Fabric 94: Steffi_: "Echo 1" Date: Tue, 20 Jul 2021 15:43:42 +0200 In-Reply-To: <83im155e7a.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Jul 2021 16:04:25 +0300") Message-ID: <87k0lldrsh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Compile json.c always, but have a HAVE_LIBJANSSON preprocessor symbol > that would effectively ifdef away all of json.c except that single > function (and syms_of_json). Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Compile json.c always, but have a HAVE_LIBJANSSON preprocessor symbol > that would effectively ifdef away all of json.c except that single > function (and syms_of_json). Yeah, I guess there's really no other cleanish way to do this? And it's the pattern we follow in all the other library-specific src/*.c files, I think... So unless somebody protests (or beats me to it), I'll do this in a few days. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 14:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.162679244529535 (code B ref 49660); Tue, 20 Jul 2021 14:48:01 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 14:47:25 +0000 Received: from localhost ([127.0.0.1]:35083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5r1o-0007g5-Oh for submit@debbugs.gnu.org; Tue, 20 Jul 2021 10:47:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5r1n-0007ac-29 for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 10:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZuEj+1/XGoNzZCvJV2nHJ5GoHwwpRIdDkEeLtqW+jpA=; b=EwMnjBDYa3UsXKlXJ6TkzbA1+1 aRZnyL13FHJKqkqVFRiPqm7k+7V54Ksr6V662B7RAwNgIP1itB+vLI+87p+ZzB1IW1jd70ILqD6r3 CInyl2r+vSC2c29qGQIKJ3BR4xleEuEDkQDB2CXAIKDumG47ZCMdajMaQvQM9tMVGRTM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5r1d-0004JT-Ti; Tue, 20 Jul 2021 16:47:16 +0200 From: Lars Ingebrigtsen References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> <87k0lldrsh.fsf@gnus.org> X-Now-Playing: Dexter & Virginia's _Fabric 94: Steffi_: "Off the Beat" Date: Tue, 20 Jul 2021 16:47:13 +0200 In-Reply-To: <87k0lldrsh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 20 Jul 2021 15:43:42 +0200") Message-ID: <87bl6xcaa6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Yeah, I guess there's really no other cleanish way to do this? Oh, I thought of a simple hack: We could define json-available-p in json.c, but we could also have (say) loadup.el check whether it's defined, and if not, it can define a nil-returning stub? That'll m [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Yeah, I guess there's really no other cleanish way to do this? Oh, I thought of a simple hack: We could define json-available-p in json.c, but we could also have (say) loadup.el check whether it's defined, and if not, it can define a nil-returning stub? That'll mean a whole lot less #ifdef-ing in json.c. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 15:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.16267959394885 (code B ref 49660); Tue, 20 Jul 2021 15:46:01 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 15:45:39 +0000 Received: from localhost ([127.0.0.1]:35139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5rwB-0001Gj-JF for submit@debbugs.gnu.org; Tue, 20 Jul 2021 11:45:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5rwA-0001GY-N8 for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 11:45:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48700) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5rw5-0007Ak-Ec; Tue, 20 Jul 2021 11:45:33 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2433 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5rvy-0008If-Qa; Tue, 20 Jul 2021 11:45:32 -0400 Date: Tue, 20 Jul 2021 18:45:22 +0300 Message-Id: <83fsw956r1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87bl6xcaa6.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 20 Jul 2021 16:47:13 +0200) References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> <87k0lldrsh.fsf@gnus.org> <87bl6xcaa6.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 49660@debbugs.gnu.org > Date: Tue, 20 Jul 2021 16:47:13 +0200 > > Lars Ingebrigtsen writes: > > > Yeah, I guess there's really no other cleanish way to do this? > > Oh, I thought of a simple hack: We could define json-available-p in > json.c, but we could also have (say) loadup.el check whether it's > defined, and if not, it can define a nil-returning stub? That'll mean a > whole lot less #ifdef-ing in json.c. If you are ready to define json-available-p somewhere other than json.c, then you could simply do that in subr.el or somesuch. It would be cleaner than defining stubs in loadup.el. From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.16267962285392 (code B ref 49660); Tue, 20 Jul 2021 15:51:02 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 15:50:28 +0000 Received: from localhost ([127.0.0.1]:35152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5s0q-0001Ou-Ji for submit@debbugs.gnu.org; Tue, 20 Jul 2021 11:50:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5s0p-0001Oh-18 for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 11:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7Ed866KBHImG4t/FBMJT/DA+iQpSuGdCtMdQHv0+t3w=; b=acUo+qsEPd0JQ4JasxA2rpG7oD +846q8scZ/bq5MW8EUEcF45V8mMuRAj9d0WK8VZfOV6WrCDvoUmHoUavWhiROCLxhB+TfqCUsfbu2 R9dIWfNJlKlg/JcWo6ofvNkRcHtfYaPMCtEFIdw2VsbT85f7jPPsMbjlMI6KU1rp9YFA=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5s0f-0004md-Kq; Tue, 20 Jul 2021 17:50:20 +0200 From: Lars Ingebrigtsen References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> <87k0lldrsh.fsf@gnus.org> <87bl6xcaa6.fsf@gnus.org> <83fsw956r1.fsf@gnu.org> X-Now-Playing: John T. Gast's _Inna Babalon_: "Those Secluded Preferences" Date: Tue, 20 Jul 2021 17:50:17 +0200 In-Reply-To: <83fsw956r1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Jul 2021 18:45:22 +0300") Message-ID: <87fsw9nfwm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > If you are ready to define json-available-p somewhere other than > json.c, then you could simply do that in subr.el or somesuch. It > would be cleaner than defining stubs in loadup.el. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > If you are ready to define json-available-p somewhere other than > json.c, then you could simply do that in subr.el or somesuch. It > would be cleaner than defining stubs in loadup.el. The meats of json-available-p have to be in json.c, though? (It has to call init_json_functions (on Windows) to see whether we have the DLL or not.) We could have a json--available-p in json.c that does that, but it doesn't seem less hackey... but I guess it doesn't really matter much -- neither solution is super clean. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jul 2021 16:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.162680004611332 (code B ref 49660); Tue, 20 Jul 2021 16:55:01 +0000 Received: (at 49660) by debbugs.gnu.org; 20 Jul 2021 16:54:06 +0000 Received: from localhost ([127.0.0.1]:35214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5t0Q-0002wi-Gv for submit@debbugs.gnu.org; Tue, 20 Jul 2021 12:54:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5t0O-0002wE-Oi for 49660@debbugs.gnu.org; Tue, 20 Jul 2021 12:54:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51610) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5t0J-00033A-C1; Tue, 20 Jul 2021 12:53:59 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2646 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5t0J-0001fI-0g; Tue, 20 Jul 2021 12:53:59 -0400 Date: Tue, 20 Jul 2021 19:53:55 +0300 Message-Id: <83a6mh53ks.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87fsw9nfwm.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 20 Jul 2021 17:50:17 +0200) References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> <87k0lldrsh.fsf@gnus.org> <87bl6xcaa6.fsf@gnus.org> <83fsw956r1.fsf@gnu.org> <87fsw9nfwm.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: 49660@debbugs.gnu.org > Date: Tue, 20 Jul 2021 17:50:17 +0200 > > Eli Zaretskii writes: > > > If you are ready to define json-available-p somewhere other than > > json.c, then you could simply do that in subr.el or somesuch. It > > would be cleaner than defining stubs in loadup.el. > > The meats of json-available-p have to be in json.c, though? No, it doesn't have to. You could have json-available-p that simply tested one of json.c primitives to be fboundp, and if so, tried to invoke one of them on a trivial input to see if it signals an error. Alternatively, we could do this like decompress.c does: it would require the test for availability to be slightly more complex: (and (fboundp 'json-available-p) (json-available-p)) Would that be good enough? From unknown Sun Jun 22 04:13:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49660: 28.0.50; json-available-p should exist Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Jul 2021 10:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49660 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 49660@debbugs.gnu.org Received: via spool by 49660-submit@debbugs.gnu.org id=B49660.16268646668253 (code B ref 49660); Wed, 21 Jul 2021 10:52:01 +0000 Received: (at 49660) by debbugs.gnu.org; 21 Jul 2021 10:51:06 +0000 Received: from localhost ([127.0.0.1]:36178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69of-000293-UD for submit@debbugs.gnu.org; Wed, 21 Jul 2021 06:51:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69oe-00028Y-PO for 49660@debbugs.gnu.org; Wed, 21 Jul 2021 06:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=g/luTqM+TuAbM8pZkuvX8RlLcrXADlLLl1N4xtuzn+Q=; b=BPuUu76j5ABxSt9sq52kXuJ62f RPv0Hs1cXqgh5eBCzP8V0HWHoHQBla+Q67cBfBCJhxO028d/V8aDPs+E3jlfAvfHpZRgYFXSAm5cP 6GrEH8a0MCC6hYHY6f3A+Ixk6v9frv64DbIUZOVyxsDd6Y6vU2mMHWb9NSUaXOmFQCgc=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m69oV-0005aD-St; Wed, 21 Jul 2021 12:50:58 +0200 From: Lars Ingebrigtsen References: <87pmvddu4z.fsf@gnus.org> <83im155e7a.fsf@gnu.org> <87k0lldrsh.fsf@gnus.org> <87bl6xcaa6.fsf@gnus.org> <83fsw956r1.fsf@gnu.org> <87fsw9nfwm.fsf@gnus.org> <83a6mh53ks.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUWFRMREA4QDw0G BgUfHh0hIB4kJCP///8ETlpUAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+UHFQohMPhr+7UAAAGoSURB VDjLZVQ7lsIwDJRioJa8F8DmAiy5ANXWVNQ0y/2PsBpJzofVCwmRMqPR2AnRR6iQau+XvD3EhQUV JpISiaNnHeAHUVk5zqPCjXsLqjtOkidFmy0iKk7V/hWY2KiERb+2SqNHc0gZGYmraVUAZKWyOyeT SVl5FEDCamrERVVZEWhrwVRhiWjZ9sUZjPbjtYfK8g+QkGu2MUOS9WA4qSEXPMo2mqB/TFgWLxj1 SMKXkkyQAuqoDSrvoRHem5KqNuj0kiTA5Zb5G6biYZswAE51sQJmthzkOoAm45jnK9oyC6wNACTW WwMeR7T3zTD5YjJGY+8dFgsKYRyYAMvdM1zV4d3iJeeKuqaRFM+dm1aaMIG5dKBHej9Rv1UsP4cf 2x1TewMZZYWXQpkbbHSMLAWTa1uCYzUiHhu5rgQzmjF32heGH0LbMH7YlwPstI0lpI8AgDMfkNPY bb4iw0GLV0qy+XpdIa/TK18BlqTw0pFO73Wvu6RQe08mJxuq9oOMR0PQz/P3+Y6vhXsLlPAegZdY W++tthT8HmuZXuXzcFJkIu56mT/iD8itIv4C+SlMAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA3 LTIxVDEwOjMzOjQ4KzAwOjAwc6H0xgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNy0yMVQxMDoz Mzo0OCswMDowMAL8THoAAAAASUVORK5CYII= X-Now-Playing: Orchestral Manoeuvres in the Dark's _Souvenir (1): The Singles 1979-1987_: "Joan Of Arc" Date: Wed, 21 Jul 2021 12:50:55 +0200 In-Reply-To: <83a6mh53ks.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 20 Jul 2021 19:53:55 +0300") Message-ID: <87im14lz3k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > No, it doesn't have to. You could have json-available-p that simply > tested one of json.c primitives to be fboundp, and if so, tried to > invoke one of them on a trivial input to see if it signals [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > No, it doesn't have to. You could have json-available-p that simply > tested one of json.c primitives to be fboundp, and if so, tried to > invoke one of them on a trivial input to see if it signals an error. That's true -- especially since they now signal a distinct error when the library isn't available. Pushed to Emacs 28 now. > Alternatively, we could do this like decompress.c does: it would > require the test for availability to be slightly more complex: > > (and (fboundp 'json-available-p) > (json-available-p)) > > Would that be good enough? No, I think the -available-p predicates should always be defined. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 21 06:51:15 2021 Received: (at control) by debbugs.gnu.org; 21 Jul 2021 10:51:15 +0000 Received: from localhost ([127.0.0.1]:36181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69op-00029P-6u for submit@debbugs.gnu.org; Wed, 21 Jul 2021 06:51:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m69on-00029C-JE for control@debbugs.gnu.org; Wed, 21 Jul 2021 06:51:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xCdHwG9g0EIwxNVVrFLklowPZTXVnKH634oOW2ZQw1w=; b=reisQ8yCcyAXSc3RGWs50DxHfa DVb56iS69ficxiGPcNl2MKs5B0XcE7DoVCu1d547jLgvpYG62Bx7E0egZiU4ZmlPvgW4PpIw2MltV IajBf1+3+ZkOQZZP6zUqxAHhPhDeS+ZBx9VtKBDGIgS36ffLPgTGQhTJTuMszeep2q/Q=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m69of-0005aT-QU for control@debbugs.gnu.org; Wed, 21 Jul 2021 12:51:07 +0200 Date: Wed, 21 Jul 2021 12:51:05 +0200 Message-Id: <87h7golz3a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49660 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49660 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 49660 28.1 quit