From: Eduardo O. <edu...@gm...> - 2023-07-16 15:06:09
|
On Sun, 16 Jul 2023 at 11:53, Raymond Toy <toy...@gm...> wrote: > On 7/15/23 9:09 PM, Eduardo Ochs wrote: > > On Sat, 15 Jul 2023 at 21:36, Robert Dodier <rob...@gm...> > wrote: > >> Hi Eduardo, >> >> For the record, Maxima functions defined by DEFMSPEC are so-called >> argument quoting functions; these functions work either with >> unevaluated symbols (e.g. kill), or manage evaluation by explicit >> calls to MEVAL (e.g. makelist) -- this latter approach leads to more >> or less unpredictable evaluation behavior. I think the best we can do >> is to document any such existing functions, and be very circumspect >> about introducing new ones. >> >> Hope this helps, >> >> Robert >> > > Hi Jeronimo and Robert, > > I grepped the sources and (I think that I) found 153 Maxima functions > that are defined using defmspec... it would be good to have a nice way > to jump to their sources, but I confess that I would be happy with a > non-nice way, too. I just found that if I run this, > > to_lisp()$ > (describe '$changevar) > (describe '$tex) > (symbol-plist '$tex) > (get '$tex 'mfexpr*) > (to-maxima) > > the output of the "(get '$tex 'mfexpr*)" is: > > #<FUNCTION (LAMBDA (L) :IN "/home/edrx/bigsrc/maxima/src/mactex.lisp") > {52FB567B}> > > how do I extract the "/home/edrx/bigsrc/maxima/src/mactex.lisp" from > that? > > What lisp are you using? > > Maybe you can do (describe (get '$tex 'mfexpr*) to get a description that > includes the path? Or maybe use inspect instead of describe? > > I’m using maxima with cmucl. It doesn’t have the “:IN” part, but describe > does give the path where it was compiled from. > Hi Raymond! Hey, thanks! SBCL. I got this a few minutes before your answer: to_lisp()$ (defun describe-mfexpr (symbol) (sb-impl::describe-function-source (get symbol 'mfexpr*) nil)) (describe-mfexpr '$tex) (to-maxima) But your suggestions are much better: (describe (get '$tex 'mfexpr*)) (inspect (get '$tex 'mfexpr*)) (defun describe-mfexpr (symbol) (describe (get symbol 'mfexpr*))) (describe-mfexpr '$tex) Cheers! =) Eduardo |