all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "José Júnior" <jjnilton@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 74996@debbugs.gnu.org
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 17:13:02 -0300	[thread overview]
Message-ID: <41535963-d753-49aa-b8a3-eb5ed464f1b4@gmail.com> (raw)
In-Reply-To: <86ed229ml6.fsf@gnu.org>

I think because the issue is where the output is printed on the buffer, so it would be something after the mysql package gives the output to Emacs.

As I understand, the mysql package only gives the output of the SQL query to Emacs, then Emacs should be in control to where to print it. And since it's taking into account where the pointer is to print the output, it seems to be the case.

>> Date: Fri, 20 Dec 2024 16:03:59 -0300
>> Cc: 74996@debbugs.gnu.org
>> From: José Júnior <jjnilton@gmail.com>
>>
>> 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.)





      parent reply	other threads:[~2024-12-20 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 16:47 bug#74996: 28.2; sql interactive mode prints output of executed query where the pointer is instead of the bottom of the buffer José Júnior
2024-12-20 17:01 ` Eli Zaretskii
2024-12-20 19:03   ` José Júnior
2024-12-20 19:32     ` Eli Zaretskii
2024-12-20 20:08       ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-20 20:11         ` Eli Zaretskii
2024-12-20 20:34           ` José Júnior
2024-12-21  6:35             ` Eli Zaretskii
2024-12-20 20:13       ` José Júnior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41535963-d753-49aa-b8a3-eb5ed464f1b4@gmail.com \
    --to=jjnilton@gmail.com \
    --cc=74996@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.