From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * lisp/subr.el (string-suffix-p): New function. Date: Sat, 23 Nov 2013 08:57:45 -0500 Message-ID: References: <96EB3F8805134461A3BA58983F643449@gmail.com> <8738mo4x69.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385215083 19755 80.91.229.3 (23 Nov 2013 13:58:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Nov 2013 13:58:03 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , Bozhidar Batsov , emacs-devel To: Josh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 23 14:58:05 2013 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 1VkDil-0007Ev-D3 for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2013 14:58:03 +0100 Original-Received: from localhost ([::1]:43766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDil-0005wF-45 for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2013 08:58:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDic-0005w8-7q for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:58:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkDiU-0003Ie-UT for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:57:54 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkDiU-0003IY-QI for emacs-devel@gnu.org; Sat, 23 Nov 2013 08:57:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K4R/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFHO+K4R/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="40223512" Original-Received: from 206-248-174-17.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.17]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Nov 2013 08:57:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 83A636136F; Sat, 23 Nov 2013 08:57:45 -0500 (EST) In-Reply-To: (josh@foxtail.org's message of "Fri, 22 Nov 2013 22:05:52 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:165618 Archived-At: >> I can't remember using something similar to string-chop. In Perl, this >> was handy because it's frequent to receive "a line with a terminating >> LF", but in Emacs it doesn't seem to happen nearly as often. > I'm guessing you don't use `shell-command-to-string' much. Indeed, it's not used very often (among other things because it requires using a shell, and hence requires quoting). But even when it's used, the output is often more than a single line. I'm not saying we never need to trim a terminating newline, I'm just saying that it's not a particularly common operation, so that providing something like string-chop for it doesn't seem very useful. Stefan