Code academy: icons

2016-01-29 Thread Edward K. Ream
During our conference call, someone asked whether nodes may have more than one icon. Indeed they can. For example, running this script will insert three icons. Running the script again will insert three more. You can delete the icons using the delete-node-icons command. I'm having trouble

Re: Leo's code academy: how to do cool things easily

2016-01-29 Thread Kent Tenney
Any interest in uA default format being text instead of pickle? On Thu, Jan 28, 2016 at 8:41 PM, Edward K. Ream wrote: > Richard, Don, Rob and I had an excellent conference call today. Great things > are coming, based on tagging and uA's. > > The discussion highlighted a big

Re: Leo's code academy: how to do cool things easily

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 6:16 AM, Edward K. Ream wrote: > On Fri, Jan 29, 2016 at 5:31 AM, Kent Tenney wrote: > >> Any interest in uA default format being text instead of pickle? >> > > ​No. > ​The documentation should suggest using str_ keys unless

Abbreviations

2016-01-29 Thread Kent Tenney
I'm finding Leo's abbreviations to be really wonderful, sort of 'active templates' The abbrev-read and abbrev-write commands are great, abbrev definitions should be able to exist outside Leo files in the spirit of DRY. The syntax used by the read/write commands and the syntax used within a @data

Re: Leo's code academy: how to do cool things easily

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 5:31 AM, Kent Tenney wrote: > Any interest in uA default format being text instead of pickle? > ​No. The code that reads and writes uA's to .leo files is mind-boggling complex. Any change would constitute a major change to Leo's file format. The

Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 9:08 AM, Edward K. Ream wrote: You can delete the icons using the delete-node-icons command. > ​With a minor change to Leo's core, it is now easy to delete the icons of the node at position p: c.editCommands.deleteNodeIcons(p=p) As Terry points

Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 10:01 AM, Edward K. Ream wrote: ​ ​> ​ I would have thought that calling c.editCommands.deleteNodeIcons() should work. ​Never mind. I made several errors. I changed deleteNodeIcons by adding a p keyword argument so that it could work on any node,

Code Academy: real Leo programmers use git

2016-01-29 Thread Edward K. Ream
If you are going to do interesting work on Leo and its plugins, you should be using Leo’s latest sources from GitHub using git . Once git is installed, getting the latest version of Leo is easy: git

Re: Code academy: icons

2016-01-29 Thread 'Terry Brown' via leo-editor
From: Edward K. Ream To: leo-editor Sent: Friday, January 29, 2016 9:08 AM Subject: Code academy: icons During our conference call, someone asked whether nodes may have more than one icon.  Indeed they can. For example, running this

Leo's code academy: uA's and the new p.u property

2016-01-29 Thread Edward K. Ream
A recent rev added the p.u property, which you can think of as a synonym for p.v.unknownAttributes on *both* sides of an assignment. The example in Leo's documentation for access uA's is *way *too complicated. In fact, the following suffices to set the 'n' attribute for test_plugin:

Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 9:30 AM, 'Terry Brown' via leo-editor < leo-editor@googlegroups.com> wrote: ​>> ​I'm having trouble deleting icons programmatically. I'm investigating.​ c.editCommands.setIconList(p, []) > c.redraw() > > If you don't want to delete them all: > > icons =

Re: Code Academy: real Leo programmers use git

2016-01-29 Thread Largo84
Terry, that seems like a terrific idea. Can't think of why it wouldn't work. Rob... On Friday, January 29, 2016 at 3:10:19 PM UTC-5, Terry Brown wrote: > > Git *users* can create gists, like https://gist.github.com/tbnorth/6165576 > > But https://github.com/leo-editor is a GitHub

Re: Leo's code academy: how to do cool things easily

2016-01-29 Thread 'Terry Brown' via leo-editor
On Thu, 28 Jan 2016 18:41:09 -0800 (PST) "Edward K. Ream" wrote: > We discussed the so-called Easter-Egg interface to create new panes > this from the gui, but a summary of how to do this programmatically > is needed. I've given a couple of examples of how to do this, let's

Re: Code Academy: real Leo programmers use git

2016-01-29 Thread Largo84
This is all great stuff. Yes, been using Git for a while now to stay current on the code base. I've often wondered if there's also an easier way to share code snippets and scripts. There's Leo wiki that would be ideal for that, but it hasn't been edited in over 4

Re: Code Academy: real Leo programmers use git

2016-01-29 Thread 'Terry Brown' via leo-editor
Git *users* can create gists, like https://gist.github.com/tbnorth/6165576 But https://github.com/leo-editor is a GitHub organization, not user, so it doesn't have gists, instead I made a separate repo. all members of leo-editor can push to: https://github.com/leo-editor/snippetsI'd vote for

Re: Code Academy: real Leo programmers use git

2016-01-29 Thread Ville M. Vainio
Note that github provides a direct way tn edit files on the website. E.g. go to https://github.com/leo-editor/snippets/blob/master/examples/rst-tutorial/myDocument.html.txt and click the pen icon. This also works for people without commit rights; you can edit a file and create a pull request