1
$\begingroup$

How can I remove the message "Data not saved. Save now" from a Dataset object? I know I can click on it, but when I reevaluate the cell, the raft appears again.

The main problem is that the raft is present also when I save the object as PDF.

enter image description here

$\endgroup$
2
  • $\begingroup$ An example to play with would make it easier to help you. $\endgroup$
    – Michael E2
    Apr 6 at 19:15
  • $\begingroup$ @MichaelE2, I used $NotebookInlineStorageLimit = 0; Dataset[Range[10]] for my play :) $\endgroup$
    – Domen
    Apr 6 at 19:44

1 Answer 1

1
$\begingroup$

This raft is displayed because your output exceed $NotebookInlineStorageLimit, which is set to $2^{20}$ bytes by default. You can verify this by evaluating ByteCount[your dataset].

You can increase this limit, for example:

$NotebookInlineStorageLimit = 2^25

However, perhaps a better solution is to hide the raft. A general solution for hiding this raft for all types of non-saved data* is the following hack (!):

Unprotect[BoxForm`EmbedSummaryButton];
BoxForm`EmbedSummaryButton = "" &;

enter image description here


* This raft can also be hidden via styles, but only for summary boxes (such as WeightedData etc.):

SetOptions[EvaluationNotebook[], 
  StyleDefinitions -> 
   Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
     Cell[StyleData["SummaryEmbedGrid"], 
      TemplateBoxOptions -> {DisplayFunction -> (#1 &)}]}]];

However, this does not work for Dataset, because the button is displayed differently.

$\endgroup$
3
  • $\begingroup$ This is awesome. Thanks a lot!!!! $\endgroup$
    – elbOlita
    Apr 7 at 11:22
  • $\begingroup$ Any chance you would have a similar hack to remove that box on the right of a dataset that updates values when you hover over? $\endgroup$
    – elbOlita
    May 4 at 17:58
  • 1
    $\begingroup$ You can go to the Evaluation menu and disable Dynamic Updating ... But if you want other dynamics in the notebook and only disable this particular feature, you can try the following hack: removeHoverAnnotation[d_Dataset] := RawBoxes[ToBoxes[d] /. _MouseAnnotation -> ""];, which you use on a Dataset, for example: removeHoverAnnotation[Dataset[Range[10]]] $\endgroup$
    – Domen
    May 4 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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