Steve Litt wrote:
Oh dear lord! I did this, as is my habit:
/usr/share/lyx/configure.py
So just for fun, I did lyx->tools->reconfigure, quit, restart lyx, and now
storybook showed up. Thanks for the reminder.
Hah! And here I thought I was the only one on the list with memory
lapses! :-)
This brings up another problem. Without an automated way to reconfigure,
debugging will take literallly two or three times longer. Can
/usr/share/lyx/configure.py /usr/share/lyx/configure.py be modified to do exactly
the same thing as lyx->tools->reconfigure, quit, restart lyx?
I don't have an answer to this, but since I just debugged some modules
this morning, I may have something to point out. Reconfiguring LyX is
only necessary when you add a layout or module. Once the layout/module
file is there, you can edit it, and LyX only needs a restart (not a
reconfigure) to pick up the changes.
Also, I think it would be a great idea for LyX, on loading, to write to a log
all info about discovered document classes. Every entry would have a
timestamp. It might look something like this:
CHECKING SYSTEM WIDE DIRECTORIES FOR LAYOUTS
dir /usr/share/lyx/layouts/
/usr/share/lyx/layouts/seminar.layout: Loaded doc class
"seminar"
/usr/share/lyx/layouts/siamltex.layout: Loaded doc class "{article
(SIAM)"
/usr/share/lyx/layouts/sigplanconf.layout: FAILED to load doc class "article
(ACM SIGPLAN)", reason
/path/to/other/systemwide/layouts
...
CHECKING CURRENT DIRECTORY
dir /d/at/books/stories
/d/at/books/stories/storybook.layout: Loaded doc class
"storybook"
CHECKING PERSONAL LYX LAYOUT DIRECTORY
dir /home/slitt/.lyx/layouts
dir /home/slitt/.lyx/layouts/tttt.layout: Loaded doc class
"tttt"
dir /home/slitt/.lyx/layouts/ttotst.layout: Loaded doc class
"ttotst"
dir /home/slitt/.lyx/layouts/storybook.layout: FAILED to load doc class
"storybook", class already loaded
That same log could be written by /usr/share/lyx/configure.py because I'm
pretty sure that investigates all directories also.
With the log file in place, layout/class troubleshooting wouldn't be a black
box -- we'd have a diagnostic tool that could save the classmaker and/or
author hours.
Not a bad idea IMHO.
/Paul