Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for init.m
Search options not deleted
1 vote
0 answers
48 views

Determine init.m location from within said init.m file? [duplicate]

I have following question: can I easily determine location of init.m from within said init.m? … I tried using NotebookDirectory[], but it points to location of notebook which calls init.m file, is there an easy way of determining location of init.m while executing said init.m? …
M i ech's user avatar
  • 223
4 votes
1 answer
125 views

Automatically load init.m without sharing CellContext

I'm trying to set up Mathematica such that all functions/variables defined in my init.m are automatically loaded into any new notebook I open. … However, doing this also makes init.m functions not work across new notebooks. …
KHAAAAAAAAN's user avatar
4 votes
1 answer
95 views

Reinitialize an init.m file without rebooting Mathematica

Is there a way to erase the first shortcut by executing the init.m file without rebooting Mathematica? … That is is there a command I can put at the top the init.m file that will erase the previous version? …
B flat's user avatar
  • 6,016
2 votes
1 answer
81 views

Using a FrontEndToken in an init.m file

Below is my attempt I placed in an init.m file. … SelectionCloseAllGroups"]]}, FrontEnd`MenuKey["c", FrontEnd`Modifiers -> {"Control"}], System`MenuEvaluator -> Automatic ]} ] ]; I believe my problem is using the FrontEndToken in the init.m
B flat's user avatar
  • 6,016
9 votes
1 answer
663 views

How make AddMenuCommands work in an init.m

In [$UserBaseDirectory]/Autoload/FrontEnd/init.m I have the following cell: FrontEnd`AddMenuCommands["OpenHelpLink",{Delimiter, Item["Installed Add-Ons",FrontEndExecute[FrontEnd`FrontEndToken … Do I have the syntax wrong, or should this go in some other init.m? …
murray's user avatar
  • 12.1k
4 votes
1 answer
410 views

How to start Mathematica kernel without loading init.m?

Is it possible to start Mathematica kernel from UNIX command line without having the init.m loaded, but not by simply deleting or commenting out it before hand? … If this is a Mathematica script, is it possible to have the script run and by pass the initialization of running init.m? …
MathCraft's user avatar
  • 585
0 votes
0 answers
227 views

Why is my init.m not loading at startup?

to two locations: FileNameJoin[{$UserBaseDirectory, "Kernel", "init.m"}] (* same as *) "C:\\Users\\User\\AppData\\Roaming\\Mathematica\\Kernel\\init.m" FileNameJoin[{$UserBaseDirectory, "FrontEnd", … "init.m"}] (* same as *) "C:\\Users\\User\\AppData\\Roaming\\Mathematica\\FrontEnd\\init.m" The test code for evaluating an arbitrary package testpack.m: FindFile["testpack.m"] Get["testpack`", Path …
Jules Manson's user avatar
  • 2,467
2 votes
0 answers
90 views

How can I bypass the limitations of init.m? [duplicate]

In a series of QA it has been pointed out that init.m suffers of heavy limitations (see as example, Automatically load packages at startup or Why can't I import a file in the init.m file? … : "As you correctly suggested init.m is read early in the setup when the kernel not yet can make full use of all these features and thus it just isn't the right place to do that." …
mitochondrial's user avatar
31 votes
6 answers
1k views

What secrets are hidden away in your init.m and where do you place it? Please help me build ...

Then it throws a wrench into the whole mess hy introducing the init.m without a good explanation. The following working code is what I have so far. It is what I call my pre-alpha init.m. … By identifying what every init.m file should have and why. By identifying what what every init.m file should NOT have and why. …
22 votes
2 answers
3k views

What is the right place for user-defined init.m?

What is the right folder to put a file init.m which will be run after all other init.m files applied by the various components of Mathematica have done their job? … Previously (in Version 4.0) C:\Program Files\Wolfram Research\Mathematica\4.0\AddOns\Autoload\init.m or C:\Program Files\Wolfram Research\Mathematica\4.0\SystemFiles\FrontEnd\init.m were the right …
Adalbert Hanßen's user avatar
1 vote
0 answers
118 views

auto save a notebook using init.m

mathematica autosave as default, so I put Sjoerd C. de Vries's code https://stackoverflow.com/questions/7193804/automatically-saving-notebook-or-other-type-files-in-mathematica-files/7197175#7197175 into init.m
Novus's user avatar
  • 11
1 vote
1 answer
560 views

How to find line error in init.m file?

I have been changing my init.m user file. It runs fine, but I do get this error below. What does it mean by line 55? What constitutes a line? Are lines separated by "," or ";" or both? … (line 55 of "/Users/michaelmccain/Library/Mathematica/Kernel/init.m"). Also, is there a good method for finding bugs in my Mathematica programs? …
B flat's user avatar
  • 6,016
4 votes
2 answers
235 views

Use URLFetch in init.m

I'm not able to use URLFetch in my $UserBaseDirectory/Kernel/Init.m as it always returns ImportString[Null, Text, CharacterEncoding -> "ISO8859-1"]. …
Tyilo's user avatar
  • 1,565
0 votes
0 answers
103 views

Cannot save file in init.m

So I want to modify FileNameJoin[{$UserBaseDirectory, "Kernel", "init.m"}]: Add NotebookSave[EvaluationNotebook[],FileNameJoin[{$TemporaryDirectory, "test.nb"}]]; to init.m. …
partida's user avatar
  • 6,866
1 vote
0 answers
44 views

What is the syntax for adding code, e.g. LinkWrite[...] to init.m? Version 12.0

LinkWrite[$ParentLink, AddMenuCommands[ "BackgroundDialog", {Delimiter, Item["M&y Color", Background -> RGBColor[0.980, 0.941, 0.902]]}]] To $UserBaseDirectory\FrontEnd\init.m I get a startup … It's been a long time since I tried to hack the init.m. I've forgotten how. Any suggestions? …
Steven Thomas Hatton's user avatar

1
2 3 4 5
30
15 30 50 per page