From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] shell-command and whitespace Date: Wed, 18 Feb 2015 19:04:51 +0200 Organization: LINKOV.NET Message-ID: <87d257dubw.fsf@mail.linkov.net> References: <54C5905C.2030501@dancol.org> <87a9166omf.fsf@Rainer.invalid> <54E263E0.403@dancol.org> <87oaor1uc1.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424279176 10999 80.91.229.3 (18 Feb 2015 17:06:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2015 17:06:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Achim Gratz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 18 18:06:15 2015 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 1YO84j-0006Ws-2g for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2015 18:06:13 +0100 Original-Received: from localhost ([::1]:51935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO84i-0000LI-9r for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2015 12:06:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO84S-0000Kw-Ft for emacs-devel@gnu.org; Wed, 18 Feb 2015 12:05:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO84N-00054a-JW for emacs-devel@gnu.org; Wed, 18 Feb 2015 12:05:56 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.222.226]:34893 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO84N-00054G-EU for emacs-devel@gnu.org; Wed, 18 Feb 2015 12:05:51 -0500 Original-Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id A9BB631317FB94; Wed, 18 Feb 2015 09:05:47 -0800 (PST) In-Reply-To: <87oaor1uc1.fsf@Rainer.invalid> (Achim Gratz's message of "Wed, 18 Feb 2015 09:45:34 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.222.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183259 Archived-At: >>>> How about this patch, which makes shell-command strip whitespace by >>>> default when called interactively? >>> >>> How about you keep the behaviour as is and have double prefix strip the >>> whitespace instead? >> >> Most of the time, I want to strip whitespace, and whitespace stripping >> is how $() works in the shell. > > That may well be, but I mostly don't want this command to strip > whitespace as has been the default for many years. So instead of > redefining what it does I again suggest you add that functionality. > From a usability point of view double prefix is almost as good as a > single prefix and you're free to provide customization to reverse the > meaning of the two. But please keep the default what it was. I noticed that most of the time, the final newline needs to be removed when output is a single line, but needs to be preserved when output is multi-line.