Any more info on the magical cloning? That problem is the primary reason I
stopped using @shadow.

Ed Blake
On Wed, Nov 12, 2008 at 8:20 AM, thyrsus <[EMAIL PROTECTED]> wrote:

>
> Yup.
>
> I suggest this patch to LeoDirectory:
>
> --- lD  2008-11-12 11:18:09.000000000 -0500
> +++ lDfixed     2008-11-12 11:17:28.000000000 -0500
> @@ -3,7 +3,7 @@
>  from os.path import join, abspath, basename, normpath, isfile, isdir,
> splitext
>
>  DEFAULT_IGNORE = ['*.pyc', '*.leo', '*.gif', '*.png', '*.jpg',
> '*.json']
> -DEFAULT_PARSE = { 'py':'shadow', 'txt':'auto', 'css':'auto',
> 'html':'auto'}
> +DEFAULT_PARSE = { 'py':'shadow', 'rb':'shadow', 'txt':'auto',
> 'css':'auto', 'html':'auto'}
>
>
>  class LeoDirectory(object):
> @@ -46,8 +46,11 @@
>         return "@%s %s" % (nodetype, filename)
>
>     def body_from_path(self, path):
> -        body = "@path %s" % normpath(path)
> -        return body
> +        if self.relative_paths:
> +            p = basename(path)
> +        else:
> +            p = normpath(path)
> +        return "@path %s" % p
>
>     def leo_from_directory(self, directory, parent=None, isroot=True,
> sort=True):
>         if not self.relative_paths: directory = abspath(directory)
>
>
> On Nov 12, 11:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > first of all, sorry. I was wrong. Nothing is overwritten. Instead a
> > set of files with the same name than the "@shadowed" files of the
> > project are written empty in the project root directory. A second
> > problem is that some nodes in the project outline are magically
> > cloned.
> >
> > Both problems seem to be related to the @path directive. My project
> > contains organizer nodes which in turn contain @shadow nodes and other
> > organizer nodes. Every organizer nodes contains a @path directive that
> > looks like
> >
> > @path root_node/.../current_node
> >
> > This works fine with the rst3 branch, but not now. Changing the @path
> > directive to
> >
> > @path current_node
> >
> > seems to fix the problem.
> >
> > My settings for directory options are:
> > @bool create_nonexistent_directories = False
> > @string relative_path_base_directory = .
> > @bool chdir_to_relative_path = False
> >
> > I've been looking at the directory options in leoSettings.leo but I
> > don't understand what it is said there. In particular, I don't
> > understand the content of the @string relative_path_directory node.
> > Where is leo.py file? What is the ".leo file in the top window"?
> >
> > Vicent
> >
> > On 12 nov, 15:15, "Edward K. Ream" <[EMAIL PROTECTED]> wrote:
> >
> > > On Wed, Nov 12, 2008 at 5:02 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
> >
> > > > Hi,
> >
> > > > until now I was using the rst3 branch of leo. Today I've updated to
> > > > trunk. No problem with most of my projects but...
> > > > my python projects (which heavily make use of @shadow) are
> overwritten
> > > > when I open them with my new Leo (fortunately I do backups :-D). In
> > > > the log pane I see messages like:
> >
> > > > can not open @shadow /home/vmas/project_dir/__init__.py
> > > > created:   /home/vmas/project_dir/LeoShadow/x__init__.py
> > > > created:   /home/vmas/project_dir/__init__.py
> >
> > > > and everything  (*.py file and LeoShadow folders) under project_dir
> is
> > > > overwritten with dummy content.
> >
> > > > What have I to do for solving this problem?
> >
> > > I'm not following exactly what happened.  If your .leo file couldn't
> > > find file, then I don't understand how it could then overwrite those
> > > files.
> >
> > > Edward
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to