Re: Rev 789350d in devel: a big step for Leo's blacken and beautify commands

2019-09-11 Thread Edward K. Ream
On Wednesday, September 11, 2019 at 5:35:42 PM UTC-5, Edward K. Ream wrote: > About 5 lines of code in this the SyntaxSanitizer class suffice to support the two new settings... > Black does not need to change in any way... > A new setting prevent blacks from messing with hundreds of existing

Rev 789350d in devel: a big step for Leo's blacken and beautify commands

2019-09-11 Thread Edward K. Ream
This work completes #1325 : Beautifiers should optionally preserve indentation of overindented comments. Leo now sports two new settings: @bool black-keep-comment-indentation @bool orange-keep-comment-indentation The former applies to the

Re: DANGER: don't run black on files containing Leo sentinels

2019-09-11 Thread Edward K. Ream
On Wednesday, September 11, 2019 at 6:16:55 AM UTC-5, Edward K. Ream wrote: I'll ask the black devs to create an option that would allow Leonistas to > use black safely. > Done here . Edward -- You received this message because you are subscribed to

Re: Global variables in user scripts

2019-09-11 Thread Brian Theado
Thanks, Vitalije. Only after seeing your response did it occur to me to take a closer look at the scripting docs and of course the user_dict ivar is documented there. On Wed, Sep 11, 2019 at 7:42 AM vitalije wrote: > You have c.user_dict for these kind of things. It is an ordinary python >

Re: Global variables in user scripts

2019-09-11 Thread vitalije
You have c.user_dict for these kind of things. It is an ordinary python dictionary and you can put in it anything you want. Values you set in this dictionary will be there until Leo exits. If you need to make them more permanent then you can put values in c.db (looks like and behaves like a

Global variables in user scripts

2019-09-11 Thread Brian Theado
I'm writing a script button in which I want to transform some outline data into html and then display that html in a leo doc. The viewrendered functionality doesn't seem to really fit my needs as the render pane output is tied to whatever node is currently selected. I just want to be able to

DANGER: don't run black on files containing Leo sentinels

2019-09-11 Thread Edward K. Ream
Don't panic: - The warning applies only when running black from the command line. - The warning apples only when running black on files created by @file. - Leo's blacken-* command are completely safe. As noted previously, they can fail in rare cases, but failures are clearly reported and