From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: xdg-directories.el Date: Wed, 07 Sep 2016 11:21:16 -0400 Message-ID: References: <83shtbaj4b.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473261731 27549 195.159.176.226 (7 Sep 2016 15:22:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 15:22:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 17:22:07 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhefl-0005oM-SI for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 17:21:57 +0200 Original-Received: from localhost ([::1]:41526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhefj-0001fU-OE for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 11:21:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhefW-0001ay-Hw for emacs-devel@gnu.org; Wed, 07 Sep 2016 11:21:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhefS-0003Wf-TY for emacs-devel@gnu.org; Wed, 07 Sep 2016 11:21:42 -0400 Original-Received: from [195.159.176.226] (port=33109 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhefS-0003Vq-Md for emacs-devel@gnu.org; Wed, 07 Sep 2016 11:21:38 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bhefE-0002jU-FW for emacs-devel@gnu.org; Wed, 07 Sep 2016 17:21:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Dm2pRs+eD2YeWmCoLBkFEUWBTw0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:207244 Archived-At: > - s-chomp does replace a longer elisp call chain. It's probably (replace-regexp-in-string "\n\\'" "" str) or something like that. I expect you need it because you're using a sub-process script and need to get rid of its final newline. Once you replace this script with Elisp code the need should disappear since the data you'll get will already be properly "chomp'd". BTW, rather than shell-command* you're usually better off using `call-process' when the command you run doesn't need any of shell's features (e.g. doesn't use pipes, etc...). The benefit is that you won't have to worry about the need to shell-quote-argument. > That is why a few months ago I made the choice to use s, which I can > tell is a good library. Yes, we'd like to have it in GNU ELPA. Help would be welcome for that. Stefan