From: Tino Calancha <tino.calancha@gmail.com>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: tino.calancha@gmail.com, emacs-devel@gnu.org
Subject: Re: New optional arg to [async-]shell-command[-on-region]
Date: Wed, 13 Jul 2016 23:48:57 +0900 (JST) [thread overview]
Message-ID: <alpine.DEB.2.20.1607132332360.23367@calancha-pc> (raw)
In-Reply-To: <57865044.2020807@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
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'.
next prev parent reply other threads:[~2016-07-13 14:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 14:09 New optional arg to [async-]shell-command[-on-region] Tino Calancha
2016-07-13 14:29 ` Clément Pit--Claudel
2016-07-13 14:48 ` Tino Calancha [this message]
2016-07-13 15:06 ` Yuri Khan
2016-07-13 15:27 ` Tino Calancha
2016-07-13 15:58 ` Clément Pit--Claudel
2016-07-13 16:02 ` Clément Pit--Claudel
2016-07-28 12:53 ` New opt to allow not erase out buffer between shell cmds Tino Calancha
2016-08-24 15:10 ` Clément Pit--Claudel
2016-08-26 6:43 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1607132332360.23367@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=clement.pit@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).