[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New optional arg to [async-]shell-command[-on-region]
From: |
Clément Pit--Claudel |
Subject: |
Re: New optional arg to [async-]shell-command[-on-region] |
Date: |
Wed, 13 Jul 2016 16:29:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
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.
Some comments below:
> (let ((inhibit-read-only t))
> - (erase-buffer))
> + (or keep (erase-buffer)))
I tend to prefer (unless ...) here.
> +Optional ninth arg KEEP, if non-nil, then the output buffer is
> +not erased before inserting the output."
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?)
signature.asc
Description: OpenPGP digital signature
- New optional arg to [async-]shell-command[-on-region], Tino Calancha, 2016/07/13
- Re: New optional arg to [async-]shell-command[-on-region],
Clément Pit--Claudel <=
- Re: New optional arg to [async-]shell-command[-on-region], Tino Calancha, 2016/07/13
- Re: New optional arg to [async-]shell-command[-on-region], Yuri Khan, 2016/07/13
- Re: New optional arg to [async-]shell-command[-on-region], Tino Calancha, 2016/07/13
- Re: New optional arg to [async-]shell-command[-on-region], Clément Pit--Claudel, 2016/07/13
- Re: New optional arg to [async-]shell-command[-on-region], Clément Pit--Claudel, 2016/07/13
- Re: New opt to allow not erase out buffer between shell cmds, Tino Calancha, 2016/07/28