I use R interactively from Org-mode - the keybinding C-x '
from within an R code-block launches an interactive R session using ESS.
When I press C-x '
from inside an SQL code block, it sends the code block to an SQL-mode buffer, but it is not clear how I can then send a query to MySQL.
Can I do this with MySQL?
First, include the code from the accepted answer to How can I get emacs sql-mode to use the mysql config file (.my.cnf)? in your .emacs
Second, use C-x '
from within the SQL code block to send the code block to an SQL mode buffer
Once the code block has been sent to a buffer in SQL mode, launch your MySQL session using M-x pool-a
(or whatever connection you wish to use).
At this point, the standard SQL keybindings can be used:
C-c C-c send paragraph
C-c C-r send selected region
C-c C-b send entire buffer
C-c C-s send string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With