Returns the contents of the buffer in text form. See section for a discussion of flattened vs. non-flattened text.