From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Maybe we can improve this function call-process-to-string? Date: Thu, 08 Apr 2021 15:08:49 +0200 Message-ID: <87tuogc49q.fsf@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36894"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Help GNU Emacs To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 08 15:09:54 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lUUPy-0009Ow-9J for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 15:09:54 +0200 Original-Received: from localhost ([::1]:49546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUUPx-0005m1-A8 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Apr 2021 09:09:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUUPY-0005la-GN for help-gnu-emacs@gnu.org; Thu, 08 Apr 2021 09:09:28 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUUPT-0002T1-Du for help-gnu-emacs@gnu.org; Thu, 08 Apr 2021 09:09:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1617887330; bh=yCQQ7oBcNQ655DVyq+aUba+XvjI98mlNDd1DjtyzQY8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=fdwD2VTTXGsX2MpzO11isM1+ghBQi+CBZSI3YFUw8P6GFtW0kMH4bYOBxhei1gTbQ Y2mLVKAbNqNIn66mrVqFelZwwNUxvnByyqJdBbwlbXp3tCzL9dZjxzBBTaLWsh8xSX 1XRtOd2gBehT6lO1Rt4fsYsjWd8FTXrDWqtJCMrg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.91.238.1]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGyxX-1lPJrd0gy3-00E8J5; Thu, 08 Apr 2021 15:08:50 +0200 In-Reply-To: (Jean Louis's message of "Thu, 08 Apr 2021 10:40:17 +0300") X-Provags-ID: V03:K1:4UOT4OmDl3wPA7jatEScwNqEbP8p6SkigZWAMzNHAO6G/JJfVmF kYRZY6amfiGE3fw8zrg4z8QUwI4nx/a/fkO50eTpf9wAeHoXaMhwGYG51gM2EQWg0m/R/me u3yELc1xKKtonJZbpfPL1RsrBA3GWZdYuL0eh5nu1NPrrH2P3LZlSN2HmgY5yjkQUaLIbER CVMh6mzZxPJes/JNFn0Vw== X-UI-Out-Filterresults: notjunk:1;V03:K0:jq/vyyFXbFw=:j3/LlBznswvRm/1v1BkBaJ 5KK7aDDN0DaGooTOXw8xQnMngBvOqqei10pvpw5wRjKPlW2u4qPu5gPI6XWmtbvqCTprv4t4k eUfsPhe3IQu4j2QmlaopR/cWL8+OjTJ1B0LF9CMf6Yj0maLk3uIZMXP0c7GIL8M0bxF7mhkBX /K/BPpILGmxynUeUc/NvclSeWPdeYUsHNpAhbrZNdNjQQZnbDlafEBmISBMXDiHyLEcEKtFHQ 3f/CzGsrPb2rBuV6Qt9TMqys53mHyTjCrysjY7M3CgIDXX/+lSFJLTIkLW+Rba8+65vO5mOvj Ainx3L7oQ6Hd2WSkmIJJryZ7IZ5a9M1JADj/EWLUu0u3mkkf5KT4y0bCvyWU0w2QLO3i4KfAI v96Qtddy7yXZrKyWUQZPWggOXzYPXPT1qwbTwMZUi0vR/Y//KPkmjkYbWYZEJmsEqOjvGYteF qqKdYIReXX1wtES0fatKqDP8/DtKPHQOonyEC53xLjdKU0aemRScADF9lY2tQ47tcv+HyGZPb utHgkciU1jBTelCYkI0179rkFOWAclXOaP6sjUZZautcydNCEmHIwMl57PsePW+6ygXUBVbjk uGyLtfCapVNSwiMdR3pAmmW1k8JrhxUycWZz+fOlX9cKLtEl1c3//t2nb9TI/BG8SytZkAhVx xrNMPuJ+n9ALUbLdyUmwk6yv60Xh6ESWU5+yD0C1S5dTTFFE9dZlZgBSOYxBYSOavH5jG22zl XDz5Bxsf1+0HSeQN4sSNJHT2TljbcjyLYZzrgyBKm0DAJGSBy1V+UlKQKSOZV32Gkb6OLih7 Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128898 Archived-At: Jean Louis writes: > Hello, Hi Jean, > There is function `shell-command-to-string' which is very handy. But > when there are problems with quoting it is better to use > `call-process'. Yet there is no function `call-process-to-string', > which I have made as below. > > Maybe people can tell me how to improve this function? `process-lines' is closed to what you want. Try, for example (process-lines "ls" "-al" ".") It returns a list of strings (lines), which you could use in loops like `while', `dolist' etc. > Jean Best regards, Michael.