Thanks Vitalije, I'll have a look at that - thanks!

Pardon the beginner question, but are you defining @coffee, @pug, etc 
yourself? 
Why not @md then instead of md: on the headline?
Either's fine of course, just trying to understand the differences and the 
best practices.

I'm trying to use asciidoc over markdown because it seems to be a middle 
ground between rst (too complex) & md (too simple). 
Mainly because it has *comments*,  *includes*,  simpler tables, and broader 
language support beyond Python.
It's extremely similar to markdown and even the markdown headers work (#) 
so hopefully they'll eventually become more or less compatible someday.
Markdown is of course much more common though and its editor support and 
ecosystem is quite nice these days.


Kevin



On Friday, August 21, 2020 at 1:42:53 PM UTC-4 vitalije wrote:

>
>
> On Friday, August 21, 2020 at 4:08:35 PM UTC+2, k-hen wrote:
>>
>> Thank you for the import script and the responses.
>>
>> I feel like maybe I'm missing something with @nosent though, why is it 
>> much harder to use? 
>>
>> Let's say I have a directory of files that are each templated, i.e. 
>> possibly having a header and footer. 
>> These files are checked into git and synchronized using @auto nodes and 
>> can both be edited and read _into_ Leo when changes occur, e.g. after git 
>> pulling.
>> Then I can clone the body (inner section) of these nodes and write them 
>> out somewhere else using an @nosent file.
>> Never would I want a change to this output file to be read back _into_ 
>> Leo.
>> This file is local only and would not be checked into git, it could be 
>> deleted and would always be overwritten.
>> As you know, Git prefers small files rather than large ones and this one 
>> could be quite massive and treated as a 'large file' and therefore lose 
>> certain functionality. 
>>
>> Sure a script could do this too, but it's a poor man's version of using 
>> includes. 
>>
>>
>>
>
> You can try md_docer plug-in or write your own scripts using the code from 
> md_docer as an inspiration.
>
> In almost all my Leo documents now, the first thing I do is to add a node 
> with the headline '@button nsave @key=Ctrl-s'. So, whenever I press Ctrl-s 
> to save my Leo document, script in this node is executed. There is alwayas 
> a 'c.save()' line in this script, so that the document is saved, but then 
> my script writes all nodes that need to be written in some special way. For 
> example, nodes whose headline starts with '@coffee ...', are compiled with 
> the coffee compiler, '@pug' nodes are compiled with the pug compiler, @css 
> nodes are compiled with sass compiler, ... The limit is just your 
> imagination. You can easily write your nodes without sentinels and Leo 
> won't try to read file and synchronize Leo. Actually I don't have coffee, 
> scss, pug and other types of files that are considered to be source files. 
> I have just compiled versions written as a real files.
>
> HTH Vitalije
>

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/07169d79-7cbb-4c8e-b260-a4a89cbc79a2n%40googlegroups.com.

Reply via email to