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

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

Re: Maybe we can improve this function call-process-to-string?


From: Eli Zaretskii
Subject: Re: Maybe we can improve this function call-process-to-string?
Date: Thu, 08 Apr 2021 10:55:18 +0300

> Date: Thu, 08 Apr 2021 10:40:17 +0300
> From: Jean Louis <bugs@gnu.support>
> 
> There is function `shell-command-to-string' which is very handy. But
> when there are problems with quoting

Problems that shell-quote-argument doesn't solve?  If so, can you show
those problems?

> it is better to use
> `call-process'. Yet there is no function `call-process-to-string',
> which I have made as below.

Why do you need such a command?  Emacs can copy text between buffers,
so you don't need to cons a string to insert it into another buffer.

In general, one should avoid strings in Emacs Lisp, because buffer
memory is handled much more efficiently than string memory.

> Is there maybe some other function that can give me string from
> buffer?

buffer-substring?



reply via email to

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