From paul.thirumalai at gmail.com Fri Sep 5 02:37:53 2008 From: paul.thirumalai at gmail.com (Paul Thirumalai) Date: Fri, 5 Sep 2008 02:37:53 +0000 Subject: [cl-who-devel] New invitation from Paul Thirumalai Message-ID: <20080905023747.653003E059@common-lisp.net> You have been invited to connect as friends with Paul Thirumalai Please accept or reject this invitation by clicking below: http://www.bebo.com/in/7750480851a673686173b135 ...................................................................... Please do not reply directly to this email. This email was sent to you at the direct request of Paul Thirumalai . You have not been added to a mailing list. If you would prefer not to receive invitations from ANY Bebo members please click here - http://www.bebo.com/unsub/7750480851a673686173 Bebo, Inc., 795 Folsom St, 6th Floor, San Francisco, CA 94107, USA. From info at jensteich.de Sat Sep 27 10:26:41 2008 From: info at jensteich.de (Jens Teich) Date: Sat, 27 Sep 2008 12:26:41 +0200 Subject: [cl-who-devel] loop problem Message-ID: <48DE0A61.2030106@jensteich.de> I need this expression for creation of a macro: WEBCAT 24 > (WITH-HTML-OUTPUT (*STANDARD-OUTPUT*) (LOOP FOR ITEM IN '((FMT "12") (FMT "13")) DO (HTM (:TD ITEM)))) NIL how do I have to correct the expression so that the output is 1213 NIL Jens From sky at viridian-project.de Sat Sep 27 11:16:22 2008 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sat, 27 Sep 2008 13:16:22 +0200 (CEST) Subject: [cl-who-devel] loop problem In-Reply-To: <48DE0A61.2030106@jensteich.de> References: <48DE0A61.2030106@jensteich.de> Message-ID: <64580.88.73.243.149.1222514182.squirrel@mail.stardawn.org> > I need this expression for creation of a macro: > > WEBCAT 24 > (WITH-HTML-OUTPUT (*STANDARD-OUTPUT*) > (LOOP FOR ITEM > IN '((FMT "12") (FMT "13")) > DO (HTM (:TD ITEM)))) > > NIL > > how do I have to correct the expression so that the output is > > 1213 > NIL (with-html-output (*standard-output*) (loop for item in '("12" "13") do (htm (:td (fmt item))))) -> 1213 NIL -- LinkedIn Profile: http://www.linkedin.com/in/polzer Xing Profile: https://www.xing.com/profile/LeslieP_Polzer Blog: http://blog.viridian-project.de/ From info at jensteich.de Sat Sep 27 12:01:09 2008 From: info at jensteich.de (Jens Teich) Date: Sat, 27 Sep 2008 14:01:09 +0200 Subject: [cl-who-devel] loop problem In-Reply-To: <48DE0A61.2030106@jensteich.de> References: <48DE0A61.2030106@jensteich.de> Message-ID: <48DE2085.60408@jensteich.de> Jens Teich schrieb: > I need this expression for creation of a macro: > > WEBCAT 24 > (WITH-HTML-OUTPUT (*STANDARD-OUTPUT*) > (LOOP FOR ITEM > IN '((FMT "12") (FMT "13")) > DO (HTM (:TD ITEM)))) > > NIL > > how do I have to correct the expression so that the output is > > 1213 > NIL I think I found the reason. What I want does not work. Have to collect strings in the list. Sorry for the noise. Jens From rlpowell at digitalkingdom.org Mon Sep 29 01:03:37 2008 From: rlpowell at digitalkingdom.org (Robin Lee Powell) Date: Sun, 28 Sep 2008 18:03:37 -0700 Subject: [cl-who-devel] Looks like a bug to me? Message-ID: <20080929010337.GA27820@digitalkingdom.org> (require 'cl-who) (use-package 'cl-who) (let ((userid 46)) (with-html-output (*standard-output*) (:a :id 7) (str (format nil "~%")) (:a :id "7") (str (format nil "~%")) (:a :id (str userid)))) I'm sure there's some better way to get newlines in the output. Anyways, output is: That last one is really staggeringly wrong. Is it me or the code? -Robin -- Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo Proud Supporter of the Singularity Institute - http://singinst.org/ http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ From stassats at gmail.com Mon Sep 29 01:16:15 2008 From: stassats at gmail.com (Stas Boukarev) Date: Mon, 29 Sep 2008 05:16:15 +0400 Subject: [cl-who-devel] Looks like a bug to me? In-Reply-To: <20080929010337.GA27820@digitalkingdom.org> References: <20080929010337.GA27820@digitalkingdom.org> Message-ID: <9f0fec110809281816r6c14a270qef650d20450cef91@mail.gmail.com> On Mon, Sep 29, 2008 at 5:03 AM, Robin Lee Powell wrote: > > (require 'cl-who) > (use-package 'cl-who) > (let ((userid 46)) > (with-html-output (*standard-output*) > (:a :id 7) (str (format nil "~%")) > (:a :id "7") (str (format nil "~%")) > (:a :id (str userid)))) > > I'm sure there's some better way to get newlines in the output. > Anyways, output is: > > > > > > That last one is really staggeringly wrong. Is it me or the code? > You don't need (str ...) for atrributes: (let ((userid 46)) (with-html-output (*standard-output*) (:a :id 7) (str (string #\Newline)) (:a :id "7") (str (string #\Newline)) (:a :id userid))) -- With Best Regards, Stas. From rlpowell at digitalkingdom.org Mon Sep 29 01:55:04 2008 From: rlpowell at digitalkingdom.org (Robin Lee Powell) Date: Sun, 28 Sep 2008 18:55:04 -0700 Subject: [cl-who-devel] Looks like a bug to me? In-Reply-To: <9f0fec110809281816r6c14a270qef650d20450cef91@mail.gmail.com> References: <20080929010337.GA27820@digitalkingdom.org> <9f0fec110809281816r6c14a270qef650d20450cef91@mail.gmail.com> Message-ID: <20080929015504.GB27820@digitalkingdom.org> On Mon, Sep 29, 2008 at 05:16:15AM +0400, Stas Boukarev wrote: > On Mon, Sep 29, 2008 at 5:03 AM, Robin Lee Powell > wrote: > > > > (require 'cl-who) > > (use-package 'cl-who) > > (let ((userid 46)) > > (with-html-output (*standard-output*) > > (:a :id 7) (str (format nil "~%")) > > (:a :id "7") (str (format nil "~%")) > > (:a :id (str userid)))) > > > > I'm sure there's some better way to get newlines in the output. > > Anyways, output is: > > > > > > > > > > > > That last one is really staggeringly wrong. Is it me or the code? > > > You don't need (str ...) for atrributes: > > (let ((userid 46)) > (with-html-output (*standard-output*) > (:a :id 7) (str (string #\Newline)) > (:a :id "7") (str (string #\Newline)) > (:a :id userid))) What if I need to use format to generate the value, which is where this use case originally came from? (let ((userid 46)) (with-html-output (*standard-output*) (:a :id (fmt "user-~A" userid)))) -Robin -- Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo Proud Supporter of the Singularity Institute - http://singinst.org/ http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ From rnewman at twinql.com Mon Sep 29 03:47:07 2008 From: rnewman at twinql.com (Richard Newman) Date: Sun, 28 Sep 2008 20:47:07 -0700 Subject: [cl-who-devel] Looks like a bug to me? In-Reply-To: <20080929015504.GB27820@digitalkingdom.org> References: <20080929010337.GA27820@digitalkingdom.org> <9f0fec110809281816r6c14a270qef650d20450cef91@mail.gmail.com> <20080929015504.GB27820@digitalkingdom.org> Message-ID: <25B7C69C-9072-489C-9361-5AA009730552@twinql.com> > What if I need to use format to generate the value, which is where > this use case originally came from? > > (let ((userid 46)) > (with-html-output (*standard-output*) > (:a :id (fmt "user-~A" userid)))) (:a :id (format nil "user-~A" userid)) Attributes can contain any Lisp expression. If you want to make sure the user ID is escaped: (:a :id (escape-string-minimal-plus-quotes (format nil "user-~A" userid)))