Tyler Smith
2011-12-21 22:16:28 UTC
Content preview: Hi, I'm new to lisp in general, trying to get cl-sql and cl-who
working together. I'm stumped in my efforts to generate a definition list
from an sql query. The following works as expected: (multiple-value-bind
(records fields) (select [genus] [species] :from "specimens" :where [= [collector]
"Test"]) (loop for rec in records do (loop for label in fields for val in
rec do (fresh-line) (print label) (print val)))) [...]
Content analysis details: (-0.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.215.51 listed in list.dnswl.org]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(sedgeboy[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
Archived-At: <http://permalink.gmane.org/gmane.lisp.who.general/282>
Hi,
I'm new to lisp in general, trying to get cl-sql and cl-who working
together. I'm stumped in my
efforts to generate a definition list from an sql query. The following
works as expected:
(multiple-value-bind (records fields)
(select [genus] [species] :from "specimens" :where [= [collector] "Test"])
(loop for rec in records do
(loop for label in fields
for val in rec do
(fresh-line)
(print label)
(print val))))
=>
"GENUS"
"Scleria"
"SPECIES"
"triglomerata"
However, swapping print for with-output-to-html fails:
* (multiple-value-bind (records fields)
(select [genus] [species] :from "specimens" :where [= [collector] "Test"])
(loop for rec in records do
(loop for label in fields
for val in rec do
(fresh-line)
(with-html-output (*standard-output* nil :indent nil)
(:dt label)
(:dd val)))))
<dt></dt><dd></dd>
<dt></dt><dd></dd>
What have I missed? Any other suggestions for doing this in a lispier
way would also be
welcome.
Thanks,
Tyler
working together. I'm stumped in my efforts to generate a definition list
from an sql query. The following works as expected: (multiple-value-bind
(records fields) (select [genus] [species] :from "specimens" :where [= [collector]
"Test"]) (loop for rec in records do (loop for label in fields for val in
rec do (fresh-line) (print label) (print val)))) [...]
Content analysis details: (-0.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
trust
[209.85.215.51 listed in list.dnswl.org]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(sedgeboy[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
Archived-At: <http://permalink.gmane.org/gmane.lisp.who.general/282>
Hi,
I'm new to lisp in general, trying to get cl-sql and cl-who working
together. I'm stumped in my
efforts to generate a definition list from an sql query. The following
works as expected:
(multiple-value-bind (records fields)
(select [genus] [species] :from "specimens" :where [= [collector] "Test"])
(loop for rec in records do
(loop for label in fields
for val in rec do
(fresh-line)
(print label)
(print val))))
=>
"GENUS"
"Scleria"
"SPECIES"
"triglomerata"
However, swapping print for with-output-to-html fails:
* (multiple-value-bind (records fields)
(select [genus] [species] :from "specimens" :where [= [collector] "Test"])
(loop for rec in records do
(loop for label in fields
for val in rec do
(fresh-line)
(with-html-output (*standard-output* nil :indent nil)
(:dt label)
(:dd val)))))
<dt></dt><dd></dd>
<dt></dt><dd></dd>
What have I missed? Any other suggestions for doing this in a lispier
way would also be
welcome.
Thanks,
Tyler