Re: [Spam] Square bracket reader sytax & SBCL Win32 & Slime: How to make them work together?
Jason H <[email protected]>
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
A message from Tobias C. Rittweiler of slime-devel: Jason H writes: > On Mon, Jan 25, 2010 at 7:14 PM, Nathan Bird wrote: > >> Jason H wrote: >> > Hi, >> > >> > I'm learning CLSQL (4.3.0) with SBCL 1.0.33.4 Win32 and >> > Slime (around 2009-12-03). I have troubles using square >> > brackets in Slime. Entering the following into Slime's >> > repl buffer: >> > (clsql-sys:enable-sql-reader-syntax) >> > (select [description] :from [asnFeatureType]) >> > will drop me into the debugger: >> > The variable [DESCRIPTION] is unbound. >> > [Condition of type UNBOUND-VARIABLE] >> To rule out an error I've spotted a number of times, in the repl, try >> disabling the syntax a bunch of times (no seriously, 3 or 4 times), then >> enabling and see if it works. >> >> CLSQL tries to keep a chain of readtables, so you want to clear past >> that and then try enabling. >> > Hi Nathan, > > Following your suggestion, here is roughly what I found: > 1. With a fresh session of SBCL and Slime, evaluating > (CLSQL-SYS:ENABLE-SQL-READER-SYNTAX) > directly in the *slime-repl sbcl* buffer will make the > square bracket reader syntax work. > 2. Evaluating (CLSQL-SYS:ENABLE-SQL-READER-SYNTAX) in a file > with C-c C-c will not enable sql reader syntax at all. > In fact, with a fresh session of SBCL and Slime, after > evaluating (CLSQL-SYS:ENABLE-SQL-READER-SYNTAX) in a file > with C-c C-c, entering (CLSQL-SYS:ENABLE-SQL-READER-SYNTAX) > directly in the *slime-repl sbcl* buffer won't get the > bracket reader syntax work, either. Under such circumstances, > the bracket reader syntax will work after you call > CLSQL-SYS:DISABLE-SQL-READER-SYNTAX a few times (either in a > file or in *slime-repl sbcl* buffer) and then call > CLSQL-SYS:ENABLE-SQL-READER-SYNTAX in *slime-repl sbcl* buffer. > > As CLSQL-SYS:ENABLE-SQL-READER-SYNTAX works with straight SBCL without > Slime, I'm cross posting the reply to slime-devel. `C-c C-c' usually resolves to COMPILE-FILE + LOAD, both rebinding *READTABLE*. I'm not sure who's responsible for CLSQL nowadays, but I recommend to make use of http://common-lisp.net/project/editor-hints/ \ darcs/named-readtables/doc/named-readtables.html which is supposed to help on using custom readtables. My posting will probably bounce from the clsql mailing list; in that case, please forward the message. -T. _______________________________________________ CLSQL mailing list [email protected] http://lists.b9.com/cgi-bin/mailman/listinfo/clsql