* bug#13715: 24.2; Invalid function when calling sql-connect
@ 2013-02-14 14:51 roman.scherer
2013-02-14 23:50 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: roman.scherer @ 2013-02-14 14:51 UTC (permalink / raw)
To: 13715
I defined some connections in sql-connection-alist like this:
(require 'sql)
(setq sql-connection-alist
'((db1
(sql-product 'mysql)
(sql-server "localhost")
(sql-user "tiger")
(sql-password "scotch")
(sql-database "db1")
(sql-port 3306))
(db2
(sql-product 'mysql)
(sql-server "localhost")
(sql-user "tiger")
(sql-password "scotch")
(sql-database "db2"))))
When calling sql-connect Emacs errors with the message "Invalid
function: (db1 db2)" when hitting tab or when typing the connection name
and pressing enter.
In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
of 2013-01-20 on eric
Configured using:
`configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
'--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
ESC [ 8 ~ C-x C-e ESC [ B ESC [ B ESC [ B ESC [ B ESC
[ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B ESC [ B
ESC [ B ESC [ B ESC [ B ESC [ B ESC [ 8 ~ C-x C-e RET
RET ESC x s q TAB c o TAB n TAB RET d b 1 RET ESC x
ESC x ESC ESC ESC ESC x e m a TAB TAB ESC DEL r e p
o r t TAB RET
Recent messages:
("emacs" "sql.el")
For information about GNU Emacs and the GNU system, type C-h C-a.
sql
((db1 (sql-product (quote mysql)) (sql-server "localhost") (sql-user "tiger") (sql-password "scotch") (sql-database "db1") (sql-port 3306)) (db2 (sql-product (quote mysql)) (sql-server "localhost") (sql-user "tiger") (sql-password "scotch") (sql-database "db2")))
Making completion list...
test-completion: Invalid function: (db1 db2)
completing-read-default: Command attempted to use minibuffer while in minibuffer [2 times]
Quit
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode view sql easymenu thingatpt
comint regexp-opt ansi-color ring time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13715: 24.2; Invalid function when calling sql-connect
2013-02-14 14:51 bug#13715: 24.2; Invalid function when calling sql-connect roman.scherer
@ 2013-02-14 23:50 ` Glenn Morris
2013-02-15 1:50 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2013-02-14 23:50 UTC (permalink / raw)
To: roman.scherer; +Cc: 13715
roman.scherer@nugg.ad wrote:
> When calling sql-connect Emacs errors with the message "Invalid
> function: (db1 db2)" when hitting tab or when typing the connection name
> and pressing enter.
Thanks for the report. This should fix it:
*** lisp/progmodes/sql.el 2013-01-01 09:11:05 +0000
--- lisp/progmodes/sql.el 2013-02-14 23:46:50 +0000
***************
*** 3919,3925 ****
"Read a connection name."
(let ((completion-ignore-case t))
(completing-read prompt
! (mapcar (lambda (c) (car c))
sql-connection-alist)
nil t initial 'sql-connection-history default)))
--- 3919,3925 ----
"Read a connection name."
(let ((completion-ignore-case t))
(completing-read prompt
! (mapcar (lambda (c) (symbol-name (car c)))
sql-connection-alist)
nil t initial 'sql-connection-history default)))
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13715: 24.2; Invalid function when calling sql-connect
2013-02-14 23:50 ` Glenn Morris
@ 2013-02-15 1:50 ` Glenn Morris
2013-02-15 1:54 ` Glenn Morris
2013-03-11 1:54 ` Michael Mauger
0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2013-02-15 1:50 UTC (permalink / raw)
To: roman.scherer; +Cc: mmaug, 13715
Re: http://debbugs.gnu.org/13715
Glenn Morris wrote:
> roman.scherer@nugg.ad wrote:
>
>> When calling sql-connect Emacs errors with the message "Invalid
>> function: (db1 db2)" when hitting tab or when typing the connection name
>> and pressing enter.
>
> Thanks for the report. This should fix it:
>
> *** lisp/progmodes/sql.el 2013-01-01 09:11:05 +0000
> --- lisp/progmodes/sql.el 2013-02-14 23:46:50 +0000
> ***************
> *** 3919,3925 ****
> "Read a connection name."
> (let ((completion-ignore-case t))
> (completing-read prompt
> ! (mapcar (lambda (c) (car c))
> sql-connection-alist)
> nil t initial 'sql-connection-history default)))
>
> --- 3919,3925 ----
> "Read a connection name."
> (let ((completion-ignore-case t))
> (completing-read prompt
> ! (mapcar (lambda (c) (symbol-name (car c)))
> sql-connection-alist)
> nil t initial 'sql-connection-history default)))
However, there seems to be an inconsistency, in that:
sql-connection-alist says "CONNECTION is a symbol identifying the connection"
whereas sql-connect (above) assumes it to be a string.
AFAICS, sql-save-connection also saves strings rather than symbols for NAME.
So maybe it is a doc bug?
On a semi-related note:
emacs -Q -l sql
M-x sql-connect
-> "Wrong number of arguments" error
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13715: 24.2; Invalid function when calling sql-connect
2013-02-15 1:50 ` Glenn Morris
@ 2013-02-15 1:54 ` Glenn Morris
[not found] ` <CAOkyP-ZTuVAHRpRVAAV2WiH5N0n2MRAaWRo6PfzbJKw_pGPyNg@mail.gmail.com>
2013-03-11 1:54 ` Michael Mauger
1 sibling, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2013-02-15 1:54 UTC (permalink / raw)
To: roman.scherer; +Cc: mmaug, 13715
Glenn Morris wrote:
> sql-connection-alist says "CONNECTION is a symbol identifying the connection"
Yet the associated custom :type is a string, so I guess this is just a
doc bug and that you are supposed to use a string rather than a symbol.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#13715: 24.2; Invalid function when calling sql-connect
2013-02-15 1:50 ` Glenn Morris
2013-02-15 1:54 ` Glenn Morris
@ 2013-03-11 1:54 ` Michael Mauger
1 sibling, 0 replies; 6+ messages in thread
From: Michael Mauger @ 2013-03-11 1:54 UTC (permalink / raw)
To: Glenn Morris, roman.scherer@nugg.ad; +Cc: 13715@debbugs.gnu.org
This was a documentation error, version 3.2 corrects this, and the "Wrong number of arguments" error.
Replaced "symbol" with "case-insensitive string"
Thanks for the report.
--Michael
----- Original Message -----
> From: Glenn Morris <rgm@gnu.org>
> To: roman.scherer@nugg.ad
> Cc: 13715@debbugs.gnu.org; mmaug@yahoo.com
> Sent: Thursday, February 14, 2013 8:50 PM
> Subject: Re: bug#13715: 24.2; Invalid function when calling sql-connect
>
> Re: http://debbugs.gnu.org/13715
>
> Glenn Morris wrote:
>
>> roman.scherer@nugg.ad wrote:
>>
>>> When calling sql-connect Emacs errors with the message "Invalid
>>> function: (db1 db2)" when hitting tab or when typing the
> connection name
>>> and pressing enter.
>>
>> Thanks for the report. This should fix it:
>>
>> *** lisp/progmodes/sql.el 2013-01-01 09:11:05 +0000
>> --- lisp/progmodes/sql.el 2013-02-14 23:46:50 +0000
>> ***************
>> *** 3919,3925 ****
>> "Read a connection name."
>> (let ((completion-ignore-case t))
>> (completing-read prompt
>> ! (mapcar (lambda (c) (car c))
>> sql-connection-alist)
>> nil t initial 'sql-connection-history default)))
>>
>> --- 3919,3925 ----
>> "Read a connection name."
>> (let ((completion-ignore-case t))
>> (completing-read prompt
>> ! (mapcar (lambda (c) (symbol-name (car c)))
>> sql-connection-alist)
>> nil t initial 'sql-connection-history default)))
>
>
> However, there seems to be an inconsistency, in that:
>
> sql-connection-alist says "CONNECTION is a symbol identifying the
> connection"
>
> whereas sql-connect (above) assumes it to be a string.
> AFAICS, sql-save-connection also saves strings rather than symbols for NAME.
>
> So maybe it is a doc bug?
>
>
> On a semi-related note:
>
> emacs -Q -l sql
> M-x sql-connect
> -> "Wrong number of arguments" error
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-11 1:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 14:51 bug#13715: 24.2; Invalid function when calling sql-connect roman.scherer
2013-02-14 23:50 ` Glenn Morris
2013-02-15 1:50 ` Glenn Morris
2013-02-15 1:54 ` Glenn Morris
[not found] ` <CAOkyP-ZTuVAHRpRVAAV2WiH5N0n2MRAaWRo6PfzbJKw_pGPyNg@mail.gmail.com>
2013-02-15 17:09 ` Glenn Morris
2013-03-11 1:54 ` Michael Mauger
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).