From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#69952: [PATCH] Support pdumping compiled queries by dumping their source Date: Sat, 4 May 2024 14:29:06 -0700 Message-ID: <493C3C1B-74F2-405D-830F-213B4D76DDC1@gmail.com> References: <86r0g1zaqi.fsf@gnu.org> <86le5hr9oj.fsf@gnu.org> <861q709y5y.fsf@gnu.org> <9B2A2190-AB42-4F1B-9F9D-5623B343CF0A@gmail.com> <86frvf8gf9.fsf@gnu.org> <86eday6j9o.fsf@gnu.org> <868r157wdy.fsf@gnu.org> <868r0phq6e.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36337"; mail-complaints-to="usenet@ciao.gmane.io" Cc: serg.foo@gmail.com, dancol@dancol.org, 69952@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 04 23:29:59 2024 Return-path: Envelope-to: geb-bug-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 1s3MxD-0009E1-5H for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 May 2024 23:29:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3Mwx-0007DQ-L0; Sat, 04 May 2024 17:29:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3Mwt-0007CS-Ru for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 17:29:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3Mwt-00073T-2x for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 17:29:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3MxF-0003QR-Vg for bug-gnu-emacs@gnu.org; Sat, 04 May 2024 17:30:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 May 2024 21:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69952 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69952-submit@debbugs.gnu.org id=B69952.171485819013137 (code B ref 69952); Sat, 04 May 2024 21:30:01 +0000 Original-Received: (at 69952) by debbugs.gnu.org; 4 May 2024 21:29:50 +0000 Original-Received: from localhost ([127.0.0.1]:55876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3Mx3-0003Pp-N4 for submit@debbugs.gnu.org; Sat, 04 May 2024 17:29:50 -0400 Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:53290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3Mx0-0003Pj-RV for 69952@debbugs.gnu.org; Sat, 04 May 2024 17:29:48 -0400 Original-Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3c964040721so246828b6e.2 for <69952@debbugs.gnu.org>; Sat, 04 May 2024 14:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714858158; x=1715462958; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+9vuO4bQ46ljTBc3PZD+fajYQvUCNbXWlIufhNIV2Vc=; b=KuLdykjhmRavawNz/SarB++C3BhSUNauDJSjP7Z1td/JIvPnFuL5EjoDSzojCg+mx+ 4LWW4HOE6aOWKfBnujYZVEu8rh1wA2GLmpGBXdh7MtR2nIaBCrna4RypsyZseSaUiaQ6 qE0U1dXQn2YGkHmim8FpPI6kfpeEQqrtc0zYWdFv2blNwWgRxVTWvZpg1Aewabp0fE2k X2W6+ZeANmGfh26UT4jlFG1Ka1v7lge67O/5UpHwfjMJC+WhHLsM8PeU31CDC+z9AePp XavRN3/zUkQxxdeQpe29nUSqTa6iUXMLlMV9uA3K8ezRh9cPWDJCh/CRrhDGeWYly78g 0PvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714858158; x=1715462958; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+9vuO4bQ46ljTBc3PZD+fajYQvUCNbXWlIufhNIV2Vc=; b=dSfcQV3so2bZFJGB2GhUBBOLb0OBX/ScYGr06YpLRccr3ywYRv05htYIeSGshJUDOl HYDlf5llztt0vcDmAb7vBaUR/JyVdlhSnQrXurkxt5BsfZMd7TnTSd/1ZGowUwwkUVee QABI4/aA5efMAxEiRenXVqSnDwX6/CbBkgQenzKsIbJodhKNwXGw0e3UaZXc3Q3JioKf Pq+ZElKGSCglxd2MrHgoBF76X77N/UoONmTGlCwb/IZcrR+djDt6OlbLP6KFQ7I5j3mE BBWOS3qyAeqhjF91bhooPusZWfpIT4vtZ6w0wFeSLjPe/hR0yMENVHB8czi9eQQeoje3 jjIQ== X-Forwarded-Encrypted: i=1; AJvYcCXzUphbJVJa6zmNOYEkFFcRQo3K2ABI5rR7vD7mxxEDbcxTtbkcKXxuKUieyWiKRVnyAU3mOHsfZi8MQJksLuuQKr5z3cc= X-Gm-Message-State: AOJu0YwZRyIDdy1/jmtNZEReNj7paP2/MBYoReBrRpI7UZEk4+3CJ41T xQl2j6UpBBbJ2vLHEFDjmm3I8hnirL8HUEhXLBlVXD16rwFWoUOY X-Google-Smtp-Source: AGHT+IHmIylvdfeSHNYNqn2Lzd9f3nGTVX8JbKJKG57Vfohyu4tzYG4HviKYh+Vqv4mCVlaJQSzKkw== X-Received: by 2002:a05:6808:428d:b0:3c9:68ef:88 with SMTP id dq13-20020a056808428d00b003c968ef0088mr312930oib.55.1714858157949; Sat, 04 May 2024 14:29:17 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:641:300:4910:1856:1180:222a:3188]) by smtp.gmail.com with ESMTPSA id j190-20020a6380c7000000b0061b9d60740bsm4145660pgd.93.2024.05.04.14.29.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2024 14:29:17 -0700 (PDT) In-Reply-To: <868r0phq6e.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284467 Archived-At: > On May 4, 2024, at 2:39 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sun, 21 Apr 2024 23:25:10 -0700 >> Cc: dancol@dancol.org, >> serg.foo@gmail.com, >> 69952@debbugs.gnu.org >>=20 >>> On Apr 21, 2024, at 11:18 PM, Eli Zaretskii wrote: >>>=20 >>>=20 >>> We cannot safely signal an error at that point, I think, so just >>> keeping the query as a string should do, as it will then signal an >>> error at run time when that query is used, is that right? >>=20 >> Yes, most likely a function-undefined signal, since all the treesit.c = functions like treesit-query-capture or treesit-query-compile will be = nonexistent. And usually the Lisp program trying to use the query would = check for tree-sitter availability with treesit-available-p before = trying to use any tree-sitter functions; so that signal will be usually = avoided as well. >=20 > Can you suggest such an addition to the patch? Let me take a look. Yuan=