Edward K. Ream wrote:
> On Sat, Oct 25, 2008 at 1:54 AM, thyrsus <[EMAIL PROTECTED]> wrote:
>> Folks who don't use leo don't feel the need to avoid having << and >>
>> on the same line.
>>
>> Could there be an escape mechanism to represent those in
>> the .leo_shadow file?
> 
> The only "escape" mechanism is that g.angleBrackets(s) will return s
> surrounded by '<<' and '>>'.
> 
> I assume you mean that Leo's read and write code would provide a way
> of saying, "ignore what looks like a section reference in this line
> (or piece of code)".
> 
> Sorry, but that can never happen. More than 10 years ago now, when I
> first discovered noweb and decided to base Leo's LP syntax on noweb, I
> made an explicit decision not to support any of noweb's escape
> conventions.  This was based on my experience of trying to support
> escape conventions in @root trees.  It's a nightmare.  I have never
> once regretted this decision.

So if I want to @shadow a file that has lines like:

cat << EOF >> cdebootstrap/suites

I'm just screwed? This is a pretty common idiom in shell scripts, and
would pretty much stop me from using Leo as my main editor, as I've been
intending on doing (or more likely cause me to do some awful
site-specific hack).

IMHO a better way of dealing with this would be to allow the user to
control the redefinition of "special" noweb characters, either
per-document, per-node, and/or in myLeoSettings.leo - e.g. I would think
pretty much zero languages that would be upset by '<<<' and '>>>' or
something like that (sort of similar to how python's """ operator is
usually pretty safe).

This is how a lot of template languages, that often have similar issues
with clashing with the syntax of the documents they are being used to
template, work - e.g.
http://www.cheetahtemplate.org/docs/users_guide_html_multipage/parserInstructions.compiler-settings.html

Cheers,
-- 
Daniel JB Clark   | Sys Admin, Free Software Foundation
pobox.com/~dclark | http://www.fsf.org/about/staff#danny

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to