remove command created using @g.command

33 views
Skip to first unread message

felix74

unread,
Jul 17, 2012, 12:55:12 AM7/17/12
to leo-e...@googlegroups.com
How can I remove a command created using the @g.command decorator without having to reload leo.

Edward K. Ream

unread,
Jul 21, 2012, 7:41:03 AM7/21/12
to leo-e...@googlegroups.com
On Mon, Jul 16, 2012 at 11:55 PM, felix74 <hju...@googlemail.com> wrote:
> How can I remove a command created using the @g.command decorator without having to reload leo.

Why do you want to do this? If you simply want to redefine what a
command means, you could use k.registerCommand::

c.k.registerCommand(command_name,
shortcut=None,
func=yourNewFunction)

Edward

felix74

unread,
Jul 22, 2012, 11:15:13 PM7/22/12
to leo-e...@googlegroups.com
Thanks Edward for suggesting this. 

However, the reason for starting this post is due to my own stupidity. I was having problems with fixing a bug in a command I created using @g.command.  I just forgot that I had to run the script before the updated command was available in the Minibuffer.

I posted the original question in expectation that there be an undocumented @g.removeCommand or c.k.unregisterCommand to remove existing commands that were not needed.   


On Saturday, July 21, 2012 12:41:03 PM UTC+1, Edward K. Ream wrote:
Reply all
Reply to author
Forward
0 new messages