From: Michael Albinus <michael.albinus@gmx.de>
To: Jean Louis <bugs@gnu.support>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Maybe we can improve this function call-process-to-string?
Date: Thu, 08 Apr 2021 15:08:49 +0200 [thread overview]
Message-ID: <87tuogc49q.fsf@gmx.de> (raw)
In-Reply-To: <courier.00000000606EB36D.00004722@stw1.rcdrun.com> (Jean Louis's message of "Thu, 08 Apr 2021 10:40:17 +0300")
Jean Louis <bugs@gnu.support> 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.
next prev parent reply other threads:[~2021-04-08 13:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 7:40 Maybe we can improve this function call-process-to-string? Jean Louis
2021-04-08 7:55 ` Eli Zaretskii
2021-04-08 11:53 ` Jean Louis
2021-04-08 13:39 ` Eli Zaretskii
2021-04-08 15:56 ` Jean Louis
2021-04-08 16:25 ` Eli Zaretskii
2021-04-08 18:17 ` Jean Louis
2021-04-08 18:36 ` Eli Zaretskii
2021-04-08 18:44 ` Jean Louis
2021-04-08 17:18 ` Arthur Miller
2021-04-08 18:32 ` Jean Louis
2021-04-08 19:41 ` Arthur Miller
2021-04-09 8:52 ` Jean Louis
2021-04-09 10:07 ` tomas
2021-04-08 13:08 ` Michael Albinus [this message]
2021-04-08 15:50 ` Jean Louis
2021-04-08 17:49 ` Stefan Monnier
2021-04-08 18:33 ` Jean Louis
2021-04-08 18:40 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuogc49q.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).