On Thursday, March 3, 2016 at 4:12:49 AM UTC-6, Edward K. Ream wrote:
>
> On Thu, Mar 3, 2016 at 2:59 AM, Zoltan Benedek <[email protected]> 
> wrote:
>
>>
>>
>> https://github.com/benzolius/leo-scripts/blob/master/correct_empty_lines.py
>>
>> Corrects blank lines according to PEP8 (at least between main blocks: 
>> classes, functions and between methods), even if it had wrong blank lines 
>> before importing into Leo.
>>
>
> ​A great idea. I'll add a command to do this. It's on the list.
>

I still think this is a good idea, but everyone should understand that 
*importing* an @clean file is a bad idea.

For example, refresh-from-disk will create an outline from any @clean file, 
but you lose all the headlines and outline structure of the original file.

Instead, you should copy and paste the @clean node from one outline to 
another.  This preserves everything (except gnx's in the .leo file).  
paste-retaining-clones would even preserve gnx's, iirc.

I have been cutting and pasting @clean trees recently because there are 
files in leo/external that mirror scripts whose main git repo is 
elsewhere.  Yes, git could actually include a subsidiary repo in 
leo/external, but I don't want to go there.



*Summary*1. copy and paste is the *only* way to preserve headlines and 
outline structure when "importing" @clean nodes.

2. *After* you have pasted an @clean tree, (or before, for that matter), 
running the suggested script would be useful.  But this script is in no way 
a substitute for preserving outline structure with copy/paste.

Clear?

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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to