I've been a leo user for almost two years, usually keeping up with
development through the _final.zip's on SourceForge. Since my main
environment is Linux, having myLeoSettings.leo not be a hidden file
was always annoying. So, each time I upgraded leo, I changed the
filename to ".myLeoSettings.leo" in the appropriate places in
leoConfig.py and went on my merry way.
Also, rsync'ing files between my office, laptop, and home with their
differing screen resolutions made for the only other annoyance with
fonts. To solve this, I implemented a @ifhostname command for
@settings trees with each version
Ville's tutorial on bzr pushed me over the edge for submitting
something back. The inclusion of getHostName() and machineConfigFile
went un-noticed until today.
The branch updates the documentation for the settings files at the
root of the HOME dir, namely mySettingsFile and machineConfigFile, as
well. Attached is a diff with the current trunk for reference.
One gripe from the changes is the apparent inconsistency of "Settings"
and "Config". Is there any real difference?
These changes aren't appropriate for merging to trunk yet since the
current rev would break customization files for everyone else.
Perhaps g.app.config.initSettingsFiles() could default to the
non-prefixed versions if the prefixed versions don't exist.
LEO is my go-to tool for all my LaTeX papers and lectures, many
programs and scripts, and brainstorming outlines, keep up the good
work! @Edward: reading your play-by-play notes on using LEO for code
comprehension has been enlightening, thanks.
Dan
--
www.whiteaudio.com
or
http://twain.unl.edu
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
=== modified file 'leo/doc/LeoDocs.leo'
--- leo/doc/LeoDocs.leo 2008-04-09 13:57:37 +0000
+++ leo/doc/LeoDocs.leo 2008-04-09 19:57:25 +0000
@@ -4344,8 +4344,8 @@
- The file ``leoSettings.leo`` in the leo/config directory.
- The file ``leoSettings.leo`` in the user's home directory.
-- The file ``myLeoSettings.leo`` in the leo/config directory.
-- The file ``myLeoSettings.leo`` in the user's home directory.
+- The file ``${g.app.customConfigFilePrefix}myLeoSettings.leo`` in the user's home directory. Where ${g.app.customCOnfigFilePrefix} is a string prepended to the filename (if '.', makes the file hidden in Linux).
+- The file ``${g.app.customConfigFilePrefix}${HOSTNAME}LeoSettings.leo`` in the user's home directory. Where ${HOSTNAME} is the computer's machine name.
- The file being loaded.
Settings that appear later in the above list override settings found earlier. For
=== modified file 'leo/src/leoApp.py'
--- leo/src/leoApp.py 2008-03-27 15:02:02 +0000
+++ leo/src/leoApp.py 2008-04-09 19:57:25 +0000
@@ -27,6 +27,7 @@
self.commandName = None # The name of the command being executed.
self.config = None # The leoConfig instance.
self.count = 0 # General purpose debugging count.
+ self.customConfigFilePrefix = '.' # prepend this to "myLeoSettings.eo" and <machineName>LeoSettings.leo
self.debug = False # True: enable extra debugging tests (not used at present).
# WARNING: this could greatly slow things down.
self.debugSwitch = 0
=== modified file 'leo/src/leoConfig.py'
--- leo/src/leoConfig.py 2008-03-27 17:30:43 +0000
+++ leo/src/leoConfig.py 2008-04-09 19:57:25 +0000
@@ -1148,8 +1148,8 @@
"""Set self.globalConfigFile, self.homeFile, self.machineConfigFile and self.myConfigFile."""
settingsFile = 'leoSettings.leo'
- mySettingsFile = 'myLeoSettings.leo'
- machineConfigFile = self.getMachineName()
+ mySettingsFile = g.app.customConfigFilePrefix + 'myLeoSettings.leo'
+ machineConfigFile = g.app.customConfigFilePrefix + self.getMachineName()
for ivar,theDir,fileName in (
('globalConfigFile', g.app.globalConfigDir, settingsFile),
=== modified file 'leo/src/leoProjects.txt'
--- leo/src/leoProjects.txt 2008-04-09 16:59:21 +0000
+++ leo/src/leoProjects.txt 2008-04-09 19:57:25 +0000
@@ -1434,8 +1434,8 @@
"""Set self.globalConfigFile, self.homeFile, self.machineConfigFile and self.myConfigFile."""
settingsFile = 'leoSettings.leo'
- mySettingsFile = 'myLeoSettings.leo'
- machineConfigFile = self.getMachineName()
+ mySettingsFile = g.app.customConfigFilePrefix + 'myLeoSettings.leo'
+ machineConfigFile = g.app.customConfigFilePrefix + self.getMachineName()
for ivar,theDir,fileName in (
('globalConfigFile', g.app.globalConfigDir, settingsFile),