Re: ENB: The bane of code: evil "if" statements

2017-04-05 Thread Edward K. Ream
On Wednesday, April 5, 2017 at 12:10:51 PM UTC-5, Edward K. Ream wrote: Thinking about this in the shower I realized that all the troubles arose > from the desire to eliminate duplicate code. > A cff reveals that only three methods call ic.createOutline. Two are in the atFile read logic: at.r

Re: Possible bug in pluginsController.registerOneHandler

2017-04-05 Thread Edward K. Ream
On Wed, Apr 5, 2017 at 3:38 PM, vitalije wrote: On Wednesday, April 5, 2017 at 7:24:15 PM UTC+2, Edward K. Ream wrote: >> >> ​Good catch. The test above looks like mistaken defensive programming. We >> could eliminate the test entirely, or test each bunch in items: if >> bunch.fn == fn:... >> >>

Re: File-open-by-name cmd - path preference

2017-04-05 Thread lewis
See issue 467 -- 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 pos

Re: Possible bug in pluginsController.registerOneHandler

2017-04-05 Thread vitalije
On Wednesday, April 5, 2017 at 7:24:15 PM UTC+2, Edward K. Ream wrote: > > ​Good catch. The test above looks like mistaken defensive programming. We > could eliminate the test entirely, or test each bunch in items: if > bunch.fn == fn:... > > Care to change this yourself? > > Edward > I'll tr

Re: How do you organize your Leo projects?

2017-04-05 Thread Edward K. Ream
On Wed, Apr 5, 2017 at 8:48 AM, Phil wrote: I am about to start a new project using Leo, and am considering how I want > to organize it with respect to other projects. I have used two different > approaches, as follows: > >1. Use a single Leo file and put all projects in it. Each project is >

Re: Possible bug in pluginsController.registerOneHandler

2017-04-05 Thread Edward K. Ream
On Wed, Apr 5, 2017 at 11:45 AM, vitalije wrote: > # from leoPlugins.py file > > def registerOneHandler(self, tag, fn): > > """Register one handler""" > > try: > > moduleName = self.loadingModuleNameStack[-1] > > except IndexError: > > moduleName = '' > > ... > >

Re: ENB: The bane of code: evil "if" statements

2017-04-05 Thread Edward K. Ream
​​ On Wed, Apr 5, 2017 at 11:00 AM, Edward K. Ream wrote: This is an Engineering Notebook post. Feel free to ignore unless you are a > dev. > > This post describes another surprising rabbit hole associated with > recursive imports. > ​Thinking about this in the shower I realized that all the tro

When to create a new branch

2017-04-05 Thread Edward K. Ream
For me, the criterion is simple: when I'm no longer comfortable with pushing what I have to master. I've just created an import branch to deal with recent problems. Creating a new branch in this situation is dead simple: git stash # save

Possible bug in pluginsController.registerOneHandler

2017-04-05 Thread vitalije
# from leoPlugins.py file def registerOneHandler(self, tag, fn): """Register one handler""" try: moduleName = self.loadingModuleNameStack[-1] except IndexError: moduleName = '' ... items = self.handlers.get(tag, []) if fn not in items: bunc

ENB: The bane of code: evil "if" statements

2017-04-05 Thread Edward K. Ream
This is an Engineering Notebook post. Feel free to ignore unless you are a dev. This post describes another surprising rabbit hole associated with recursive imports. When you are up to your ass in alligators, it's hard to remember that your original intention was to drain the swamp... Evil "if

Re: How do you organize your Leo projects?

2017-04-05 Thread 'Terry Brown' via leo-editor
On Wed, 5 Apr 2017 06:48:42 -0700 (PDT) Phil wrote: [single vs. multiple .leo files] > I am wondering how others manage this. I use a hybrid approach. One .leo file at work with @path nodes for git repos. of different projects. I avoid clones, but there's enough commonality between work proje

How do you organize your Leo projects?

2017-04-05 Thread Phil
Hi All, I am about to start a new project using Leo, and am considering how I want to organize it with respect to other projects. I have used two different approaches, as follows: 1. Use a single Leo file and put all projects in it. Each project is rooted in a single root node, using @pa

Re: HTML 5 Leo Viewer

2017-04-05 Thread Edward K. Ream
On Mon, Apr 3, 2017 at 8:07 PM, Joe Orr wrote: > It doesn't have any file upload capability. In fact it the filename > (docs.leo) is hardcoded and expected to be in a particular place. > ​Fair enough. I'd like to link from Leo's home page to your intro to Leo ​asap. Is the url stable enough to

Re: File-open-by-name cmd - path preference

2017-04-05 Thread Edward K. Ream
On Tue, Apr 4, 2017 at 7:04 AM, lewis wrote: > Is there any way to set a preferred directory path for the > File-open-by-name command? > ​Apparently not. Feel free to file an enhancement request here . Edward -- You received this message becau

Re: OT: Time for a Linux laptop

2017-04-05 Thread Edward K. Ream
On Tue, Apr 4, 2017 at 11:26 AM, Mike Hodson wrote: > > Furthermore, I have found the 1920x1080 IPS non-touchscreen panel (matte > display) in my laptop to have a bit of a strange gamma curve; It is spot-on > with mid-tones, but the low/high ends are washed out. > > I just found the "BroadcastRGB