On Jan 30, 5:25 am, "Edward K. Ream" <[email protected]> wrote:
> The reason that g.app.defaultEncoding can't be set by a user option is > "straightforward", though I have not realized until now ;-) Settings > always apply to a commander, never (or almost never??) to global > settings like g.app.config.defaultEncoding. I'm struggling to understand why g.app.config exists at all, and whether calls such as g.app.config.getBool ever makes any sense. Settings seem to be per-commander beasts and I can't explain how global settings (g.app.config) ever get set. In contrast, it's obvious that c.config settings get inited when Leo reads the corresponding .leo files, although here many details that lie behind the scenes. There may be an opportunity for an important collapse of complexity here. I'm going to make an intensive study of the situation. There are some usages for g.app.config for which no commander exists, but these might be moved to a separate class. If this can be done, the context for the c.config class simplifies considerably, with opportunities for further simplifications. The question arises what, if any, simplifications would be appropriate for Leo 4.7 b3. I suppose the reasonable thing would be to create a new branch, and delay the merge of that branch until after Leo 4.7 final. Sigh. In the meantime, the urgent task is to make sure that encoding-related settings a) work and b) are reasonable to have at all and c) default to utf-8. Edward P.S. One part of the collapse of complexity would be the elimination of g.app.config.set. This method is probably a hold-over from the days when Leo allowed users to change settings in a gui pane while Leo was running. Killing this idea was one of the better "reversions" in Leo's history: it allowed for settings files such as leoSettings.leo and myLeoSettings.leo. To repeat, eliminating g.app.config.set might create opportunities for further simplifications. That would be a really good thing. The present code is very difficult to understand. EKR -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
