bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13715: 24.2; Invalid function when calling sql-connect


From: Glenn Morris
Subject: bug#13715: 24.2; Invalid function when calling sql-connect
Date: Thu, 14 Feb 2013 20:50:28 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]