Terry, On Sun, Jan 29, 2012 at 1:44 PM, Terry Brown <[email protected]> wrote: > On Sun, 29 Jan 2012 04:57:25 -0600 > cd /home/tbrown/Package/leo/bzr/leo.repo/trunk > python launchLeo.py ~/.leo/del.leo > > @settings in del.leo ignored, c.hash() = "/home/tbrown/.leo/del.leo" > > cd /home/tbrown/.leo > python /home/tbrown/Package/leo/bzr/leo.repo/trunk/launchLeo.py del.leo > > @settings in del.leo honored, c.hash() = > "/mnt/usr1/usr1/home/tbrown/.leo/del.leo" > > So, I can see why Leo uses the path to the Leo file to identify its > settings, but at the same time @setting in a particular file should be > honored. > > The problem is that os.getcwd() and friends use the POSIX C getcwd() > function (whatever it's called), and POSIX says return the absolute > path. > os.path.abspath(path) === os.path.normpath(join(os.getcwd(), path)) > > Where to fix it? I'd prefer it use /home/tbrown so settings follow me > around more, at home /home/tbrown may be /mnt/usr1/usr1/home/tbrown, > whereas at work /home/tbrown may be /media/raid2TB/home/tbrown. > > So, c.hash() could operate on os.path.abspath(path), simplest, and > probably fixes the ignored @settings problem. > > Or c.hash() could be calculated from > os.path.normpath(join(os.getenv('PWD'), path)) > > http://stackoverflow.com/questions/1542803/is-there-a-version-of-os-getcwd-that-doesnt-dereference-symlinks > > At least it explains what's going on.
Thanks for sharing these details. I encountered the same issue. I hadn't realized I was using a path with a symlink in it until your email. Now I know to use the workaround of specifying a non-symlinked path on the leo command-line. Before I had found I could just revert the file and get the settings to take effect. This new workaround saves me a step of having to revert as soon as I open the file. Brian -- 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.
