I, too, had trouble figuring out this. Thanks Zak for steering us in the right direction. Here's what I end up with:
_command OpenFile() blah...blah...blah
{
_macro('R',1);
filter_init();
filter_get_string(myfname);
if (maybe_find_file("",myfname) == 0) {
e(myfname);
execute('view-line-numbers-toggle');
}
}
This version issues an error if the file is not found, otherwise opens the file for editing and toggles line numbers on. Pretty simple but I had a heck of a time trying to figure out how to do it.