From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74996: 28.2; sql interactive mode prints output of executed query where the pointer is instead of the bottom of the buffer Date: Fri, 20 Dec 2024 21:08:36 +0100 Message-ID: <87a5cqnmm3.fsf@gmx.net> References: <93b8da79-dea6-4ef4-9b65-8857410d85e1@gmail.com> <86frmi9tm7.fsf@gnu.org> <86ed229ml6.fsf@gnu.org> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74996@debbugs.gnu.org, =?UTF-8?Q?Jos=C3=A9_?= =?UTF-8?Q?J=C3=BAnior?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 21:09:10 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 1tOjJ8-0009Dn-DE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 21:09:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOjJ2-0004bG-3h; Fri, 20 Dec 2024 15:09:04 -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 1tOjJ0-0004b0-7R for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 15:09:02 -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 1tOjIz-0001gK-VG for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 15:09:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=piGdwMmF9bi2TZX5y+61Wm707UwXDBPM3+4D//c2inM=; b=XMX3zsvJImMxlM4O/2/jSy4nwQZSsdWOaeZQop3BpFIjKbC94ETtgn/HXK3Mu8BayXDS3n6K+Wc1cpys2cCs8h/oMoU/Hrhk1JriwKJnv6pAEdo3Avfh3tqWc1zNrvLUW/aSh5cK8CFtcb6v+ywnftKk5zcABPgqcK1Rv3/ccSfpbGKlYsHd7fviEIKr61VmA/TzaN9wbcTNige2YVC9kF78usuddhI6kCfAekkBUjQBOVSMrHwtokkWHrAGKCtp5UrRGwdBQaPKZv4bNSeWQDUTYTJq03ayR5rJeJVU5NpCXNiJ/RA+Fag0S0SMsDaiBUQz9NB79BB1SPgbwYKn/g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOjIz-0003cH-Os for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 15:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2024 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74996 X-GNU-PR-Package: emacs Original-Received: via spool by 74996-submit@debbugs.gnu.org id=B74996.173472533313884 (code B ref 74996); Fri, 20 Dec 2024 20:09:01 +0000 Original-Received: (at 74996) by debbugs.gnu.org; 20 Dec 2024 20:08:53 +0000 Original-Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOjIq-0003bs-Q8 for submit@debbugs.gnu.org; Fri, 20 Dec 2024 15:08:53 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:36193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOjIp-0003bb-0f for 74996@debbugs.gnu.org; Fri, 20 Dec 2024 15:08:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1734725318; x=1735330118; i=stephen.berman@gmx.net; bh=piGdwMmF9bi2TZX5y+61Wm707UwXDBPM3+4D//c2inM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=RuZZu5FZR4wWYOoz0GTVM02DQmxZwEcG1Y8nO8Hdia/LU1E7CSMHX/c9oOZLNjuN Ha3THldNu2+PEphETq6v9W3ZUKlCg4gV9hFPIw/aER0ziJuXp/u8On3W7Y3KA7qUh QN/Yykuo2JepseaqXePAJmUS8FpM5EpjDWs4DiZnm1YsIV1slqznuQ04dCSiu5vxm lnhxvvep9o5J00T4MSb09ELig+f25zqoxTu0nQ4kiWbniMYgJaGB5gfIxS/6EPEyP 8Rvh2NlcD2Zi+dY2U0AuSyPkhnIcApw2V8yTaLwGYdbligQmuJ20jPNjqIUE+FqsT DIPBPQR4ayLG1KH5Tw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([94.134.95.89]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKuA-1t0UKE0Io4-00TVSs; Fri, 20 Dec 2024 21:08:38 +0100 In-Reply-To: <86ed229ml6.fsf@gnu.org> (E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Ck+O1NeKjbQack4wzYxbgCGrDro2gPkMG188ajPu6y9CBR/HMbjZ1LlK3rmvYbVvck 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:297472 Archived-At: On Fri, 20 Dec 2024 21:32:53 +0200 Eli Zaretskii wrote: >> Date: Fri, 20 Dec 2024 16:03:59 -0300 >> Cc: 74996@debbugs.gnu.org >> From: Jos=C3=A9 J=C3=BAnior >>=20 >> Alright, I'll try. >>=20 >> 1. Install mysql or mariadb, on Debian I installed the package `mysql-co= mmon` >>=20 >> `sudo apt install mysql-common` >>=20 >> 2. Start the mysql/mariadb server: >>=20 >> `sudo service mysql start` >>=20 >> 3. Log in into the server and create a unprivileged user in the interact= ive >> mysql shell: >>=20 >> `sudo mysql -u root` >>=20 >> `CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';` >>=20 >> 4. On Emacs, create a new buffer like `*sql*`, then enable sql-mode `M-x= sql-mode`; >>=20 >> 5. Connect to the server using `sql-mysql` by providing the values for >> what's prompted: >>=20 >> - user: user >>=20 >> - password: password >>=20 >> - database: (leave it empty) >>=20 >> - host: localhost >>=20 >> A sql-interactive-mode buffer should be opened if the connection is succ= essful. >>=20 >> 6. In ther *sql* buffer enter the following query: >>=20 >> `show databases;` >>=20 >> And press `C-c C-c` (sql-send-paragraph) on the line of this query to se= nd >> it to the server; >>=20 >> An output of this query should be printed on the interactive buffer. >>=20 >> 7. Now switch to the interactive buffer, move the pointer to a line where >> the output of the previous action was printed. >>=20 >> 8. Switch to the *sql* buffer and press `C-C C-c` to send the command ag= ain. >>=20 >> Now you should see that the second execution is mixed with the previous = one. > > Thanks. If this needs the mysql package, then why do you think the > problem is in Emacs and not in mysql? (Apologies if this makes no > sense: I know nothing about mysql and almost nothing about sql-mode.) I don't have MySQL or mariadb but I can reproduce the problem with PostgreSQL in Emacs 29.4, but not in 30 or master, so it seems to have been fixed since Emacs 30. Steve Berman