On Thu, 21 Jun 2012 12:07:11 -0500
Kent Tenney <[email protected]> wrote:

> When I'm about to make major changes to a method, I copy the
> node and edit the copy. Python doesn't care, the new version
> replaces the old one. This provides easy fall-back, but can get
> confusing when I end up editing in the old version ...
> 
> Instead, I'll try copying to the target node in warehouse.leo and editing 
> away.
> That will provide the service without clutter.
> 
> - can focus not go to the target node?

Currently focus is supposed to go to the node following the node you
copy/move.  This facilitates filing things.

But it doesn't do that unless you set the setting
  @bool quickmove_timer_hack = True
because of the issue with the last c.frameToFront() or whatever it's
called not winning.

So without that setting set, the destination tab ends up on top, making
it appear that the target node has focus, although it's possible that
keystrokes affect the buried source tab, not sure.

I guess the complete list of possible post action foci would be

 - Node that you operated on (or next node if it was a move)
 - Node after the node you operated on (the current *intended* behavior)
 - Destination node, the newly created one, possibly in another outline.

But perhaps with the @setting set the current behavior is what you
want, apart from the move down to the next node?

> - is there an API to drive this from @command and @button nodes?

  g.app.db['_quickmove']['global_targets']

is the list of

  {'name': 'Things to do for proj. X',
   'unl': '/home/tbrown/projx.leo#Notes-->Todo'} 

entries

so

name = "GGL ToDo"
for i in g.app.db['_quickmove']['global_targets']:
    if i['name'] == name:
        unl = i['unl']
        break
c.quickMove.bookmark_other(unl)  # bookmark
c.quickMove.to_other(unl, cut=False)  # copy
c.quickMove.to_other(unl, cut=True)  # move

ahem, just tested that and it works, but because of the select next
node behavior it actually bookmarked the selected node to a different
outline, then copied the next node to that outline, then moved the next
node to that outline - usually you wouldn't call all three forms in
succession :-)

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to