Hot answers tagged

10

In addition to assigning to In, the Mathematica main loop assigns the input to InString before it is parsed as an expression. You can then retrieve InString[1] and parse the result with ToExpression, wrapping it in Defer to prevent it from evaluating immediately: In[5]:= ToExpression[InString[1], StandardForm, Defer] Out[5]= Round[SessionTime[]] You can ...


9

$Epilog := PutAppend[DateList[], DownValues[In], "log.log"] will do what you want. It assumes the log file exists and will append to it. You could also place the PutAppend in the file end.m, where $Epilog reads from upon exit.


8

This MathGroup discussion should answer your question, so I'll cite it here: On Tue, 29 May 2012 05:47:52 -0400 (EDT), JCW wrote: Please forgive my dragging up ancient history: I have been using Mathematica from version 2.2 through 7.0. I remember at least one (maybe two?) format conversions that were necessary to update old ...


6

The input is stored as a downvalue in the definition of In. If you've only typed a few expressions, run Definition@In which prints a list of all the values associated with the symbol In, and copy from the line In[1] := Round[SessionTime[]]. But if you've typed hundreds of expressions, or expressions whose plain-text representations are long (like ...


5

In an attempt to reproduce this issue, I began with $Version (* "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *) I then typed x(*y*) and deleted by hand the left asterisk, right asterisk, left parenthesis, and right parenthesis in turn. xy Next I began Edit>Undo until I reached x (y*) At that point, Undo was not grayed out, so the ...


4

From the OPs comments I deduce that the problem is only the dialog that opens when one opens with the menu entry "Cell" -> "Notebook History" and which shows a relatively involved visualization of the history and defaults to analyze the whole notebook. Obviously that is too slow for really large notebooks. But if one only is interested in the last change of ...


3

Albert Retey just created a great button that can give a cell's latest modification time directly. Here is a another workaround. It is small trick I just found, but works perfectly : ) The frozen of mma when open Notebook History windows is due to the default setting is checked for "All cell" instead of "selected cell". So mma collecting too many data to ...


2

If I use menu Edit > Un/Comment Selection (Windows: Alt+/) the operation can be reversed with the Undo command. This is faster anyway and prevents broken syntax and syntax highlighting that occurs when you remove half a comment marker. (I post this as an answer because I hope it is pragmatically just that.)


1

This is a little raw but something along the lines of this should work... stream = OpenWrite["C:\\Temp\\KitchenSink.math"]; $Pre = (Write[stream, #]; #) &; $Post = (Write[stream, #]; #) &; When finished... Clear[$Pre, $Post]



Only top voted, non community-wiki answers of a minimum length are eligible