Re: rev 7cba9eb: @chapter defines commands, bindings

2016-04-11 Thread Edward K. Ream
On Monday, April 11, 2016 at 4:46:13 PM UTC-5, Edward K. Ream wrote: > > The following are now valid: > > @chapter one whatever > @chapter two @@key=Ctrl-5 (no key binding) > @chapter three @key=Ctrl-5 whatever > ... > Let me know how it works for you. > Recent revs now allow you to define

Re: rev 7cba9eb: @chapter defines commands, bindings

2016-04-11 Thread john lunzer
Can this be married with the new plain keys in tree feature as well? It would be convenient to type "1", "2", "3", "4", etc... to switch between chapters. A "chapter-select-forward" and "chapter-select-back" would be quite convenient additions as well. On Monday, April 11, 2016 at 5:46:13 PM

rev 7cba9eb: @chapter defines commands, bindings

2016-04-11 Thread Edward K. Ream
The following are now valid: @chapter one whatever @chapter two @@key=Ctrl-5 (no key binding) @chapter three @key=Ctrl-5 whatever The startup code defines the following commands: chapter-select-one chapter-select-two chapter-select-three (bound to Ctrl-5) Let me know how it works for you.

Re: regex vs indices

2016-04-11 Thread Edward K. Ream
On Monday, April 11, 2016 at 3:41:24 PM UTC-5, Edward K. Ream wrote: Here's what I'm working on now.. > the new chapters code will use this regex: > > self.re_chapter = re.compile( > r'^@chapter\s+(\w+)\s*(@key\s*=\s*(.+)\s*)?$') > # @chapter name (@key=binding) > # name=group(1),

Re: regex vs indices

2016-04-11 Thread Edward K. Ream
On Monday, April 11, 2016 at 6:35:59 AM UTC-5, john lunzer wrote: > > Can you give an example? > Here's what I'm working on now. I want to allow key bindings in @chapters nodes. For example: @chapter one @key=Ctrl-1 Rather than parsing this by hand, the new chapters code will use this regex:

Re: regex vs indices

2016-04-11 Thread Edward K. Ream
On Mon, Apr 11, 2016 at 6:35 AM, john lunzer wrote: > Can you give an example? I'm a heavy user of regex and parser of text, I'd > be interested in hearing about different ways of doing things. > ​The most recent examples are in leo/plugins/importers/markdown.py, specifically,

Re: Traceback from trying to delete/rename an @chapter node

2016-04-11 Thread Edward K. Ream
On Mon, Apr 11, 2016 at 7:15 AM, john lunzer wrote: > I opened up a Leo file with an @chapter node and tried to delete it and > nothing happened. > ​.. > File " > ​...leo-editor\leo\core\leoCommands.py", line 3076, in deleteOutline > return cc.removeChapterByName(name) >

Traceback from trying to delete/rename an @chapter node

2016-04-11 Thread john lunzer
I opened up a Leo file with an @chapter node and tried to delete it and nothing happened. I then tried to remove the @chapter text from the node headline. Then I notice this traceback. I can't be sure if it was from the delete or trying to rename it. I'm not at the *most* recent but should be

Re: regex vs indices

2016-04-11 Thread john lunzer
Can you give an example? I'm a heavy user of regex and parser of text, I'd be interested in hearing about different ways of doing things. On Monday, April 11, 2016 at 7:26:11 AM UTC-4, Edward K. Ream wrote: > > Recent revs correct several bugs in the markdown importer. They all > involved the

regex vs indices

2016-04-11 Thread Edward K. Ream
Recent revs correct several bugs in the markdown importer. They all involved the indices used to scan strings. This has been a coding pattern I've used all my life, but I'm starting to see the benefits of using regex patterns instead. Of course, regex patterns are not without complexity

Re: @auto-md does nothing

2016-04-11 Thread Edward K. Ream
On Mon, Apr 11, 2016 at 3:26 AM, Edward K. Ream wrote: > In reviewing the unit tests for @auto-md, I see that some test cases pass > the "perfect import" test (and thus pass), without, in fact, generating the > expected outline. I'll attempt a fix today. > ​Done at

Re: can leo editor prompt file changed

2016-04-11 Thread Edward K. Ream
On Sun, Apr 10, 2016 at 11:33 PM, wrote: > ok, I do not file a bug report unless I'm sure that there is a real problem > ​Thanks. More people see questions, and that's what we want. Edward -- You received this message because you are subscribed to the Google Groups