From jeffrey at cunningham.net Sat Dec 29 18:48:25 2007 From: jeffrey at cunningham.net (Jeff Cunningham) Date: Sat, 29 Dec 2007 10:48:25 -0800 Subject: [cl-who-devel] Unexpected behavior of pre directive with indented output Message-ID: <47769679.5010103@cunningham.net> Hi, I ran into some unexpected behavior this morning when using the pre directive. Here is an example: (with-html-output (*standard-output* nil :prologue nil :indent t) (:body (:pre "This block of text should all be justified to the left edge of the window when rendered by a browser, even if the HTML itself is indented, no?"))) What is generated is the following:
    This block of text
should all be justified to the left
edge of the window when rendered
by a browser, even if the HTML itself
is indented, no?
  
Which will "indent" the first line unexpectedly, as well as pre-pending an unexpected line break. I realize that I can turn off indenting in my output, but this seems inelegant. It seems like the pre directive needs to be handled as a special case. --Jeff From edi at agharta.de Sat Dec 29 19:00:27 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 29 Dec 2007 20:00:27 +0100 Subject: [cl-who-devel] Unexpected behavior of pre directive with indented output In-Reply-To: <47769679.5010103@cunningham.net> (Jeff Cunningham's message of "Sat, 29 Dec 2007 10:48:25 -0800") References: <47769679.5010103@cunningham.net> Message-ID: On Sat, 29 Dec 2007 10:48:25 -0800, Jeff Cunningham wrote: > I realize that I can turn off indenting in my output, but this seems > inelegant. It seems like the pre directive needs to be handled as a > special case. I don't agree. To me, the :INDENT argument is there mostly for the purpose of debugging. Also, there are other tags besides PRE which would also need special treatment. Edi. From jeffrey at cunningham.net Sat Dec 29 19:40:01 2007 From: jeffrey at cunningham.net (Jeff Cunningham) Date: Sat, 29 Dec 2007 11:40:01 -0800 Subject: [cl-who-devel] Unexpected behavior of pre directive with indented output In-Reply-To: References: <47769679.5010103@cunningham.net> Message-ID: <4776A291.7060102@cunningham.net> Edi Weitz wrote: > On Sat, 29 Dec 2007 10:48:25 -0800, Jeff Cunningham wrote: > > >> I realize that I can turn off indenting in my output, but this seems >> inelegant. It seems like the pre directive needs to be handled as a >> special case. >> > > I don't agree. To me, the :INDENT argument is there mostly for the > purpose of debugging. Also, there are other tags besides PRE which > would also need special treatment. > > Edi. > _______________________________________________ > Such as? It doesn't seem wise to have a debugging mode that changes the behavior of what it is you are trying to debug. And its another thing to go wrong which seems unnecessary. --Jeff From edi at agharta.de Sat Dec 29 20:09:02 2007 From: edi at agharta.de (Edi Weitz) Date: Sat, 29 Dec 2007 21:09:02 +0100 Subject: [cl-who-devel] Unexpected behavior of pre directive with indented output In-Reply-To: <4776A291.7060102@cunningham.net> (Jeff Cunningham's message of "Sat, 29 Dec 2007 11:40:01 -0800") References: <47769679.5010103@cunningham.net> <4776A291.7060102@cunningham.net> Message-ID: On Sat, 29 Dec 2007 11:40:01 -0800, Jeff Cunningham wrote: > Such as? TEXTAREA, for example. There are more. I don't remember the details, but I've had cases where whitespace between tags in tables changed the way the tables were rendered by certain browsers. > It doesn't seem wise to have a debugging mode that changes the > behavior of what it is you are trying to debug. I didn't say "debugging mode," I said that it's there for the purpose of debugging. I sometimes (rarely) use it if I want to look at the generated HTML. In production environments I always turn the indentation of. CL-WHO is all about output and :INDENT T clearly changes the output. Edi. From jeffrey at cunningham.net Sat Dec 29 20:20:23 2007 From: jeffrey at cunningham.net (Jeff Cunningham) Date: Sat, 29 Dec 2007 12:20:23 -0800 Subject: [cl-who-devel] Unexpected behavior of pre directive with indented output In-Reply-To: References: <47769679.5010103@cunningham.net> <4776A291.7060102@cunningham.net> Message-ID: <4776AC07.2030403@cunningham.net> Edi Weitz wrote: > On Sat, 29 Dec 2007 11:40:01 -0800, Jeff Cunningham wrote: > > >> Such as? >> > > TEXTAREA, for example. > > There are more. I don't remember the details, but I've had cases > where whitespace between tags in tables changed the way the tables > were rendered by certain browsers. > > >> It doesn't seem wise to have a debugging mode that changes the >> behavior of what it is you are trying to debug. >> > > I didn't say "debugging mode," I said that it's there for the purpose > of debugging. I sometimes (rarely) use it if I want to look at the > generated HTML. In production environments I always turn the > indentation of. > > CL-WHO is all about output and :INDENT T clearly changes the output. > > Edi. > Fair enough. Might be nice to stick line in the 'with-html-output description like: "Note: indentation will change the behavior of certain HTML tags, such as
,