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

where the "\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).

  • I guess you're talking about having a maximum line length, where going past that length moves the extra text to the next line? Sounds a lot like like auto-fill-mode. – Drew May 17 '19 at 3:33
  • No, not a maximum line length. A fixed file size -- allowing the user to see the part which will be truncated -- and adjust the content until it fits. I'm pretty sure I've seen that somewhere. – Căcărău May 17 '19 at 4:02
  • 1
    Interesting question! How would emacs or user know how long file should be? – Melioratus May 17 '19 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.