Re: [PATCH] ob-sql: session

2025-06-28 Thread Ihor Radchenko
Michael Mauger writes: >> Org mode markup communicates "session" by naming it. >> So, one way or another, Org mode APIs expect some way to link session >> name string to actual buffer. > ...> > > My suggestion was to store the stable buffer object with the > session. The API can serve up the

Re: [PATCH] ob-sql: session

2025-06-19 Thread General discussions about Org-mode.
Original Message On 6/19/25 1:01 PM, Ihor Radchenko wrote: > Michael Mauger writes: > > > I'd suggest remembering the buffer itself rather than the buffer name. > Also, like `sql-product-interactive', you can control a portion of the buffer > name in the `sql-connect' c

Re: [PATCH] ob-sql: session

2025-06-19 Thread Ihor Radchenko
Michael Mauger writes: > I'd suggest remembering the buffer itself rather than the buffer name. Also, > like `sql-product-interactive', you can control a portion of the buffer name > in the `sql-connect' call. But again, it would be safer to use the buffer > itself to memoize the session. Your

Re: [PATCH] ob-sql: session

2025-06-19 Thread Ihor Radchenko
Phil Estival writes: > I'm submitting again the patches for ob-sql.el, taking into > considerations the previous review, commented below. I also took good > note of Michael remarks. The attached series of patches will work > without any modification to sql.el. I'll introduce later a local > `sql

Re: [PATCH] ob-sql: session

2025-06-17 Thread General discussions about Org-mode.
On Monday, June 16th, 2025 at 12:19 PM, Phil Estival wrote: > * [2025-06-15 20:59 +] Michael Mauger mmau...@protonmail.com: > > > On Sunday, June 15th, 2025 at 3:16 PM, Phil Estival p...@7d.nz wrote: > > > > > I also took good note of Michael's remarks. > > > The attached series of patches

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-06-16 Thread Phil Estival
This replaces the previous patch. The `sql-product-interactive' call was still using the modified signature and does no longer. >From e27f8231c2f97e6f7f84b6acb793eec7060b8396 Mon Sep 17 00:00:00 2001 From: Phil Estival Date: Wed, 13 June 2025 17:00:00 +0200 Subject: [PATCH 06/08] ob-sql: add se

Re: [PATCH] ob-sql: session

2025-06-16 Thread Phil Estival
* [2025-06-15 20:59 +] Michael Mauger : > On Sunday, June 15th, 2025 at 3:16 PM, Phil Estival wrote: > >> I also took good note of Michael's remarks. >> The attached series of patches will work >> without any modification to sql.el. I'll introduce later a local >> `sql-connection' bound to t

Re: [PATCH] ob-sql: session

2025-06-15 Thread General discussions about Org-mode.
On Sunday, June 15th, 2025 at 3:16 PM, Phil Estival wrote: > I also took good note of Michael remarks. > The attached series of patches will work > without any modification to sql.el. I'll introduce later a local > `sql-connection' bound to the session name. In the absence of it, > sessions will

Re: [PATCH] ob-sql: session

2025-06-15 Thread Phil Estival
I'm submitting again the patches for ob-sql.el, taking into considerations the previous review, commented below. I also took good note of Michael remarks. The attached series of patches will work without any modification to sql.el. I'll introduce later a local `sql-connection' bound to the sessio

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-05-19 Thread General discussions about Org-mode.
On Saturday, February 15th, 2025 at 4:25 PM, Ihor Radchenko wrote: > Ihor Radchenko yanta...@posteo.net writes: > > > May you please post the patch on Emacs bug tracker? (M-x > > submit-emacs-patch) and X-Debbugs-CC me? > > That way, we get the Emacs maintainers involved into the discussion. >

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-05-17 Thread Ihor Radchenko
Phil Estival writes: >> May you please update your latest patch for ob-sql.el, converting it >> into (1) patch to sql.el; (2) patch for ob-sql.el that assumes changes >> to sql.el? > > Here they are > 1) the patch of sql.el > 2) the list of changes in ob-sql.el against release_9.7.30. >The pa

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-05-14 Thread Phil Estival
* [2025-05-14 16:29 +0200] Phil Estival : > * [2025-02-15 16:25 +] Ihor Radchenko : >> Ihor Radchenko writes: >> >> May you please update your latest patch for ob-sql.el, converting it >> into (1) patch to sql.el; (2) patch for ob-sql.el that assumes changes >> to sql.el? > > Here they are > 1

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-05-14 Thread Phil Estival
* [2025-02-15 16:25 +] Ihor Radchenko : > Ihor Radchenko writes: > > May you please update your latest patch for ob-sql.el, converting it > into (1) patch to sql.el; (2) patch for ob-sql.el that assumes changes > to sql.el? Here they are 1) the patch of sql.el 2) the list of changes in ob-sql

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-02-15 Thread Ihor Radchenko
Ihor Radchenko writes: > May you please post the patch on Emacs bug tracker? (M-x > submit-emacs-patch) and X-Debbugs-CC me? > That way, we get the Emacs maintainers involved into the discussion. The patch is in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76025 There are no major objections t

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-01-20 Thread Ihor Radchenko
Phil Estival writes: >> What about changing sql.el to provide the necessary flexibility? >> I'd prefer it better than rewriting parts of sql.el in Org mode. > > Gladly. Here is a proposal for patch for `sql-product-interactive' in > sql.el. A specific case for sqlite is handled and this is not 10

Re: [PATCH] ob-sql: session + sql.el w/o prompt

2025-01-19 Thread Phil Estival
* [2025-01-17 Fri 06:58 +0100] Ihor Radchenko Phil Estival writes: Is there any specific reason why you are seemingly re-implementing what `sql-product-interactive' does? May we re-use it instead? Yes. When opening a new connection `sql-product-interactive' will systematically ask for input

Re: [PATCH] ob-sql: session

2025-01-17 Thread Ihor Radchenko
Phil Estival writes: > ... However, some SQL shells, like Mariadb, can only be > configured through command line parameters. These are global in Emacs > and set by `sql-set-product-feature'. So in order to support these, > the function in charge of opening the connection needs different > parame

Re: [PATCH] ob-sql: session

2025-01-16 Thread Phil Estival
* [2025-01-07 19:38] Ihor Radchenko:> Phil Estival writes: [...] these `sql-set-product-feature' calls are overriding the defaults from sql.el. They will not only affect Org babel blocks, but all the interactive SQL sessions in Emacs. Such side effects are not acceptable. May we somehow avoid m

Re: [PATCH] ob-sql: session

2025-01-07 Thread Ihor Radchenko
Phil Estival writes: > Hello. Here we go again. Thanks! See comments inline. > Also, in the commit message of the patch for the tests, > I mention that some macros should probably be moved upward > in a file where generic functions which purposes are to help > writing the tests of babel source

Re: [PATCH] ob-sql: session

2025-01-06 Thread Phil Estival
* [2024-12-13 18:46] Ihor Radchenko: Phil Estival writes: this patch modifies ob-sql to add support for session. Before I start a more detailed preview, may you please: 1. Rebase your changes onto main (development) branch. This is where the new features are added. See https://orgmode

Re: [PATCH] ob-sql: session

2024-12-13 Thread Ihor Radchenko
Phil Estival writes: > From Org 9.7.16, > this patch modifies ob-sql to add support for session. > - reintroduces sqlite in ob-sql (even if there is ob-sqlite.el) > - limitation: no line number in session (a block is provided >on one prompt line) > - tests: some generic macro for checking re

Re: [PATCH] ob-sql: session

2024-11-26 Thread Phil Estival
* [2024-11-26 15:34] Phil Estival: From Org 9.7.16, this patch modifies ob-sql to add support for session. - reintroduces sqlite in ob-sql (even if there is ob-sqlite.el) - limitation: no line number in session (a block is provided   on one prompt line) - tests: some generic macros for chec

Re: patch : ob-sql :session

2024-11-11 Thread Ihor Radchenko
Phil Estival writes: > I will keep running ob-sql with :session in the next days. > This work configuration should help to detect if there is an anomaly. > > Shall I submit a patch? Sure! > Since many lines are changed due to proper indentation, docstrings, > untabification and a few lateral im

Re: patch : ob-sql :session

2024-11-11 Thread Phil Estival
* [2024-11-09 15:43] Ihor Radchenko: Phil Estival writes: Have you considered integrating it into ob-sql itself? If not, what are the obstacles? Hello Ihor, yes I have. It grows ob-sql by approximately 300 lines. There are rooms for improvements. https://github.com/flintforge/ob-sql-sessio