Re: How to tell if we're being loaded by ASDF?

2020-03-08 Thread Robert Goldman
On 8 Mar 2020, at 17:22, Robert Dodier wrote:

> Hi, this is a bit off the wall, but maybe there is a way to do it. A
> web search didn't seem to find anything about it.
>
> Is there a way to know that ASDF is loading stuff?
>
> I have this situation. A file might be loaded by ASDF or it might be
> loaded by hand. If it's being loaded by ASDF, then I'd like to do some
> stuff differently.
>
> Why might this file be loaded by hand, why not always use ASDF? Well,
> it's not a Lisp file, it's a Maxima file being loaded by some
> maxima-asdf hackery. I can't count on maxima-asdf working for anybody
> else so I'm expecting that people will load it by hand instead of
> ASDF. But if it is being loaded by ASDF, then I'd like to know that.
>
> Thanks a lot for any info,
>
> Robert Dodier


Robert P. Goldman
Research Fellow
Smart Information Flow Technologies (d/b/a SIFT, LLC)

319 N. First Ave., Suite 400
Minneapolis, MN 55401

Voice:  (612) 326-3934
Email:rpgold...@sift.net



Re: How to tell if we're being loaded by ASDF?

2020-03-08 Thread Faré
One hacky way is to check whether *asdf-session* is nil or not. For
more precision, check the top of the visiting-action-list of the
*asdf-session* and see if its component has the pathname of your lisp
file (from (uiop:current-lisp-file-pathname)

—♯ƒ • François-René ÐVB Rideau •Reflection• http://fare.tunes.org
The main reason Santa is so jolly is because
he knows where all the bad girls live.


On Sun, Mar 8, 2020 at 6:23 PM Robert Dodier  wrote:
>
> Hi, this is a bit off the wall, but maybe there is a way to do it. A
> web search didn't seem to find anything about it.
>
> Is there a way to know that ASDF is loading stuff?
>
> I have this situation. A file might be loaded by ASDF or it might be
> loaded by hand. If it's being loaded by ASDF, then I'd like to do some
> stuff differently.
>
> Why might this file be loaded by hand, why not always use ASDF? Well,
> it's not a Lisp file, it's a Maxima file being loaded by some
> maxima-asdf hackery. I can't count on maxima-asdf working for anybody
> else so I'm expecting that people will load it by hand instead of
> ASDF. But if it is being loaded by ASDF, then I'd like to know that.
>
> Thanks a lot for any info,
>
> Robert Dodier
>



How to tell if we're being loaded by ASDF?

2020-03-08 Thread Robert Dodier
Hi, this is a bit off the wall, but maybe there is a way to do it. A
web search didn't seem to find anything about it.

Is there a way to know that ASDF is loading stuff?

I have this situation. A file might be loaded by ASDF or it might be
loaded by hand. If it's being loaded by ASDF, then I'd like to do some
stuff differently.

Why might this file be loaded by hand, why not always use ASDF? Well,
it's not a Lisp file, it's a Maxima file being loaded by some
maxima-asdf hackery. I can't count on maxima-asdf working for anybody
else so I'm expecting that people will load it by hand instead of
ASDF. But if it is being loaded by ASDF, then I'd like to know that.

Thanks a lot for any info,

Robert Dodier