On Wed, 29 Apr 2015 06:38:43 -0500
"Edward K. Ream" <[email protected]> wrote:

> ​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.

Kind of thinking this is too much trouble for too little reward.
@clean-asis would have to work with @others and maybe @language, not
sure what @asis does with language, so it wouldn't be exactly @asis.

And really, apart from .Rnw files, when is this a problem?  Ideally you
want an editor to be able to edit anything without tripping up on
content, but arguable none of the Leo / Emacs / Vi.* editors are immune
to misinterpretation of something, for example the constructs here:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html

And seeing some kind of `make` script is a must for doc.
generation from LaTeX, adding a sed step to translate is trivial.

So I think we're done - I just brought it up in case it was a simple
thing to skip section references.

Off topic: http://pydoit.org/ is my current favorite for complex "make"
like tasks - not necessarily building software, but running complex
analyses of data involving multiple steps in multiple environments.

Cheers -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