9
$\begingroup$

These days I have to do long evaluations and I would like to get back to my notebook as soon as they end. Is there a way to ask Mathematica to produce a sound signal anytime it ends an evaluation?

I know I could use Beep[] or ask Mathematica to say something more silly with Speak[]. Yet I would also have to copy and paste these commands at the end of each cell, and this may be annoying. Is there a way to have this done for any evaluation in my notebook?

$\endgroup$
  • 5
    $\begingroup$ EvaluationCompletionAction $\endgroup$ – Kuba Dec 5 '16 at 10:52
11
$\begingroup$

An alternative to EvaluationCompletionAction would be to adjust $Post. Try

Clear[f];
f[x___] := With[{}, Beep[]; x]
$Post=f;

Now Beep will also be evaluated once every evaluation. Use $Post=. to stop the beeping.

$\endgroup$
6
$\begingroup$

I would use

$Post = (Beep[]; #) &
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.