Subject: capturing input file directory at runtime
From: Leo Butler
Date: Mon, 7 Jan 2013 13:47:49 GMT
>From mailnull Mon Jan 7 01:23:08 2013
From: Robert Dodier <robert.dodier at gmail.com>
Date: Mon, 7 Jan 2013 01:22:40 +0000
Content-Type: text/plain; charset="us-ascii"
On 2013-01-06, jfr.maurel at gmail.com <jfr.maurel at gmail.com> wrote:
> So my question is: is it possible to retrieve the location of the maxima
> input file at runtime in order to be able to load a file installed in
> the same directory?
file_search(foobar) returns the path of foobar, which must be something
in file_search_maxima. I guess you could then parse the path to get just
the directory. There might be some Common Lisp functons to help with
that but I don't know for sure.
pathname_directory in src/mload.lisp will extract the directory bit for you.
Try
? pathname_directory
Leo