I'm trying to learn low-level notebook programming and I have a question.
Is there faster way to select the longest cell in a notebook than this:
NB = CreateDocument[
ExpressionCell[#, "Input"] & /@ {"cell 1", Column@{"cell", "2"}, "cell 3"}]
pos = Position[#, Max @@ #][[ 1, 1]] &@
ReplaceAll[CellSize, (# // AbsoluteOptions) & /@ Cells[NB]][[ All, 2]]
SelectionMove[Cells[NB][[ pos]], All, Cell]
String
Content? or if cell options are the same,ByteCount
maybe useful after NotebookReadCellObject
? $\endgroup$AbsoluteOptions
andReplaceAll
, what I want is to make the code simpler. $\endgroup$