Linked Questions

1 vote
0 answers

Why doesn't my package load automatically when placed in \$UserBaseDirectory\Autoload? [duplicate]

I'm using Mathematica 10.4 on Windows 10. I created a package which loads when I run Needs["sub`package`"] That works whether the package is placed relative to ...
Steven Thomas Hatton's user avatar
42 votes
7 answers

How symbol lookup actually works

Bug introduced in V6 and fixed in V11.3 The behavior indeed changed but now the documentation is clear about it. This code is inconsistent with the description from Power Programming with ...
user12753's user avatar
  • 423
19 votes
2 answers

Mathematica "prelude"

Is there any way to have the functions from a mathematica file be loaded on startup? For example, in this excellent answer, Jens helps me out and gives me some functions for creating legends for ...
Andrew Spott's user avatar
  • 1,581
16 votes
2 answers

Detecting kernel initialization

Certain operations do not work during kernel initialization. Code from Kernel/init.m, the Autoload directory, or packages set ...
Szabolcs's user avatar
  • 235k
16 votes
3 answers

Package found with `Needs`, but not with `ParallelNeeds`

I want to use a self-written package in a parallel computation. However while Needs["mypackage`"] works without problems, ...
celtschk's user avatar
  • 19.1k
11 votes
2 answers

How can I customize my menus without reloading

I want to edit my menus and know I can do this via but can I do this in real time? Can I do it temporarily? Moreover can I change whether the changes ...
b3m2a1's user avatar
  • 46.9k
13 votes
1 answer

How to use Get on a folder

Documentation flaw introduced before 9.0 and persisting through V11.0.0 In the documentation for Get it says: If the file found by ...
Ian Hincks's user avatar
  • 1,859
12 votes
1 answer

Handling Kernel start. What is a full initialization stack and what place the Autoload has there?

According to: tutorial/WolframSystemSessions Initialization On startup, the Wolfram Language kernel does the following: Performs license management operations. Runs Wolfram Language ...
Kuba's user avatar
  • 137k
8 votes
1 answer

Register "initialization code" to run on any newly started parallel kernel

Is it possible to register a some "initialization code" to be run on any newly started parallel kernel? This would be similar to how ParallelNeeds registers a ...
Szabolcs's user avatar
  • 235k
10 votes
1 answer

How to ensure that a package is always loaded on startup, even in parallel kernels?

Is there a robust way to ensure that a package is always loaded on startup, even in parallel kernels? Parallel kernels do not read Kernel/init.m.
Szabolcs's user avatar
  • 235k
6 votes
1 answer

init.m in Autoload directory is not read by parallel kernels in M11.2

Parallel kernels are not reading the init.m files in $UserBaseDirectory/Autoload since version 11.2. The master kernel reads it ...
Chris Degnen's user avatar
1 vote
1 answer

How to make the variables in $init.m$ not impact the autocompletion

The autocompletion is very convient in Mathematica,but it will make one annoying sometimes when you have a ton variables.I give a scene I encounter.I usually make ...
yode's user avatar
  • 26.8k
3 votes
1 answer

Autoload a package

I want to aoutoload a package at the beginning of a notebook. I set up my directory as written here How to use the Autoload directory? So, I have these files: ../Work/MyFile.nb ../Work/Autoload/...
Ale1794's user avatar
  • 525
2 votes
1 answer

How to autoload user-def functions (in a .m or .nb file)?

How to autoload a few user-def funcions?. For example the function emo[x_]:=Module[{a=x},If[x>0,"Happy","Sad"]] saved in a .nb file or in a ....
Mika Ike's user avatar
  • 3,251
0 votes
0 answers

Is it possible to define a new built-in function in Mathematica? [duplicate]

Say I want to define a function to do integration by part, is it possible to define it as a new built-in function in Mathematica, so that I don't need to define it every time I want to use it?
Nahc's user avatar
  • 455