From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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:32:53 +0200 Message-ID: <86ed229ml6.fsf@gnu.org> References: <93b8da79-dea6-4ef4-9b65-8857410d85e1@gmail.com> <86frmi9tm7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34987"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74996@debbugs.gnu.org To: =?UTF-8?Q?Jos=C3=A9_?= =?UTF-8?Q?J=C3=BAnior?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 20 20:36:28 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 1tOinT-0008wd-6N for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Dec 2024 20:36:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOin8-0008NX-Fu; Fri, 20 Dec 2024 14:36:06 -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 1tOin5-0008N2-OO for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 14:36:04 -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 1tOin5-0002GL-GM for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 14:36:03 -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:References:In-Reply-To:From:Date:To:Subject; bh=PbFT3QE4AtDg6/pUJnaQssqSx2U1ZWERkkU2ZeTFb+c=; b=OWb9P5XiyM/pB44eyw6D1vVeJ1MzkK3CemsRTnBCcZkUiQafgZDK2xc+y0MY/Kdyp5Z0JOOTesVEexKYr9ueIWZVmES/OhTLmUnxWXceGIigMVysm2KkYJN93McdeHHU9PpIKyCtpjXhloGqbhQALlcyGigF+wOpPSP+svxeafe3Rvw3vQU1xwK5RBSnPfz3sfD+d7N79WH8U00Z4+bMrd/XesvpiAyi1JaLAide5kQpTI06V+1meRHI08BArzTByQGCFReK9ocMdsBmJZOwb0tuuvxdefiCVNyX8aCb7/aHBUjg/Hws3FhH1AYn3EVyzYvu57kdO8JUVtmHgx1HMQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOin4-00022w-C1 for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2024 14:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2024 19:36:02 +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.17347233147570 (code B ref 74996); Fri, 20 Dec 2024 19:36:02 +0000 Original-Received: (at 74996) by debbugs.gnu.org; 20 Dec 2024 19:35:14 +0000 Original-Received: from localhost ([127.0.0.1]:44085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOimH-0001xV-Pw for submit@debbugs.gnu.org; Fri, 20 Dec 2024 14:35:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOimE-0001vS-NT for 74996@debbugs.gnu.org; Fri, 20 Dec 2024 14:35:12 -0500 Original-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 1tOik3-0000RJ-0l; Fri, 20 Dec 2024 14:32:55 -0500 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=PbFT3QE4AtDg6/pUJnaQssqSx2U1ZWERkkU2ZeTFb+c=; b=nb6MJLveAG/SOoB6xz6L de0he3SwPWcNMygmAQYRJtIckAFE1iDj6LDuhJwVPxnrBO5F79vl54RFcS+nTPTAtD90IKyCrz3rn ca4Vr3A7N1/IT1CuxUchVoi/KuTWvoYdwcsU2yyxiCq1ZudVJGCMr17tKfZdFqs4w+3jTv80dr9ye 77migHxpgbcBC4YLbu9gJmyKjsUNSHd4mal/YFBhz3F1lJJXhS5Ln8E5sqW4XEN5meh1z4Rc3aRNm T8R7r4nkbwjcmu0cADcsECwZBbkRgmOmtscxBvqowBIRx83Zh/QQoYo6DnXkvOBwGaqA0UvIY4O1L 9+sqkaiiAq//Mw==; In-Reply-To: (message from =?UTF-8?Q?Jos=C3=A9_?= =?UTF-8?Q?J=C3=BAnior?= on Fri, 20 Dec 2024 16:03:59 -0300) 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:297467 Archived-At: > Date: Fri, 20 Dec 2024 16:03:59 -0300 > Cc: 74996@debbugs.gnu.org > From: José Júnior > > Alright, I'll try. > > 1. Install mysql or mariadb, on Debian I installed the package `mysql-common` > > `sudo apt install mysql-common` > > 2. Start the mysql/mariadb server: > > `sudo service mysql start` > > 3. Log in into the server and create a unprivileged user in the interactive mysql shell: > > `sudo mysql -u root` > > `CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';` > > 4. On Emacs, create a new buffer like `*sql*`, then enable sql-mode `M-x sql-mode`; > > 5. Connect to the server using `sql-mysql` by providing the values for what's prompted: > > - user: user > > - password: password > > - database: (leave it empty) > > - host: localhost > > A sql-interactive-mode buffer should be opened if the connection is successful. > > 6. In ther *sql* buffer enter the following query: > > `show databases;` > > And press `C-c C-c` (sql-send-paragraph) on the line of this query to send it to the server; > > An output of this query should be printed on the interactive buffer. > > 7. Now switch to the interactive buffer, move the pointer to a line where the output of the previous action was printed. > > 8. Switch to the *sql* buffer and press `C-C C-c` to send the command again. > > 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.)