This Engineering Notebook post considers what to do about Leo's show-file-line command, the evil twin of goto-global-line.
The goto-global-line command is solid, frequently used, and essential. Leo uses its code whenever you click an error link.
In contrast, show-file-line is buggy and seldom used. No other part of Leo uses its code.
The bug
The show-file-line command reports incorrect line numbers for any lines following @others or a section reference (within a node). Apparently, the OP of #3447 was not aware of this bug. Neither was I until yesterday.
There is no good way to fix this bug! Details omitted.
This problem does not apply to goto-global-line. That command knows the target line number. But computing the target line number is much more difficult.
The least bad option
Here are my options:
1. Do nothing except document the bug in the command's docstring.
2. Remove the command. I could make the command invisible by commenting out this line:
@cmd('goto-global-line')
3. Remove the command by moving its code to the attic.
Summary
Fixing the show-file-line command is not an option. Not now. Not ever.
Removing the command would simplify leoJS, but this option seems too extreme.
The only remaining option is to document the command's defects in its docstring. That's what I'll do.
Edward
This Engineering Notebook post considers what to do about Leo's show-file-line command, the evil twin of goto-global-line.