To expedite the work I do I have created a Mathematica Package that has all the functions I need to plot the data I need to analyze.
The problem is every now and then I will need to slightly modify one of the functions and will need to go and look for the .m package, copy the function onto the notebook, change the name, and work from there. I was wondering if there is any way that I could create a function inside the Package that would print the contents of the functions so I don't have to lose time searching. Something like PrintFunPac[Function1] that would return the definition of Function1.
Tried googling and didn't find anything. Thanks!
?? <packagename>*did return the definition of the functions but with the ``packagenamePrivate`` in front of the variables' name, but your solution of ``Needs["GeneralUtilities"]; PrintDefinitions[HoldPrint];`` worked!! Thank you so much! – M.O. Sep 12 '18 at 18:47PrintDefinitionscreates notebooks that are not ready to play with. Or is preview code the main goal? – Kuba Sep 13 '18 at 10:41.m, copying the function, pasting it in the.nb, changing its name and then make the changes. UsingNeeds["GeneralUtilities"]; PrintDefinitions[HoldPrint];` as Henrik suggested did just that. – M.O. Sep 13 '18 at 13:02PrintDefinitions, for me at least, generates notebook with interactive (Tooltips/Hyperlinks) symbols that are not just a plain code you can slightly edit and evaluate. – Kuba Sep 13 '18 at 13:08plain textand it works.input textfor me adds the public names of the functions with the name of the package added to it, so for what I need copying asplain textworks perfectly. – M.O. Sep 13 '18 at 13:16