help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Control of fan-speed on Lenovo Thinkpads


From: Stefan Monnier
Subject: Re: Control of fan-speed on Lenovo Thinkpads
Date: Tue, 30 Mar 2021 11:01:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> (defun sudo (&rest arguments)
>   "Executes list ARGUMENTS with system command `sudo'."
>   (let ((default-directory "/sudo::"))
>     (shell-command-to-string (string-join arguments " "))))

Please don't `string-join` arguments and please don't use a shell when
it's not necessary: they're recipes for quoting bugs.
Better use something like `file-process` here.


        Stefan




reply via email to

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