From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gustav Broberg Newsgroups: gmane.emacs.bugs Subject: bug#66983: [PATCH] sql.el: Let sqlite's prompt-cont-regexp accept new dynamic prompt Date: Fri, 15 Dec 2023 11:05:54 +0100 Message-ID: References: <83o7g1yfr7.fsf@gnu.org> <838r6mdvzw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000063662c060c898d6c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1859"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael@mauger.com, Eli Zaretskii , 66983@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 14:32:39 2023 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 1rE8Ix-0000FK-Aq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 14:32:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rE8IU-0005q1-VC; Fri, 15 Dec 2023 08:32:11 -0500 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 1rE8IP-0005pg-Lf for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 08:32:06 -0500 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 1rE8IN-00066D-CO for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 08:32:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rE8IN-0006VF-7n for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 08:32:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gustav Broberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 13:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66983 X-GNU-PR-Package: emacs Original-Received: via spool by 66983-submit@debbugs.gnu.org id=B66983.170264706324268 (code B ref 66983); Fri, 15 Dec 2023 13:32:03 +0000 Original-Received: (at 66983) by debbugs.gnu.org; 15 Dec 2023 13:31:03 +0000 Original-Received: from localhost ([127.0.0.1]:51754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rE8HO-0006IQ-O0 for submit@debbugs.gnu.org; Fri, 15 Dec 2023 08:31:03 -0500 Original-Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:47465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rE55Q-00078o-CX for 66983@debbugs.gnu.org; Fri, 15 Dec 2023 05:06:29 -0500 Original-Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-2035a859803so338319fac.3 for <66983@debbugs.gnu.org>; Fri, 15 Dec 2023 02:06:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702634782; x=1703239582; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Pifv3iJUb4gUdzwLpMQQswHKb9+40/U/GXxgsMuKZrg=; b=IoK89fiCQVjv+NPA8iLs7obxxDT05qjBUQOVU8HJ8s8QfqNqYjYsX2gSOcRt7h6SZ/ Gm87gvbMXF+nEYz3INUCrhplVcDLoCu8cZtDRJssSqLQqeeV7j1YHZnf+Sn339yN9pUc TZGnGrnXBSRelwQuUn/Ldba6iWVAs4pmRxD1/1RnGh0m5nWgxXHrHDGa4hYdOY/zDhpA oB8V2k/MfoNTAnk7EJ/VbhDgs1mGrfAIwKZcBpQKsyQjTT6mmp/gD/DpP3F5ozNwtjik VfoOXZy9uLLYyx/xzF957/BoJmJRueAkHA6fTTqr/zYxB3tHxt9D28uhtTYBOReO+JRO Krwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702634782; x=1703239582; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Pifv3iJUb4gUdzwLpMQQswHKb9+40/U/GXxgsMuKZrg=; b=fU8EGs3RJPPWzplttrrkcsumpTfblD2IvfZeRzCrb0kyht5Tatp8Zm3xJgPzE5oXr+ 9E7vlyN0uVax6Xc0lKGkHa/Hoy3zJ0bQh6Ka28d/hLy80h5ijytvaWVyZLAUZXH/Xr4J DbOMUC7bib2TiZgQaMTjGF0nR4rnYCRWoNZr+mcSyep9CRTkSivFK5cDfxPLESjVz7F+ XtE6JpF+Yl6aV06p9PXdrhCvKrmvj5Z7lcdZS3FqT8YD+aGEL5FYLNkJTAKVHX1mcQbk 2UcujzQMP5hhXQ6EzX5Iy1eOtcOGLoX42vS4nQmaSyqDIUXbJHMugMi3EojIB0pEULrf 2hRg== X-Gm-Message-State: AOJu0Yz8dsXipBtsGbTKDRqrp7ECKrVP84JEtkaoMsSweYXKq5ikUi8u UT0OD+P0MpNb/dPLAFircA6vq+hu6kEiITaecuY= X-Google-Smtp-Source: AGHT+IFx8IKb56JIsk+p7TCKAyNzH8PH3/qa1lprXBvcltipawk4RBARLZ6gtsV6t592ASC0YPyvkIa7trjdo5A3QOk= X-Received: by 2002:a05:6870:80b:b0:1fb:75a:77aa with SMTP id fw11-20020a056870080b00b001fb075a77aamr11411355oab.91.1702634782416; Fri, 15 Dec 2023 02:06:22 -0800 (PST) In-Reply-To: X-Mailman-Approved-At: Fri, 15 Dec 2023 08:31:02 -0500 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:276265 Archived-At: --00000000000063662c060c898d6c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 2:28=E2=80=AFAM Stefan Kangas wrote: > Eli Zaretskii writes: > > > Ping! Michael, can you please look into this? > > > >> Cc: 66983@debbugs.gnu.org > >> Date: Fri, 10 Nov 2023 14:06:20 +0200 > >> From: Eli Zaretskii > >> > >> > From: Gustav Broberg > >> > Date: Fri, 10 Nov 2023 10:41:03 +0100 > >> > > >> > Patch for changing sql.el sqlite's prompt-cont-regexp to be > compatible with SQLite 3.41.0. > >> > >> Thanks. > >> > >> Michael, any comments or suggestions? > > It would be nice to get this fixed already in Emacs 29.2, given that > SQLite is so common. > > FWIW, if Michael doesn't have time to look into this, the patch seems to > make sense. It just allows a few more prompts that weren't allowed > before. > > At the same time, if these are indeed the only allowed prompts: > > ...> > ` ...> > ' ...> > " ...> > /* ...> > (xN...> (where N is 1 to 9) > (.....> > )x!...> > > we could probably make something a bit more strict. Where do we find > the documentation for that though? Gustav, where is that from? > Thanks, Not sure if it was clear, but the regexp in my actual patch is more strict than in my first email: ^[`'\"/() ][x*. ][1-9!. ]\\.\\.\\.> Unfortunately I've found no documentation listing the continuation prompts =E2=80=93 I derived this list by inspecting the sqlite source code. For exa= mple: https://github.com/sqlite/sqlite/blob/e98238561911f85e54af3e6f26e47c2de8d1c= da1/src/shell.c.in#L583-L611 -- Gustav --00000000000063662c060c898d6c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Dec 15, 2023 at 2:28=E2=80=AFAM S= tefan Kangas <stefankangas@gma= il.com> wrote:
Eli Zaretskii <eliz@gnu.org> writes:

> Ping!=C2=A0 Michael, can you please look into this?
>
>> Cc: 669= 83@debbugs.gnu.org
>> Date: Fri, 10 Nov 2023 14:06:20 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>> > From: Gustav Broberg <gustav.broberg@gmail.com>
>> > Date: Fri, 10 Nov 2023 10:41:03 +0100
>> >
>> > Patch for changing sql.el sqlite's prompt-cont-regexp to = be compatible with SQLite 3.41.0.
>>
>> Thanks.
>>
>> Michael, any comments or suggestions?

It would be nice to get this fixed already in Emacs 29.2, given that
SQLite is so common.

FWIW, if Michael doesn't have time to look into this, the patch seems t= o
make sense.=C2=A0 It just allows a few more prompts that weren't allowe= d
before.

At the same time, if these are indeed the only allowed prompts:

=C2=A0 =C2=A0 =C2=A0 ...>
=C2=A0 =C2=A0`=C2=A0 ...>
=C2=A0 =C2=A0'=C2=A0 ...>
=C2=A0 =C2=A0"=C2=A0 ...>
=C2=A0 =C2=A0/* ...>
=C2=A0 =C2=A0(xN...> (where N is 1 to 9)
=C2=A0 =C2=A0(.....>
=C2=A0 =C2=A0)x!...>

we could probably make something a bit more strict.=C2=A0 Where do we find<= br> the documentation for that though?=C2=A0 Gustav, where is that from?

Thanks,

Not sure if it was clear, but = the regexp in my actual patch is more strict than in my first email: ^[`= 9;\"/() ][x*. ][1-9!. ]\\.\\.\\.>

Unfortunately I've fou= nd no documentation listing the continuation prompts =E2=80=93 I derived th= is list by inspecting the sqlite source code. For example:
https://github.com/sqlite/sqlite/blob/e98238561= 911f85e54af3e6f26e47c2de8d1cda1/src/shell.c.in#L583-L611

-- Gust= av
=C2=A0
--00000000000063662c060c898d6c--