On Fri, Dec 17, 2021 at 09:49:12AM +0530, Sugandha Maheshwary wrote: > I am looking for a way to access the source code of certain commands. The > library has a lot of folders and generally I need to do a lot of guessing > and trial and error to reach the source code. > > For instance, for the details of source code of > "WedderburnDecomposition(FG)". I need to follow the path > "/Users/apple/gap-4.10.2/pkg/wedderga-4.9.5/lib/main.gi" > > Is there a refined way of tracking the same, that can direct me from > terminal to source code, which does not need remembering the path of folder > and folder name in which it lies. > > Suppose, if I am looking for source code of the command "AllSubgroups(G)" > or the sonata package command "Subgroups(G)", how do I locate the correct > files?
Dear Sugandha, dear Forum, You could use the utility function 'PageSource'. It will show you the source code of a function in a pager and also print the location. Try for example: gap> PageSource(AllSubgroups); # a pager opens ... Showing source in /my/path/gap4.11/lib/teaching.g (from line 266) gap> LoadPackage("Sonata"); gap> PageSource(Subgroups); Showing source in /my/path/gap4.11/pkg/sonata-2.9.1/lib/grpsupp.gi (from line 102) For other utility functions one can use 'FilenameFunc' and 'StartlineFunc'. Best regards, Frank -- /// Dr. Frank Lübeck, Lehrstuhl für Algebra und Zahlentheorie, \\\ Pontdriesch 14/16, 52062 Aachen, Germany /// E-mail: frank.lueb...@math.rwth-aachen.de \\\ WWW: http://www.math.rwth-aachen.de/~Frank.Luebeck/ _______________________________________________ Forum mailing list Forum@gap-system.org https://mail.gap-system.org/mailman/listinfo/forum