On Tue, Mar 10, 2009 at 10:37 AM, mdb <[email protected]> wrote:
>
> How can I make a minibuffer command operate on a particular node
> I.e. turn
> c.executeMinibufferCommand('write-restructured-text')
> into
> p.executeMinibufferCommand('write-restructured-text')
> where p is a node
>
> If I use c.executeMinibufferCommand('write-restructured-text')
> I can get log message 'No @rst nodes in selected tree'
Interesting. This is a pattern that I would not have considered using. My
typical pattern is to do things "directly" using explicit methods. But this
way may be considerably easier in certain situations, especially when the
commands were created by a plugin.
The answer to your question is::
c.selectPosition(p) # p should be an @rst node
c.executeMinibufferCommand('write-restructured-text')
Edward
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---