[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31446: 26.1; sql-interactive-mode buffer naming is broken
From: |
Filipp Gunbin |
Subject: |
bug#31446: 26.1; sql-interactive-mode buffer naming is broken |
Date: |
Fri, 18 May 2018 18:44:38 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) |
On 18/05/2018 15:19 +0300, Eli Zaretskii wrote:
...
> (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))))
> + (cond
> + ((zerop new-name)
> + "*SQL*")
> + ((stringp new-name)
> + (if (string-prefix-p "SQL" new-name t)
> + new-name
> + (concat "*SQL: " new-name "*")))
> + ((eq new-name '(4))
> + (sql-rename-buffer new-name)
> + sql-alternate-buffer-name)
> + (t
> + (format "*SQL: %s*" new-name)))))
...
But `sql-comint' (called from `sql-comint-postgres' and the like) has
logic which prepares buffer name (adding those asterisks etc.)
In `sql-product-interactive', `new-name', if set to '(4) from prefix, or
to some other value from argument, controls this:
(if (and (not new-name) buf)
(pop-to-buffer buf)
So if `new-name' is set, we shouldn't switch to existing buffer.
Maybe just pass `new-name' to comint func like this (undoing possible
setting of `new-name' to '(4) above), letting it do all the
name-choosing work?
(funcall (sql-get-product-feature product :sqli-comint-func)
product
(sql-get-product-feature product :sqli-options)
(if (equal '(4) new-name)
nil
new-name))
Filipp
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Phil Sainty, 2018/05/14
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/18
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/18
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken,
Filipp Gunbin <=
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/18
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Filipp Gunbin, 2018/05/18
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/18
- Message not available
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Phil Sainty, 2018/05/20
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/20
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Phil Sainty, 2018/05/21
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/21
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Phil Sainty, 2018/05/21
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Eli Zaretskii, 2018/05/21
- bug#31446: 26.1; sql-interactive-mode buffer naming is broken, Phil Sainty, 2018/05/22