Re: "Read file into node" doesn't remember directory

2008-06-05 Thread derwisch
> when I repeatedly enter the "read file into node" command, the file > selection dialogue always starts with my home directory. whoops I forgot: Leo 4.8.1, Mac OS X 10.3.9 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

"Read file into node" doesn't remember directory

2008-06-05 Thread derwisch
Hi all, when I repeatedly enter the "read file into node" command, the file seclection dialogue always starts with my home directory. It would be much nicer if it started at the directory from where the last file was read. Greetings Johannes --~--~-~--~~~---~--~

Re: problem moving nodes around

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 2:31 PM, Terry Brown <[EMAIL PROTECTED]> wrote: > > > I think the complexity is, in fact, part of the problem domain. You > > simply must be aware of whether positions are valid or not. > > Agreed given the way positions work. Seems this sort of thing is > easier in some o

Re: Make a redraw happen - bug report

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 2:50 PM, Terry Brown <[EMAIL PROTECTED]> wrote: > > I still seem to be not getting updates from cleo's right click on an > icon box context menu, and script buttons. I'll look into it. > > > I'm still using the begin/endUpdate try/finally pattern, should I > switch to so

Re: focus nits

2008-06-05 Thread TL
> ... first character of typing is lost. I saw the lost key press problem during the development of the vi emulation. In my case, if a key is mapped to a mode and the mode does not issue an "--> exit-named-mode" command then Leo is still in the mode until a key is pressed that it does not know.

Re: Make a redraw happen - bug report

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 11:32:36 -0700 (PDT) "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > > BTW, I added yet another callback in tree.setCanvasBindings to > > handle tag_bind, but it looks like all or most calls to > > w.tag_bind(...) should be changed to c.tag_bind(w,...). > > The fix in on the t

focus nits

2008-06-05 Thread Terry Brown
Open new Leo file, make outline that looks like: NewHeadline NewHeadline NewHeadline NewHeadline NewHeadline NewHeadline NewHeadline Select top NewHeadline node, start typing in body... Alt-downarrow to go to next node Ctrl-B to edit body Start typing in body... first character of typing is lo

Re: problem moving nodes around

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 13:45:30 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > > Is that the best way to address these things? It seems to add > > complexity beyond the problem domain. > > I think the complexity is, in fact, part of the problem domain. You > simply must be aware of whether

Re: problem moving nodes around

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 13:42:04 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > uses this fact. It creates a target node, whose position (the root) > does not change, then traverses the tree moving nodes under the > target. You could do the same thing: create a target node as the > root, traver

Re: problem moving nodes around

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 1:34 PM, Terry Brown <[EMAIL PROTECTED]> wrote: > > but only because it's careful to only use positions that occur before > (in document order) points where changes have been made. > ... > Is that the best way to address these things? It seems to add > complexity beyond the

Re: problem moving nodes around

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 1:27 PM, Terry Brown <[EMAIL PROTECTED]> wrote: > > > > This is wrong: positions become invalid after changing the outline. > > Sort of what I thought, but how do you get around that? Not all positions become invalid. A position remains valid if the stack of its parents re

Re: problem moving nodes around

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 13:27:28 -0500 Terry Brown <[EMAIL PROTECTED]> wrote: > I'll try re-arranging the algorithm so things are changed from the end > of lists first, but that's a bit arcane. ok, this version works: bn = p.headString().strip('/') n = p.insertAfter() c.setHeadString(n, bn) c.setBod

Re: Make a redraw happen - bug report

2008-06-05 Thread Edward K. Ream
On Jun 5, 11:19 am, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > BTW, I added yet another callback in tree.setCanvasBindings to handle > tag_bind, but it looks like all or most calls to w.tag_bind(...) should be > changed to c.tag_bind(w,...). The fix in on the trunk, rev 507. All unit tests

Re: problem moving nodes around

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 13:21:06 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > others = [i.copy() for i in p.siblings_iter() > > if i.headString().startswith(bn+'.')] > > > This is wrong: positions become invalid after changing the outline. Sort of what I thought, but how do you get around

Re: problem moving nodes around

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 11:52 AM, Terry Brown <[EMAIL PROTECTED]> wrote: > > I run this script from a button: > ... others = [i.copy() for i in p.siblings_iter() > if i.headString().startswith(bn+'.')] This is wrong: positions become invalid after changing the outline. Edward --~--~

Re: show plugin description as text / rst / html

2008-06-05 Thread Terry Brown
Never mind, turns out 20 years of unix experience isn't enough to avoid getting bitten by `find`. find . -name \*html\* (all important backslashes) shows the problem is simply import leo.core.leo_to_html as leo_to_html should be import leo.plugins.leo_to_html as leo_to_html I'll test and update

show plugin description as text / rst / html

2008-06-05 Thread Terry Brown
I'd hoped to fix this myself, but it's sufficiently broken to need pointing out. plugins_menu.py attempts: import leo.core.leo_to_html as leo_to_html find . -name *html* yields: ./leo_to_html.xsl so whatever leo_to_html was, it's gone away. plugins_menu.py appears to only be using leo_to

Re: myLeoSettings.leo read twice?

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 10:17:03 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > > oh, wait, looks like it's reading the same .leoRecentFiles.txt > > twice... probably not that important, but if you want to squash > > that while you're there... > > The same kind of fix is on the trunk now, r502

problem moving nodes around

2008-06-05 Thread Terry Brown
I have Dog Horse /Cat/ Mouse Cat.aux Cat.rrd Mite I want to select "/Cat/", run a button script, and get this Dog Horse Cat /Cat/ Cat.aux Cat.rrd Mouse Mite I run this script from a button: bn = p.headString().strip('/') others = [i.copy() for i in p.siblings_iter() if i.headStri

Re: Obsolete docs?

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 11:00 AM, zpcspm <[EMAIL PROTECTED]> wrote: > > > Edward, your suggested change didn't work (I'm still using the 4.4.8 > final, not the trunk). I see the same thing in the console. No > crashes, no tracebacks. > > I think I'll wait for the next stable release (also because

Re: Make a redraw happen - bug report

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 9:36 AM, Terry Brown <[EMAIL PROTECTED]> wrote: > > I think the problem is illustrated by this script: [snip] > > Thanks. This was most helpful. I now understand the problem: the click logic is intertwined with the node dragging logic. There is a lockout that prevents cont

Re: Obsolete docs?

2008-06-05 Thread zpcspm
> Change g.makeScriptButton to g.app.gui.makeScriptButton. > > Are you running Leo from a console? You should do that if you are > developing a plugin or other code: some messages only to to the console. > > The bug should cause a crash early, but I'm not sure it would result in the > "can not lo

Re: Vi problems: Prioritized

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 10:22 AM, TL <[EMAIL PROTECTED]> wrote: > > Enable binding functions to a number key > > Vi's ability to specify the number of times to execute a command or > which occurrence of a text object to act on could be supported if the > number keys 0-9 could be bound to a function

at_folder plugin

2008-06-05 Thread Terry Brown
Does anyone use the at_folder plugin? I have a major re-working of it, so different I feel it replaces it rather than updates it, and I'm not sure whether to replace it or add it as a new plugin. The new version marks directories "/foo/" and enters them (i.e. adds child nodes for their contents)

Re: myLeoSettings.leo read twice?

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 9:26 AM, Terry Brown <[EMAIL PROTECTED]> wrote: > oh, wait, looks like it's reading the same .leoRecentFiles.txt twice... > probably not that important, but if you want to squash that while > you're there... The same kind of fix is on the trunk now, r502. Please let me kn

Re: Vi problems: Prioritized

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 10:04 AM, TL <[EMAIL PROTECTED]> wrote: > > Zapped text to clipboard (Moderate problem / Easy to fix?): > > The zap-to-character command does not copy the zapped text to the > clipboard. This prevents many of vi's delete or yank commands from > being followed by a paste com

Re: Vi problems: Prioritized

2008-06-05 Thread TL
Enable binding functions to a number key Vi's ability to specify the number of times to execute a command or which occurrence of a text object to act on could be supported if the number keys 0-9 could be bound to a function. Currently, doing so prevents the number from being entered as a charact

Re: Vi problems: Prioritized

2008-06-05 Thread Edward K. Ream
On Jun 5, 6:37 am, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 9:03 PM, TL <[EMAIL PROTECTED]> wrote: > > > > I hacked k.endMode so it restores focus. > > > Thanks Edward, > > It looks like your change did the job. > > Good. On to the next item. When I wrote this, I wa

Re: Vi problems: Prioritized

2008-06-05 Thread TL
Zapped text to clipboard (Moderate problem / Easy to fix?): The zap-to-character command does not copy the zapped text to the clipboard. This prevents many of vi's delete or yank commands from being followed by a paste command. The problem can be fixed by adding the following line to the zapToC

Re: Make a redraw happen - bug report

2008-06-05 Thread Terry Brown
On Thu, 5 Jun 2008 09:22:14 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > The future is now, provided g.newDrawing is True. Ok, I'll update cleo then. > > > So it looks like we may be looking for a call to x.bind (or > > > x.bind2) where x != c. > > > > Just to be sure, we is you? I.e. t

Re: Make a redraw happen - bug report

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 8:58 AM, Terry Brown <[EMAIL PROTECTED]> wrote: > > > In the future, you can *request* a redraw after the command or event > > handler is finished just by doing c.redraw() (aka c.request_redraw()). > > Is the future here now? Can I do this now, or will it have no effect > a

Re: myLeoSettings.leo read twice?

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 9:00 AM, Edward K. Ream <[EMAIL PROTECTED]> wrote: > > > On Thu, Jun 5, 2008 at 8:51 AM, Terry Brown <[EMAIL PROTECTED]> > wrote: > > >> Perhaps just throw in a os.path.realpath()? > > > I didn't know about the two-names-for-the-same-path problem. I'll put the > fix in imme

Re: myLeoSettings.leo read twice?

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 8:51 AM, Terry Brown <[EMAIL PROTECTED]> wrote: > Perhaps just throw in a os.path.realpath()? I didn't know about the two-names-for-the-same-path problem. I'll put the fix in immediately: it will require a new g.os_path_realpath method so as to handle unicode properly in

Re: Make a redraw happen - bug report

2008-06-05 Thread Terry Brown
On Wed, 4 Jun 2008 14:55:23 -0500 "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 1:11 PM, Terry Brown <[EMAIL PROTECTED]> > wrote: > > > > Ok, this looks like a bug. > > > the point is that the redraw only occurs when you click > > the headline, not the icon box, even thoug

Re: Obsolete docs?

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 3:30 AM, zpcspm <[EMAIL PROTECTED]> wrote: > > I am still having problems when trying to reproduce the plugin example > from the docs. There was a bug in the plugin which has been fixed on the trunk (in leo\plugins\examples). Change g.makeScriptButton to g.app.gui.makeScr

Re: myLeoSettings.leo read twice?

2008-06-05 Thread Terry Brown
On Tue, 3 Jun 2008 06:12:42 -0700 (PDT) "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > > > > On May 9, 1:06 pm, Terry Brown <[EMAIL PROTECTED]> wrote: > > > > Leo will read myLeoSettings.leo twice if that's the file you are > > > actually opening. It's not worth "fixing". > > > > It's not the

Re: Tkinter Menu

2008-06-05 Thread Edward K. Ream
On Wed, Jun 4, 2008 at 4:12 PM, Terry Brown <[EMAIL PROTECTED]> wrote: > > I've just pushed a more polished version of my @menuat @settings > directive to the menuat branch. I had forgotten about this work. It would seem to be another solution to Kent's problem of adding small changes to menus

Re: Weave as rsT

2008-06-05 Thread Edward K. Ream
On Thu, Jun 5, 2008 at 5:28 AM, derwisch < [EMAIL PROTECTED]> wrote: > > ...sometimes I just need a documented set of > requirements, together with the code to implement them, printed out, > read by somebody else and signed. ...I would very much like to have a linearized document > that has all

Re: Vi problems: Prioritized

2008-06-05 Thread Edward K. Ream
On Wed, Jun 4, 2008 at 9:03 PM, TL <[EMAIL PROTECTED]> wrote: > > > I hacked k.endMode so it restores focus. > > Thanks Edward, > It looks like your change did the job. Good. On to the next item. BTW, support for 'dot' will wait until b2. Edward --~--~-~--~~~---~

Weave as rsT

2008-06-05 Thread derwisch
There is one function I am consistently missing. Maybe it is about time I scratch this itch myself. Nonwithstanding Edwards arguments about the representation of a literate program as a tree rather than as a text (or as a dictionary rather than as a novel), sometimes I just need a documented set

Re: Obsolete docs?

2008-06-05 Thread zpcspm
I am still having problems when trying to reproduce the plugin example from the docs. I have enabled the print_cp.py plugin in the @enabled-plugins node of leoSettings.py, I have copied the print_cp.py file into the plugins directory of leo. Leo tries to load the plugin, but fails: @enabled-plugi