riscy / shx-for-emacs

An Emacs shell-mode (and comint-mode) extension that enables displaying small plots and graphics and lets users write shell commands in Emacs Lisp.
GNU General Public License v3.0
218 stars 10 forks source link

output shorter then 1000 characters #9

Closed CeleritasCelery closed 6 years ago

CeleritasCelery commented 6 years ago

I see this line in code and I was wondering what is the reasoning behind this? Is there some technical reason or is it purely for "good practice"?

riscy commented 6 years ago

Thanks for this. Your question made me start digging - and I should have commented that decision!

It turns out in macOS lines longer than about 1000 characters (or a little more) entered into Emacs' shell bust the buffer and cause the input to get trashed, so I added that safeguard. But on a Linux box this isn't a problem at all.

It's probably a good idea to keep that line for macOS installs until the bug is fixed, but I shouldn't force the limitation on everyone. I'll have to think about a solution.

riscy commented 6 years ago

Turns out it's a constant that differs by operating system, but macOS is probably around the shortest. The accepted answer here provides a ton of detail.

Thanks again for noticing that!

riscy commented 6 years ago

Fixed in 0.0.15