Removing the Context

*To*: mathgroup at smc.vnet.net*Subject*: [mg35667] Removing the Context*From*: "Johannes Ludsteck" <johannes.ludsteck at wiwi.uni-regensburg.de>*Date*: Thu, 25 Jul 2002 04:45:57 -0400 (EDT)*Organization*: Universitaet Regensburg*Sender*: owner-wri-mathgroup at wolfram.com

Dear MathGroup Members, Tracing functions from Packages generates very long and confusing output, since long context names are printed. To give a short example, consider the following command sequence: DiscreteMath`Tree` t=MakeTree[Range[5]] Trace[TreeFind[t,3]] generates very long output. A simple strategy to strip it would be to use Trace[command, form] which only reports expressions matching form. But this does not alleviate the problem that package variable names are very long, since all package symbols have a long context. For example the private package variables 'm' and 'found' are printed as DiscreteMath`Tree`Private`m and DiscreteMath`Tree`Private`found This makes Trace output almost unreadable. Can anyone suggest a simple idea how to remove the long context names in Trace output? I defined a function which cuts the context from symbols, but this seems awkward an application of the function to the output is not trivial. Best regards, Johannes Ludsteck