Subject: Re: [PATCH] ob-sql: session

From: Ihor Radchenko <[email-masked]>
Date: Sat, 28 Jun 2025 18:34:53 +0000

Michael Mauger <[email-masked]> 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 name of that's what is what is
> expected but recognize that while the buffer is stable, the buffer
> name might not be depending upon the users configuration. I also want
> to make sure that you are not relying upon some naming convention of
> SQLi buffer names to your session names.

It is expected by users that session name is the same with the buffer
name. Or at least similar. Sometimes, users deliberately rename session
buffers to "decouple" currently running session and start a fresh one.

> In the end, these are org decisions but I cannot guarantee stability
> of the buffer naming convention generated by sql-mode going forward…

All we need is an ability to tell sql-mode which buffer name to use. I
think that it is a reasonble ask.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>