>>> "David PONCE" <David.Ponce@...> seems to think that:
>> I think there is a deeper problem here. I know I didn't test
>> alternate save directories very much after refactoring the
>> semanticdb stuff. The :file field in the table objects are
>> relative to the project database's target directory, not the save
>> directory. (Or, at least, they should be.)
>> Thus, perhaps the offending code should be:
>> (defmethod semanticdb-file-table ((obj semanticdb-project-database) filename)
>> "From OBJ, return FILENAMEs associated table object."
>> (object-assoc (file-relative-name (expand-file-name filename)
>> (oref this reference-directory))
> obj ;-)
>> 'file (oref obj tables)))
>> but I'm just guessing. I'll look into this more when I get the
>> chance. (Unless you beat me to it, which you have a tendency to
>> do. ;)
>IMO your code does the right thing. I tried it and I can confirm it
>fixed the problem :-)
>Does it make sense to override `eieio-persistent-path-relative' like
>(defmethod eieio-persistent-path-relative ((this semanticdb-project-database) file)
> "For object THIS, make absolute file name FILE relative."
> (file-relative-name (expand-file-name filename)
> (oref this reference-directory)))
>And let `semanticdb-file-table' use it?
[ ... ]
That is a good question. That method is used internal to the
persistent class to save itself. I suspect that the name saved into
the file would come out incorrect.
I do think I may look at that persistent base class, and subclass it
to form a new baseclass that semanticdb case use.
In the meantime, the discussed fix would be great.
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org