GNU bug report logs -
#31446
26.1; sql-interactive-mode buffer naming is broken
Previous Next
Reported by: Phil Sainty <psainty <at> orcon.net.nz>
Date: Mon, 14 May 2018 05:56:02 UTC
Severity: normal
Found in version 26.1
Done: Michael Mauger <mmauger <at> protonmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 21/05/2018 17:55 +0300, Eli Zaretskii wrote:
>> From: Filipp Gunbin <fgunbin <at> fastmail.fm>
>> Cc: psainty <at> orcon.net.nz, 31446 <at> debbugs.gnu.org
>> Date: Mon, 21 May 2018 02:53:08 +0300
>>
>> That looks reasonable, but, as I wrote earlier, why implement
>> name-choosing logic here, if it's in `sql-comint' already. Even if some
>> of such logic was here before the fix, it doesn't necessarily mean that
>> was right.
>
> Maybe I'm missing something, but it looks like sql-comint and
> sql-product-interactive belong to 2 different families of entry points
> in the package. Some call sql-product-interactive, while the others
> call sql-comint. Isn't that so?
sql-product-interactive is one of the entry points (a generic one).
Other entry points are sql-postgres and the like, which specify product.
Well, this patch works for me.
If I call `C-u C-u sql-product-interactive' multiple times, then first I
get *SQL* buffer, then *SQL-postgres* buffer, then *SQL-postgres1* and
so on. With just C-u I am switched to existing buffer.
Filipp
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 64651aff11..856250c194 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4196,10 +4196,8 @@ sql-product-interactive
If buffer `*SQL*' exists but no process is running, make a new process.
If buffer exists and a process is running, just switch to buffer `*SQL*'.
-To specify the SQL product, prefix the call with
-\\[universal-argument]. To set the buffer name as well, prefix
-the call to \\[sql-product-interactive] with
-\\[universal-argument] \\[universal-argument].
+When called interactively, \\[universal-argument] enables product selection.
+\\[universal-argument] \\[universal-argument], in addition to that, forces new buffer to be created.
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive "P")
@@ -4254,9 +4252,7 @@ sql-product-interactive
(funcall (sql-get-product-feature product :sqli-comint-func)
product
(sql-get-product-feature product :sqli-options)
- (if (and new-name (string-prefix-p "SQL" new-name t))
- new-name
- (concat "SQL: " new-name))))
+ (if (consp new-name) nil new-name)))
;; Set SQLi mode.
(let ((sql-interactive-product product))
This bug report was last modified 6 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.