GNU bug report logs - #76025
[PATCH 1/1] * lisp/progmodes/sql.el: login without prompting

Previous Next

Package: emacs;

Reported by: Phil Estival <pe <at> 7d.nz>

Date: Mon, 3 Feb 2025 05:20:02 UTC

Severity: wishlist

Tags: patch

Full log


Message #94 received at 76025 <at> debbugs.gnu.org (full text, mbox):

From: Michael Mauger <mmauger <at> protonmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Phil Estival <pe <at> 7d.nz>, "76025 <at> debbugs.gnu.org" <76025 <at> debbugs.gnu.org>,
 Org Mode List <emacs-orgmode <at> gnu.org>
Subject: Re: [PATCH] ob-sql: session
Date: Thu, 19 Jun 2025 19:32:01 +0000
-------- Original Message --------
On 6/19/25 1:01 PM, Ihor Radchenko <yantar92 <at> posteo.net> wrote:

>  Michael Mauger <mmauger <at> protonmail.com> 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 org session name would translate to the buffer rather than the potentially changed buffer name.
>  
>  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.
>  
>  API-wise, it is done via `org-babel-session-buffer', which can
>  optionally use special function org-babel-session-buffer:sql (if
>  defined) to perform backend-specific logic.
>  

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. 

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




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.