Fairly new to SE, but trying to be as active as I can and just wanted to make sure of what I'm doing.
A few days ago I answered Changing to alternate label if first label does not fit in QGIS?. The answer involved creating a QGIS custom expression that simply took a map's scale, a given font size, and a feature and estimated whether a label would fit.
Subsequently, it became clear that the asker wanted to use the expression in an attribute table in a print composer. In that context, the qgis default variable @map_scale doesn't work.
In attempting to find a solution, I realized that's really a separate question:
How do you get the scale of a given composer map item in a way that allows you to use it in an expression?
The answer was already quite long, and for many people stumbling upon the first question that additional info would be unnecessary. So I created and answered the second question as Getting extent of composer map in PyQGIS? and linked to it in the original answer.
Was that the correct thing to do, or should I have added that to the original answer in its entirety?