On Fri, 9 Jan 2004, Lars Gullik Bjønnes wrote: > Christian Ridderström <[EMAIL PROTECTED]> writes: > > | Hi > > > | While testing other stuff I noticed a behaviour about > | .lyx/preferences that means it (at least) should get a small warning > | text in the beginning. > > > | Here's an example of the "problem": > > > | 1. Add \bind "C-o" "self-insert Oops" to .lyx/preferences > | 2. Start lyx and verify that C-o inserts "Oops;", so far so good... > | 3. Edit->Preferences and choose "Save" > | (you can toggle something twice to activate the Save-button) > | 4. Exit lyx > | 5. Start lyx and verify that C-o no longer works. > > > | Why? Well I guess lyx isn't expecting a \bind-statement in preferences > | and has no code for handling unexpected statements. Then when the > | preferences are saved, unexpected statements are simply ignored and > | hence lost. > > Who told you that you should be able to edit preferences manually at > all? >
Who needs to be told.. I just do it ;-) Seriosoly thoug, as I wrote: I find it quite convenient to define temporary bindings /command-sequences in prefereces, since I'd otherwise have to modify one of the standard .bind-files. This really is practical when you're testing a temporary thing, typically when playing with a command sequnce that you want to bind. > | Simple solution: Add a message to the beginning of .lyx/preferences > | saying something like "edit at your own risk". > > No. "DO NOT EDIT THIS FILE" > > would be better. > > > > | Intermediate solution: Add a bind-section to preferences? > > yes. with gui. > > > > | Advanced solution: Change how lyx handles configuration statements that > | don't belong to one of the categories in preferences, i.e. let them either > | stay where they are, or move them to an 'unknown'-section. > > no. > What about: >> Thoughts? >> Should I bugzilla this? Since I hadn't seen the message before, maybe it's moot? (See other mail). Or should I bugzilla the idea of adding a bind-section? An alternative suggestion is that a preference setting is added that makes LyX read a manually created preferences file (after LyX has read .lyx/preferences) ... then you could manually fiddle with this file when you want to play with keybindings etc. I think it'll be a bit too "omständigt" to define command-sequences in the preferences dialog (compared to editing a simple text-file, similar to the .bind-files) -- you'll have to go to the dialog every time you make a change, and then save, stop lyx and restart. OTOH, if lyx actually interpreted the definitions when you 'apply', that'd be quite different. /Christian -- Christian Ridderström http://www.md.kth.se/~chr