​On Mon, Apr 27, 2015 at 9:40 AM, 'Terry Brown' via leo-editor <
[email protected]> wrote:

i.e. delimiters of `<<.*>>=` and `@` which do not play well at all with
> Leo.  `@` is problematic syntax coloring wise.
>
> Of course I want to use @clean for this, @asis works, but doesn't
> support @others.  So I guess it would be great if Leo could turn off
> interpretation of section references and doc comments or whatever it is
> @ delimits.
>

For @clean nodes at.writeAllHelper calls::

    at.write(p,kind='@clean',nosentinels=True,toString=toString)

at.write calls at.writeOpenFile which calls at.putBody.  The changes would
have to be in::

    << handle line at s[i] >> (putBody)

This would not be easy for user code to mess with, so I'm wondering if
there is an easier, more general way.  Several possibilities come to mind:

1. @clean-asis.  The write code be similar to the @asis write code (which
is simple), except that trailing newlines would be guaranteed for all
nodes.  The read code might be identical to @clean code.

2. @user-file.  The read/write code would be specified by the user somehow,
probably by a plugin along the lines of the importer/writer plugins.

3. Change @asis so it works like @clean-asis just described.

4. Use scripts, somehow, to read/write a tree.

#2 is asking for trouble.  Read/code is too complicated to trust to users.

#3 is also asking for trouble: it's never a good idea to change what
@<file> directives do.

#4 is always possible, but hard.

So that leaves #1.

Or maybe settings could modify the workings of @clean.  But that's also
asking for trouble, even assuming per-commander settings are available when
reading @clean nodes.

So again, only #1 looks feasible.

New directives that would modify the workings of @clean (or other @<file>
nodes) also look like asking for trouble.

*Summary*

An @clean-like version of @asis would be good.  Unless I am mistaken,
@clean-asis is needed (alternatives are too difficult to trust to users)
and fairly straightforward to add to Leo.

Otoh, I am never real happy to add another type of @<file> node.

Your comments, please, Terry.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to