Subject: Re: bug#22679: 25.0.91; ibuffer-do-shell-command-pipe truncate output

From: Stefan Monnier <[email-masked]>
Date: Wed, 13 Jul 2016 11:27:32 -0400

> You could ask on emacs-devel (though that is often unproductive).
> Frankly my own preference would be to change the function so that it
> does not erase the output buffer, and change the callers instead; but
> that may be totally unfeasible.

shell-command is designed for interactive use.

In 90% of the cases, Elisp code that uses shell-command would be just as
well, if not better, served by start/call-process.

Maybe the better change is to create a new function (partly extracted
from shell-command) which would be halfway between shell-command and
start-process: i.e. designed for use from Elisp, but specifically
tailored to running shell code rather than some other executable.

Then use that function in shell-command and ibuffer-do-shell-command-pipe.

>> Of course the priority is to make the command works as it should.
>> If i need to fix this i think i would find less resistance if my patch
>> just modify the offending command, possibly with an ugly code.

If the new function is well designed, the new
ibuffer-do-shell-command-pipe code shouldn't be ugly.

        Stefan