On Wed, 13 Jul 2016, Clément Pit--Claudel wrote: > On 2016-07-13 16:09, Tino Calancha wrote: >> I would like to propose a patch adding a new optional argument KEEP >> for commands: `shell-command,' `async-shell-command' and >> `shell-command-on-region'. > > This looks like an OK idea to me :) Although you could also make it a defcustom instead of cluttering the call signature. That sounds good to me. Thank you. > Some comments below: > >> (let ((inhibit-read-only t)) >> - (erase-buffer)) >> + (or keep (erase-buffer))) > > I tend to prefer (unless ...) here. I see. Thanks. >> +Optional ninth arg KEEP, if non-nil, then the output buffer is >> +not erased before inserting the output." Thanks. I will polish it. > I think something went wrong with the grammar here. > >> - (erase-buffer))) >> + (if keep >> + (goto-char (point-max)) >> + (erase-buffer)))) > > Is this in a save-excursion? If not, is there a way to preserve the point in the target buffer? (Is that desirable?) I should drop the `goto-char' call, right? I added that line in order to insert the output of commad 'i+1' after the output from command 'i'.