Discussion:
dolist
Haris Bogdanovich
2012-02-28 14:22:01 UTC
Permalink
Hi.

This is my code:

(defun index ()
(with-html-output-to-string (*standard-output* nil :prologue t)
(:html
(:head)
(:body
(:select
(dolist (var '("citroen" "volvo" "audi"))
(format nil ("(:option %s" var))))))))

I get error:
Funny car of form: "(:option %s
What's wrong ?

Thanks
Stas Boukarev
2012-02-28 15:00:08 UTC
Permalink
This is my code: > > (defun index () > (with-html-output-to-string (*standard-output*
nil :prologue t) > (:html > (:head) > (:body > (:select > (dolist (var '("citroen"
Funny car of form: "(:option %s > What's wrong ? [...]
Content analysis details: (-100.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.214.51 listed in list.dnswl.org]
-100 USER_IN_WHITELIST From: address is in the user's white-list
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(stassats[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/296>
Hi.
(defun index ()
(with-html-output-to-string (*standard-output* nil :prologue t)
(:html
(:head)
(:body
(:select
(dolist (var '("citroen" "volvo" "audi"))
(format nil ("(:option %s" var))))))))
Funny car of form: "(:option %s
What's wrong ?
(format nil ("(:option %s" var))) doesn't look like valid Common Lisp, I
would expect at least (format nil "(:option %s" var)), but it wouldn't
do what you want.

The correct thing would be

(defun index ()
(cl-who:with-html-output-to-string (*standard-output* nil :prologue t)
(:html
(:head)
(:body
(:select
(dolist (var '("citroen" "volvo" "audi"))
(htm (:option (str var)))))))))
--
With best regards, Stas.
Jens Teich
2012-02-28 14:56:10 UTC
Permalink
Content preview: Am 28.02.12 15:22, schrieb Haris Bogdanovich: > Hi. > This
is my code: > (defun index () > (with-html-output-to-string (*standard-output*
nil :prologue t) > (:html > (:head) > (:body > (:select > (dolist (var '("citroen"
Funny car of form: "(:option %s > What's wrong ? > Thanks [...]
Content analysis details: (0.0 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
Archived-At: <http://permalink.gmane.org/gmane.lisp.who.general/297>
Hi.
(defun index ()
(with-html-output-to-string (*standard-output* nil :prologue t)
(:html
(:head)
(:body
(:select
(dolist (var '("citroen" "volvo" "audi"))
(format nil ("(:option %s" var))))))))
Funny car of form: "(:option %s
What's wrong ?
Thanks
last line

(htm (:option (str var))))))

Loading...