Octave has a few mechanisms sort of in place to do this partially,
like the edit function and the help function, but they don't work for
compiled code (I don't know if Sage has solved this problem for
compiled code either). I can see how to do this for m-scripts, but how
could something comparable be done for compiled-in functions? I'm
thinking it should be possible to modify the DEFUN family of macros to
include __LINE__ and __FILE__ so that this information is available to
the interpreter. Would this be feasible? I haven't really tried to
untangle the magic behind DEFUN.
Thanks,
- Jordi G. H.