Documentation for Yuri E. Kandrashkin's OptionsExplorer package says to add the following menu commands in MenuSetup.tr:
Item["Options &Explorer", KernelExecute[ToExpression["OptionsExplorer[]"]],
MenuKey["o", Modifiers->{Control,Command}], MenuEvaluator->Automatic]
And I want to accomplish the same thing by a corresponding FrontEnd`AddMenuCommands...
expression in an Autoload`PacletManager`Configuration`FrontEnd`init.m
.
But I don't find any KernelExecute
function.
How to do it?
FrontEnd`AddMenuCommands
expression that includes thatKernelExecute
expression, it colorsKernelExecute
to indicate it's an unknown name. And trying the same thing from the indicatedinit.m
seems to accomplish nothing -- but then perhaps I misunderstood what I need as the first argument toAddMenuCommands
: I used"Input from Above"
, which is on theInsert
menu. $\endgroup$KernelExecute
appears to be undocumented but exists and just tells the main kernel to run its argument. Try adding those commands into the file as instructed and see if it works. $\endgroup$KeyEventTranslations.tr
. But I'm not trying to do that; I want a way that makes changes only in$UserBaseDirectory
, not$InstallationDirectory
. Hence I'm trying to editAutoload`PacletManager`Configuration`FrontEnd`init.m
. Moreover, I'm trying to insert an Item there that does two things: (1) create a new menu item (on theInsert
menu); and (2) sets up a corresponding shortcut key -- as I showed in Kandrashkin's code snipped that appears in my question. $\endgroup$init.m
:FrontEnd`AddMenuCommands[ "Input from Above", {Delimiter, Item["Options &Explorer", KernelExecute[ToExpression["OptionsExplorer[]"]], MenuKey["o", Modifiers -> {Control, Command}], MenuEvaluator -> Automatic]}];
But after restart (with clean cache) nothing gets added to theInsert
menu. Did I not properly identify the existing menu keyword in the 1st argument toAddMenuComands
? Is something else wrong? $\endgroup$