R: Re: get the current input file's directory



Another possible solution would be a pwd variable that is automatically set to the parent working directory: Maxima mode in emacs afaik does support providing Maxima with input via a pipe as well so this variable would help in at least two cases.
Not sure which side-effects this would cause, though.



"pvarisco at libero.it" <pvarisco at libero.it> schrieb:

>
>>----Messaggio originale----
>>Da: villate at fe.up.pt
>>Data: 08/02/2013 10.20
>>A: "pvarisco at libero.it"<pvarisco at libero.it>
>>Cc: <maxima at math.utexas.edu>
>>Ogg: Re: [Maxima]  get the current input file&#39;s directory
>>
>>On 02/08/2013 08:28 AM, pvarisco at libero.it wrote:
>>> I'll try to explain myself better.
>>> The variable load_pathname has a meaning AFTER you load a library,
>my 
>problem
>>> is BEFORE.
>>> I don't know how  to load a package/library of mine by means of a
>relative
>>> path. The path is relative to the caller input file, i.e. the one
>currently
>>> opened by wxMaxima.
>>If there is a caller input file, then it will have to be loaded and
>once 
>>it is loaded you will have the variable load_pathname bound to the 
>>directory of the input file. I think that what Ray was telling you is 
>>that inside your input file you can add a load command for the 
>>additional package, loading it from load_pathname which within the
>input 
>>file will have the appropriate value.
>>
>>Regards,
>>Jaime
>>
>>
>>
>>
>Ok, my fault again. I didn't stress enough that I usually code with
>wxMaxima 
>not XMaxima.
>
>What you say only works in XMaxima or Maxima through console, where you
>start  
>your session with nothing and you are supposed to provide a load("")
>command to 
>begin with.
>What about wxMaxima, where you OPEN a file through a GUI (Windows I my
>case)? 
>This OPEN action is not a load("") so you get no load_pathname
>functionality! 
>This file has wxm extension and somewhere in its contents, it calls a
>mac 
>library with the load("")  function and the the load_pathname
>functionality.
>
>I would like to have a variable/function which holds the path of the
>current 
>file opened in wxMaxima. That variable would be really usefull for
>programming.
>I don't want to believe I am the only one who came across this issue.
>I guess it is a feature request for the developers of wxMaxima
>
>PV
>
>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.