emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xdg-directories.el


From: Stefan Monnier
Subject: Re: xdg-directories.el
Date: Wed, 07 Sep 2016 11:21:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> -  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]