[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA: Big changes to RC file system



> 
> On Thu, Jan 27, 2005 at 07:19:30AM -0500, Stuart Brorson wrote:
> 
> > 6.  read /foo/bar/gafrc while sitting in the directory /foo/bar.  This
> >     takes care of all the guile search path problems, like when people put
> >     things like (component-library "../common/symlib") or some such into
> >     their RC files.
> > 7.  After that, read the file itself.
> 
> What happens if my local RCs do more than just modify the search path?
> Suppose then that I have one schematic open, and I open another one in a
> different directory.  Now, an apparently innocuous action -- opening a
> schematic -- has non-local consequences, as my first schematic starts
> behaving oddly.

Please provide a specific example.

> > 8.  Leave the directory to this directory.  This is good because the
> >     user expects that the next time he tries to open a schematic, the
> >     program will start in the last directory visited.  (I hate the Windoze
> >     behavior -- common for may MS apps -- where the filebrowser always
> >     starts at "My Documents", even if you had to browse ten levels deep
> >     into a networked server the last time you needed to open a doc.)
> 
> Can't we resolve all of these problems by simply chdir(2)ing into the
> directory whenever we open a schematic?  This way, relative paths will
> continue to work, and, say, an RC with key bindings will not affect
> already-open windows.
> 
> Actually, we'd probably want to chdir whenever we switch schematics.

This is not how most programs work, and is not what most users expect.
I expect that if I use the file browser to open a schematic in a
different directory, it just opens.  I don't expect that it will be
broken simply because the program didn't know about it's search path.
Most users don't.  I don't expect that I have to close gschem, cd into
a different directory, and then reopen it in order to view a different
schematic.  And newbies certainly don't expect this. 

> > The reason I use absolute paths everywhere is so that the program's
> > operation becomes independent of which particular directory you are
> > sitting in at any time. 
> 
> Right, so we associate a current working directory with a schematic, not
> with where the program was started with.

That's right.  That's how it works now.

> Absolute paths are evil.

I don't care what your religion is.

Seriously, the absolute paths are held internally; the user can invoke
the program however he wants.  Previously, only the following worked:

gschem foo.sch

Now the following also work:

gschem ../foo.sch
gschem foo/bar/baz.sch
gschem /usr/local/foo/bar.sch

That't what rational users expect.  Note that the user never sees
absolute paths.  They are used only internally.

> > Now, use the file browser to open ../B/b.sch.  The schematic b.sch
> > will be missing the symbol b_sym.sym.  This is because as currently
> > run, gschem never opens and reads ../B/gafrc, so it doesn't know about
> > ../B/sym/b_sym.sym.
> 
> Like I said, chdir should solve this.

Not everybody knows this.  I belive strongly that gschem should
operate as the normal, rational user expects.  Currently it doesn't,
which leads to newbies believing that it is misconfigured.  And this
business about closing out gschem & cd'ing into a different directory
to only open a new schematic doesn't make rational sense.

> > I have seen several different people complain about gEDA/gaf being
> > misconfigured [1], and I suspect that this is the problem. 
> > Most newbies think they can use the file browser to browse to a new
> > schematic and open it up.  When they try it, however, the schematics
> > they view appear broken if they have locally defined components.
> 
> As opposed to newbies (or even experienced users!) who open a schematic,
> open another one, go back to the first one, and are unable to add
> components because their library path got mangled?

I have tested this, and it works fine.  I have opened three or four
schematics from different directories, and then placed symbols from
any arbitrary directory into any schematic.  It all works just
fine.   Please download the CVS version and try it out.

> I'd put my fist through the monitor if this happened.

Wear boxing gloves then.   :-)

Anyway, it is now in CVS.  Please d/l it and try it out.  Theoretical
discussions are moderately fun, but concrete bug reports are of real
interest to me.

If the general consensus is that the changes are bad, it will be easy
to backrev CVS.   HOwever, I think that once you try it out, then you
will agree that it is better now.  And, if you are already a power
user, you won't notice a difference anyway.

Stuart