There was some sentinels related talk here, yet it didn't cover all
aspects.
Sorry for bringing back this issue after a delay. The only reason is
that I'm a slow thinker and I didn't remember the following related
thing immediately.
In this thread, the impact of sentinels on programmers was discussed.
How sentinels appear in version control diffs, how they hurt our
aesthetic feelings etc
But there is also one more aspect that will be actual as long as there
are sentinels at all in external files, no matter how simple would
they be, no matter how eye candy would they look.
Sometimes programmers want to distribute source code to end users.
Source code that doesn't contain sentinels and leo outlines at all.
Just external files stripped of sentinels.
Think of it as sort of "export" command, like many version control
tools have.
I brought up this issue a long time ago. Edward helped me that time,
by writing some code that does this. You can find it by UNL "Scripts--
>@thin leoScripts.txt-->Important-->Write cleaned files to 'clean'
directory" in leo's source. I have used variations of that script for
my own purposes for a while, then I didn't need that anymore, so the
problem become less and less important, until I forgot about it. But
now I remembered again.
I think the script approach has some drawbacks. It is too tied to leo.
You need leo to execute it. And it uses leo API to walk through nodes
and write nosent files. This makes it complicated. I wonder if leo
could be bundled with a simple python script, that can walk a source
code tree and strip off sentinels from external files. Something that
would work at regex level and wouldn't be tied to leo at all. This
would simplify things a lot. Just imagine: you write some code using
leo: an outline containing external files linked into it with @thin
nodes. You bundle all of them, plus the clean script to a tarball and
distribute it. Somebody downloads it, runs the clean script which
builds him a totally clean source tree for him, which he can use like
any other source code. The important thing is that since the script
doesn't use any leo machinery (except the fact that he knows some
details about the format of leo sentinels, which are hardcoded into it
as regex patterns). As you can see, this way the sentinels problem is
totally mitigated for at least two categories of users:
- end users
- coders who need the source, but can't/don't want to use leo at all
for looking at it and eventually modifying it.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to