Adding directory to the beginning of the paclet search pathEdit
From version 9 PacletInfo.m
file requires "Kernel"
extension with Context
specification. Without it loading paclets using contexts doesn't work (see old answer).
Up to version 8 $Path
has precedence over paclet search path no matter how package is loaded.
In versions 9.0 - 10.1 paclet search path has precedence over $Path
no matter how package is loaded.
Since version 10.2 paclet search path is used and has precedence only when package is loaded using its context. When package is loaded using file path - paclet search path is not used at all - only $Path
.
As noted in comment by Kuba, since version 9, when paclet is loaded using context, always newest version (determined by Version
property from PacletInfo.m
) from all available on paclet search path, is loaded, regardless of order of adding directories to paclet search path. Order of adding directories to paclet search path matters only when paclets in different directories have same version, then the one from directory added later has precedence.
Old Answer
Adding directory to the beginning of the paclet search path
One thing to note is that paclet search path is used only when getting files using a path with ordinary path separator. When getting packages using path with elements separated by context separator `
paclet search path is not used.