From unknown Sat Jun 21 12:30:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64964: [PATCH] Handle tabs in the SQL shown in the column listing Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jul 2023 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64964 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 64964@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169074478525662 (code B ref -1); Sun, 30 Jul 2023 19:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2023 19:19:45 +0000 Received: from localhost ([127.0.0.1]:51262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQBxA-0006fl-G4 for submit@debbugs.gnu.org; Sun, 30 Jul 2023 15:19:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQBfQ-0006GP-GT for submit@debbugs.gnu.org; Sun, 30 Jul 2023 15:01:25 -0400 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 1qQBfK-0003V6-K9 for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 15:01:18 -0400 Received: from out-123.mta1.migadu.com ([2001:41d0:203:375::7b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQBfH-00076a-UZ for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 15:01:18 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1690743671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=6YLRwhzVsMb2CvcshMLLo0o0JeiTQvcyIhdCGSQXCek=; b=v9I2KhtMz656945+keeTFgHNBZT+kLZXSMh83W8YpA4hoUWHjpFC19w+jMYttQ2nRc/Ms9 TVFj9EL2Qi4taPsCyYvZhTX82BRsft8EQlBZJYbnRZud7M8aLfB5yBgTsVMMSSONQSFFXv PlXQQpW+p6Kt3EZp2F3OUbdnzYXMLlY= From: john muhl Date: Sun, 30 Jul 2023 13:48:20 -0500 Message-ID: <873515i5qj.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::7b; envelope-from=jm@pub.pink; helo=out-123.mta1.migadu.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, 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-Spam-Score: 0.9 (/) X-Mailman-Approved-At: Sun, 30 Jul 2023 15:19:41 -0400 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: -0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch In sqlite-mode if the SQL used to create a column used tabs then the hide part of list columns would not remove anything after the first tab. M-x sqlite-mode-open-file my.db Table Name Number of Rows=20=20 images 0=20 users 0 With point on =E2=80=98images=E2=80=99 execute sqlite-mode-list-columns (or= press c) Table Name Number of Rows=20=20 images 0=20 id INTEGER PRIMARY KEY AUTOINCREMENT user_id INTEGER FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE users 0 There are two tab characters before =E2=80=98ON DELETE=E2=80=99. Press c ag= ain and it collapses to: Table Name Number of Rows=20=20 images 0=20 ON DELETE CASCADE users 0 In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-28 built on localhost Repository revision: febf4889d196895b07b3278cfac3f8ccb6a34235 Repository branch: jm/lua-ts-mode System Description: Fedora Linux 38 (Workstation Edition) Configured using: 'configure --with-native-compilation=3Daot --with-pgtk' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Handle-tabs-in-the-SQL-shown-in-the-column-listing.patch >From 07920c70d7180cf969c264120ef267e960f779ae Mon Sep 17 00:00:00 2001 From: john muhl Date: Sun, 30 Jul 2023 13:43:10 -0500 Subject: [PATCH] Handle tabs in the SQL shown in the column listing * lisp/sqlite-mode.el (sqlite-mode-list-columns): Handle tabs. --- lisp/sqlite-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index c3047c786f7..8cb94485369 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -126,7 +126,7 @@ sqlite-mode-list-columns (forward-line 1) (if (looking-at " ") ;; Delete the info. - (delete-region (point) (if (re-search-forward "^[^ ]" nil t) + (delete-region (point) (if (re-search-forward "^[^ \t]" nil t) (match-beginning 0) (point-max))) ;; Insert the info. -- 2.41.0 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFABAEBCAAqFiEEK5CvUQq7L5O2pQef9D+KfcKUo10FAmTGs3QMHGptQHB1Yi5w aW5rAAoJEPQ/in3ClKNdocEH/0lZqILE8CK/5YM8Dqw7U5tNAKUElvAwxKL/9/zb /+Ixoe3SIbmy9WdFPyBMfDVGSy+IUMjfaWnKCddwLhpe4DFXLLcuTS33eeHKgSHG KbLmBINTlX4es82+LrQTUCTbySyw4BnueAwjfYS+kpC80iKVVMarPQO21AN3cY51 sS6hr3byBeERBxGBQ/O08B3lv6pKdgCWITg2xvpQnGtArBb1WaPqA/gGDUmdaZQw lfB1XXq1xuzvsoqb6tKt4Dn8pkh1XlmeqJqi3S+nD48A1hINzWTK1jqNk0hk24V8 G/59lCDD1JvGdCq07Dsc4mkY/zE+9Mbi+g/gUwMWgz9MDec= =MMV/ -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- From unknown Sat Jun 21 12:30:27 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: john muhl Subject: bug#64964: closed (Re: bug#64964: [PATCH] Handle tabs in the SQL shown in the column listing) Message-ID: References: <83h6pgy0hp.fsf@gnu.org> <873515i5qj.fsf@pub.pink> X-Gnu-PR-Message: they-closed 64964 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 64964@debbugs.gnu.org Date: Thu, 03 Aug 2023 08:50:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1691052602-12192-1" This is a multi-part message in MIME format... ------------=_1691052602-12192-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64964: [PATCH] Handle tabs in the SQL shown in the column listing which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64964@debbugs.gnu.org. --=20 64964: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64964 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1691052602-12192-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64964-done) by debbugs.gnu.org; 3 Aug 2023 08:49:05 +0000 Received: from localhost ([127.0.0.1]:50841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRU12-00039C-Qu for submit@debbugs.gnu.org; Thu, 03 Aug 2023 04:49:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRU11-00038P-PG for 64964-done@debbugs.gnu.org; Thu, 03 Aug 2023 04:49:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRU0w-00044F-39; Thu, 03 Aug 2023 04:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=N8612reOupGmYFb2QA/D4qZ2PgezvY/WPl7SzZPRbzQ=; b=RX5RtIGxvGQn9/XY6Ik4 fK1L8oysYY6yjV1y7rug0PNvkpnOo8sWB4XqR9VOialK8O+eH4Ra3hToeJzJqO1lqNCpnaT1gxKMH gMgDzL7X/eLmf3OqoirDlRnZ9pOYtuUY1hJVrVHwnOkM+RJ/73ZLgyCJRIiV8pdxHCAMALuE16+3m /31TjsgQ4FUtiMiLKvSU2S2fr9uiJz9qv0QMBTHJQIkRQdSJCo+E0NoEJLwl0jkA/6p97HF24OsvP H8nfLQOMQHjFesIXyzSwxmU15NqausUBar/UvURBfzK+0Cv3RJt4uSmgoZcle/GS+ofLZAHMxlj3Q 8ofEF7DMmT10Hw==; Received: from [87.69.77.57] (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 1qRU0v-0001Xp-Ix; Thu, 03 Aug 2023 04:48:57 -0400 Date: Thu, 03 Aug 2023 11:49:06 +0300 Message-Id: <83h6pgy0hp.fsf@gnu.org> From: Eli Zaretskii To: john muhl In-Reply-To: <873515i5qj.fsf@pub.pink> (bug-gnu-emacs@gnu.org) Subject: Re: bug#64964: [PATCH] Handle tabs in the SQL shown in the column listing References: <873515i5qj.fsf@pub.pink> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64964-done Cc: 64964-done@debbugs.gnu.org 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 (---) > Date: Sun, 30 Jul 2023 13:48:20 -0500 > From: john muhl via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > In sqlite-mode if the SQL used to create a column used tabs then the > hide part of list columns would not remove anything after the first tab. > > M-x sqlite-mode-open-file my.db > > Table Name Number of Rows > images 0 > users 0 > > With point on ‘images’ execute sqlite-mode-list-columns (or press c) > > Table Name Number of Rows > images 0 > id INTEGER PRIMARY KEY AUTOINCREMENT > user_id INTEGER > FOREIGN KEY (user_id) REFERENCES users (id) > ON DELETE CASCADE > users 0 > > There are two tab characters before ‘ON DELETE’. Press c again and it > collapses to: > > Table Name Number of Rows > images 0 > ON DELETE CASCADE > users 0 Thanks, I installed your patch on the emacs-29 branch, and I'm therefore closing this bug. ------------=_1691052602-12192-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2023 19:19:45 +0000 Received: from localhost ([127.0.0.1]:51262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQBxA-0006fl-G4 for submit@debbugs.gnu.org; Sun, 30 Jul 2023 15:19:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQBfQ-0006GP-GT for submit@debbugs.gnu.org; Sun, 30 Jul 2023 15:01:25 -0400 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 1qQBfK-0003V6-K9 for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 15:01:18 -0400 Received: from out-123.mta1.migadu.com ([2001:41d0:203:375::7b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQBfH-00076a-UZ for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 15:01:18 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1690743671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=6YLRwhzVsMb2CvcshMLLo0o0JeiTQvcyIhdCGSQXCek=; b=v9I2KhtMz656945+keeTFgHNBZT+kLZXSMh83W8YpA4hoUWHjpFC19w+jMYttQ2nRc/Ms9 TVFj9EL2Qi4taPsCyYvZhTX82BRsft8EQlBZJYbnRZud7M8aLfB5yBgTsVMMSSONQSFFXv PlXQQpW+p6Kt3EZp2F3OUbdnzYXMLlY= From: john muhl To: bug-gnu-emacs@gnu.org Subject: [PATCH] Handle tabs in the SQL shown in the column listing Date: Sun, 30 Jul 2023 13:48:20 -0500 Message-ID: <873515i5qj.fsf@pub.pink> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::7b; envelope-from=jm@pub.pink; helo=out-123.mta1.migadu.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, 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-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 30 Jul 2023 15:19:41 -0400 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: -0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch In sqlite-mode if the SQL used to create a column used tabs then the hide part of list columns would not remove anything after the first tab. M-x sqlite-mode-open-file my.db Table Name Number of Rows=20=20 images 0=20 users 0 With point on =E2=80=98images=E2=80=99 execute sqlite-mode-list-columns (or= press c) Table Name Number of Rows=20=20 images 0=20 id INTEGER PRIMARY KEY AUTOINCREMENT user_id INTEGER FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE users 0 There are two tab characters before =E2=80=98ON DELETE=E2=80=99. Press c ag= ain and it collapses to: Table Name Number of Rows=20=20 images 0=20 ON DELETE CASCADE users 0 In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-07-28 built on localhost Repository revision: febf4889d196895b07b3278cfac3f8ccb6a34235 Repository branch: jm/lua-ts-mode System Description: Fedora Linux 38 (Workstation Edition) Configured using: 'configure --with-native-compilation=3Daot --with-pgtk' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Handle-tabs-in-the-SQL-shown-in-the-column-listing.patch >From 07920c70d7180cf969c264120ef267e960f779ae Mon Sep 17 00:00:00 2001 From: john muhl Date: Sun, 30 Jul 2023 13:43:10 -0500 Subject: [PATCH] Handle tabs in the SQL shown in the column listing * lisp/sqlite-mode.el (sqlite-mode-list-columns): Handle tabs. --- lisp/sqlite-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index c3047c786f7..8cb94485369 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -126,7 +126,7 @@ sqlite-mode-list-columns (forward-line 1) (if (looking-at " ") ;; Delete the info. - (delete-region (point) (if (re-search-forward "^[^ ]" nil t) + (delete-region (point) (if (re-search-forward "^[^ \t]" nil t) (match-beginning 0) (point-max))) ;; Insert the info. -- 2.41.0 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFABAEBCAAqFiEEK5CvUQq7L5O2pQef9D+KfcKUo10FAmTGs3QMHGptQHB1Yi5w aW5rAAoJEPQ/in3ClKNdocEH/0lZqILE8CK/5YM8Dqw7U5tNAKUElvAwxKL/9/zb /+Ixoe3SIbmy9WdFPyBMfDVGSy+IUMjfaWnKCddwLhpe4DFXLLcuTS33eeHKgSHG KbLmBINTlX4es82+LrQTUCTbySyw4BnueAwjfYS+kpC80iKVVMarPQO21AN3cY51 sS6hr3byBeERBxGBQ/O08B3lv6pKdgCWITg2xvpQnGtArBb1WaPqA/gGDUmdaZQw lfB1XXq1xuzvsoqb6tKt4Dn8pkh1XlmeqJqi3S+nD48A1hINzWTK1jqNk0hk24V8 G/59lCDD1JvGdCq07Dsc4mkY/zE+9Mbi+g/gUwMWgz9MDec= =MMV/ -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- ------------=_1691052602-12192-1--