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: 29.1; sql-sqlite prompt-cont-regexp incompatible since sqlite 3.41.0 Date: Tue, 7 Nov 2023 11:20:18 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d12a8206098d5234" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39196"; mail-complaints-to="usenet@ciao.gmane.io" To: 66983@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 07 12:43:41 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 1r0KUe-0009yw-UU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Nov 2023 12:43:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0KUS-00035V-7E; Tue, 07 Nov 2023 06:43:28 -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 1r0KUP-00034r-31 for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 06:43:25 -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 1r0KUO-0003Y7-QL for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 06:43:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0KV0-0007C4-DG for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 06:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gustav Broberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Nov 2023 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66983 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169935742927622 (code B ref -1); Tue, 07 Nov 2023 11:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Nov 2023 11:43:49 +0000 Original-Received: from localhost ([127.0.0.1]:41382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0KUb-0007B9-2w for submit@debbugs.gnu.org; Tue, 07 Nov 2023 06:43:49 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:58040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0JDA-0004t8-Oi for submit@debbugs.gnu.org; Tue, 07 Nov 2023 05:21:33 -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 1r0JCS-000406-Ox for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 05:20:49 -0500 Original-Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0JCQ-0004rw-V2 for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 05:20:48 -0500 Original-Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-da2b9211dc0so5326706276.3 for ; Tue, 07 Nov 2023 02:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699352445; x=1699957245; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=tx71ccI/E9rK3oopN9MHF9kaVHPEXWfKZv3NpenUL+g=; b=BH3GuETb5g/Bo7vvi809McQ9sXyldx3xtq0VlG/rcmyuD0MbV0DJo7nHWjLJ5y4qVF saHY1UNDjm8zr7HkgOhCHFVNG1KcG65TRJiaohA1XHELyXa1HCFnhMGKih9Qk3+xiNLF 02HKB2GsPWnoeB9CiCnEstu1bEncf3mUk16n2RMiAu/fAOreA/ftcy2BGj13IAGkKaW4 +whdtCEnuN7LncwjJboMv7u2mOIQ6+3EWn3E8w+zRDYDH1qx3DxLqdOg6MyM7HaKeWRI 37quHf5Cpy5pkbW3uhuY8otODveWAeNC5yJDbrDbxzojGtACNoC7myTnvJ6F82lwl6iv xbpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699352445; x=1699957245; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tx71ccI/E9rK3oopN9MHF9kaVHPEXWfKZv3NpenUL+g=; b=l8cT5ei9K0wEdHEfNlyuqxHzQ3wN6wtE0y4Ji573qPJI32Cg9ddVZqueYCX299wXjz QZeP23F8hvbmdEz9O2G6xs4Mj8JSf1C2zkd523B7aEGImIHrk5bk9JHRdyz5p6AQ/g0Q kZTWqRWh8HmBpnkPENZiKbCMrcli3hAqOc1QuO19o2KBadm0ennG0BfotJcDSp01VH2D IwHDWxp4iu7VezVWO59plIkclnkPRbJ8QqjgtqHoE36VoujEHldwWH8QVnxqQ61U+krL t59orcN531Cf3LGPgvW5bBDX5C5kE+LZiNOCessFM3vwfFUa4wSBvDb2zF1PlcQfXT5q YHFQ== X-Gm-Message-State: AOJu0YxxFh+JWGdjy9MAsK6HBfoOP2AoJgKmldfKtvdfsrXXYxF6mlew Wu+N4KIUTDt80/ETZjlg5HN6wtZYMb6EuXnq3F+5wPbwC897pg== X-Google-Smtp-Source: AGHT+IGPqyz25VAuaGJKzfqgv3sXL+6tEIE28sz8M5ZuR+EFy86pm7bUgTfJuiExlc9xUrjFS7xMkYHCseQidNbqnRI= X-Received: by 2002:a5b:5ca:0:b0:da0:5ba2:6275 with SMTP id w10-20020a5b05ca000000b00da05ba26275mr28629605ybp.34.1699352444740; Tue, 07 Nov 2023 02:20:44 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::b2a; envelope-from=gustav.broberg@gmail.com; helo=mail-yb1-xb2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 07 Nov 2023 06:43:35 -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:273923 Archived-At: --000000000000d12a8206098d5234 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The continuation prompt regexp for sql.el's sqlite product is hard coded as " ...> ": http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/sql.el?id=3D= a1abb6a85e6605c256595b8d7b885018e5421c28#n497 But since SQLite version 3.41.0 this prompt is no longer static but dynamic and contains information about current context (unclosed string, parentheses, etc.): https://www.sqlite.org/releaselog/3_41_0.html For example, sending a multi-line query with an unclosed string like: SELECT 1 AS "two lines "; will give an output like: SQLite version 3.44.0 2023-11-01 11:23:50 Enter ".help" for usage hints. sqlite> " ...> =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 =E2=94=82 two lines =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=A4 =E2=94=82 1 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98 Run Time: real 0.000 user 0.000118 sys 0.000076 because the continuation prompt is '" ...> '. Setting a custom sqlite continuation prompt regexp to match the dynamic prompt fixes this: (sql-set-product-feature 'sqlite :prompt-cont-regexp "^...\\.\\.\\.> ") I suggest updating the regexp in sql.el to this (or some more specific) regexp. Thanks! --=20 Gustav --000000000000d12a8206098d5234 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The continuation prompt regexp for sql.el's sqlite pro= duct is hard coded as " =C2=A0 ...> ":
http://git.savannah.gnu.org/cgit/emac= s.git/tree/lisp/progmodes/sql.el?id=3Da1abb6a85e6605c256595b8d7b885018e5421= c28#n497

But since SQLite version 3.41.0 this prompt is no longe= r static but dynamic
and contains information about current context (unc= losed string, parentheses, etc.):
https://www.sqlite.org/releaselog/3_41_0.html
For example, sending a multi-line query with an unclosed string like:
=
=C2=A0 SELECT 1
=C2=A0 AS "two lines
=C2=A0 ";

w= ill give an output like:

=C2=A0 SQLite version 3.44.0 2023-11-01 11:= 23:50
=C2=A0 Enter ".help" for usage hints.
=C2=A0 sqlite&g= t;
=C2=A0 " =C2=A0...> =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =90
=C2=A0 =E2=94=82 two lines =E2=94=82
=C2=A0 =E2=94=9C=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=A4
=C2=A0 =E2=94=82 1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2= =94=82
=C2=A0 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=98
=C2=A0 Run = Time: real 0.000 user 0.000118 sys 0.000076

because the continuation= prompt is '" =C2=A0...> '.

Setting a custom sqlite = continuation prompt regexp to match the dynamic prompt
fixes this:
=C2=A0 (sql-set-product-feature 'sqlite :prompt-cont-regexp "^..= .\\.\\.\\.> ")

I suggest updating the regexp in sql.el to th= is (or some more specific)
regexp.

Thanks!
--
Gustav
--000000000000d12a8206098d5234--