From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: New optional arg to [async-]shell-command[-on-region] Date: Wed, 13 Jul 2016 16:29:24 +0200 Message-ID: <57865044.2020807@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LsB1JhJtOr61SLalkg3AijmHh97DWCPkm" X-Trace: ger.gmane.org 1468420245 16487 80.91.229.3 (13 Jul 2016 14:30:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 14:30:45 +0000 (UTC) Cc: tino.calancha@gmail.com To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 16:30:37 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNLBK-0001k8-UJ for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2016 16:30:35 +0200 Original-Received: from localhost ([::1]:48047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNLBF-0001ws-65 for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2016 10:30:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNLAK-0001sn-EJ for emacs-devel@gnu.org; Wed, 13 Jul 2016 10:29:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNLAG-0002TF-3T for emacs-devel@gnu.org; Wed, 13 Jul 2016 10:29:32 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.187]:50843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNLAF-0002TA-P1 for emacs-devel@gnu.org; Wed, 13 Jul 2016 10:29:28 -0400 Original-Received: from [192.168.1.82] ([109.24.225.43]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0MWfUd-1bu1WA3z6h-00XtXm; Wed, 13 Jul 2016 16:29:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: X-Provags-ID: V03:K0:cr4rDG9mxDiQSa5kipkB/2X1Lo4dC21mi1jCz96A97yOaE6RCBh H6q2m4Hv2NRbglzViqciCAWX5Vfqotny8sO0nxR1WcE4Hvw2xyyGmtxiaEexO9/XV+R8Dy3 JzcDQDFDoFn397CGgoN5MMyk9XlOszOPRHM5cazkMcsdvshsaFUJ3y52tNTwhBLF2dqwfDJ Q5PemcAmHb7L3Nu/omnaA== X-UI-Out-Filterresults: notjunk:1;V01:K0:AsEYfCXvtvU=:U851P+dnh2g6TLguUlux7Q 56xvX/iO+5JtnJ/cmaXAgws5Lo6T96FumrauhCJ1Wy26Et0o7Q3hebCn4VG8GApTG1ZsoILGg 0IJkDj+KuHZRH0Aob1CMwDJhjEQiKqO3SXrSLXd1ceRDg0FgzYuptuYh6Jhp7VkFelK9GEtR5 AXAFI+C3FTl9cy8PA8Di+6ZqbsB9DZSluMbeEcc5/iYGjmq+uPiVuAdbTsLoSWsQLHWjvahYB fWBARLZBGWb2rGOn3QJ2MoHY4iYPES3x/ZdaPdXKBCQgy5nD0UHTeqU7HEGoQwdAjq4Zv9ITf ZMuHnGpuBeckG6Md7nH0SX0nMAGc5Ry+co/0YSIqdjgUsd0RpGVnmRhPz59IfP1cBUd9mCz9l /IM2KHqi4cNTgkHQ13Q3e0h3Zy4H1g4oJIvUxLC6KpAtyLIZyVXxNWV8N6YaEKMkT0XxtIkcR zIp23zzMzWOgd8Lsc0ZWziDU0cCMDltB87yyswZc18oPUY6/FuL0pwnWCIlap7gf8FM3KiSR5 bNvOs0f8ETbBGLbcicwDZNavFqC+PBVZUInEwJc29va+9siPy8L3zi8hSqELopDIRY40wtWr4 owEY+GSKIpC7QzmXl3OK4zz2VGR2WrI5Q1qP5o+fH0ZZWqHX1oKB4kQ3St5Upk09PhDUgxmTK X3q7GZkrdUvDx1AyS+0TKIkWv/SHYIsevXdI1/M1kgMonrcuQVr5dO3yHfwsYtzo/KEE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205630 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LsB1JhJtOr61SLalkg3AijmHh97DWCPkm Content-Type: multipart/mixed; boundary="K6TIIb7Buqbtlnr25NEfeJk9uBBcBbapd" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-devel@gnu.org Cc: tino.calancha@gmail.com Message-ID: <57865044.2020807@gmail.com> Subject: Re: New optional arg to [async-]shell-command[-on-region] References: In-Reply-To: --K6TIIb7Buqbtlnr25NEfeJk9uBBcBbapd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 def= custom 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?) --K6TIIb7Buqbtlnr25NEfeJk9uBBcBbapd-- --LsB1JhJtOr61SLalkg3AijmHh97DWCPkm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXhlBEAAoJEPqg+cTm90wjWfgP/AzK8eaXAF7M5jvNZZP6EXwN Xj8eq9WuimxK1k8KZvM4U8+RiVusuU9IfKFpldo916MFpJ4E1TZJoYV6Kj1f/iqM Ue1yHGtSm2kxcZ6zWaqHbpaArLq1lWuyj/3JUiiTUCMTANojao2mQYiDrXaWrPpp 4BTg9kqy8pBapDeLnNDRAtDS/dptZVVyF5QTlVB5T+j/l2isIO+3nYD93CXhVTAP EGfY0rBcTpGBgthIUIGr6TsscyBygDW3vU3nXqO4Ix5dg89TGj25YodV4s1sKHUx 6AtsePrcxAmJXTMT54xZvsj4TCc1bjP/OArxL+e329NcYNQfUlZw0NbUHHY0F5CF egy7SD0KihCMdxDDHMorcCSvQtp1Acx3UO51t3ExcuKDFXmmUq0H1BDxcT3CwlaE wdLSbuQyAf5ycv750OB4xWsXK8NCRljXVeVFwQHwM/4Dzrmy3UsNyJ1laICOruH7 SJ+nsoqj3wWNH8zsHtXSuSAB8iAM18HZl2Z3bRXxY2jP3WiKX3wo+jBr1nAK5/+0 jQMbCEHz/arNWjUDNtF97WvOKoSvBlGVUUeldJOEnm3sls9KuhEtEzI6u4i27RNQ NsC/XvH8OPZtGMv68XRpYBuugGpBNKKu+u1ueVBqwOwYQg15hZ2CBOdmDoZZ69ty FmbFpShju7SacBTgShtU =gAOD -----END PGP SIGNATURE----- --LsB1JhJtOr61SLalkg3AijmHh97DWCPkm--