Is there an emacs mode/package/whatever where a specific file size (and/or number of lines) is enforced in a visual way?
Something like this:
1st line 2nd line
where adding some text to the 2nd line will result in
1st line 2nd usele ---- ss line
"\n----\n" marks the part that will be cut off, allowing the user to bring it back in by removing spaces from the lines before it?
(this is just an example, the thing could be of course nicer, and in the case the file gets shorter, extra newlines would be appended and highlighted with some color, etc).