From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Graner Newsgroups: gmane.emacs.help Subject: Re: sending data to an asynchronous process Date: Sat, 03 Apr 2021 01:03:55 +0200 Message-ID: <86ft088f1g.fsf@graner.name> References: <83zgygebw3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25812"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 03 01:05:13 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 1lSSqm-0006Zm-JG for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 01:05:12 +0200 Original-Received: from localhost ([::1]:42514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSSql-0005Mt-KC for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 02 Apr 2021 19:05:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSSpi-0005Md-4z for help-gnu-emacs@gnu.org; Fri, 02 Apr 2021 19:04:06 -0400 Original-Received: from smtp26.services.sfr.fr ([93.17.128.205]:54987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSSpc-0004WJ-UC for help-gnu-emacs@gnu.org; Fri, 02 Apr 2021 19:04:02 -0400 Original-Received: from hypra-graner (1.124.67.86.rev.sfr.net [86.67.124.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2625.sfr.fr (SMTP Server) with ESMTPS id 2C2721C01781C for ; Sat, 3 Apr 2021 01:03:57 +0200 (CEST) X-mail-filterd: 1.0.0 X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=graner.name; s=202006; t=1617404637; h=From:To:Subject:In-Reply-To:Date; bh=5aGDaoqHtUlAh4ebHikrMMz SUcl8q0t+V8U+yqb+oA8=; b=JxPij1wBHAREwmPA38B6wX/1e0Hfqao4wb0wICJquS/tmbuN933 gFTIqIW9y/dhhJh+iDj2IJkOMktYLx6Gy4oLe7bJGJyLKPF8lfumD2JclzADfQ+a4beSEGicX1Aw 5lLHGe4Up5HW41lTAGW7Z9CqbrIv43T9yF7LaSDxyag5Y/P8CH5frmai/fJwgDF5ILYjYcEmlTpo N5kmgaT1wQTh7SseRsxhkcqZBUN0PMJU1svBejcQy5qF7TIFvt/zsWYn11Rmqivr1FswLnYD3WVZ RoQyCpuFMgCJ+tTtaXxNPykgqlxPvbCLXHYmi4eqKVGjYqLWd7Sip5x36cB6kGg==; Original-Received: from hypra-graner (1.124.67.86.rev.sfr.net [86.67.124.1]) by msfrf2625.sfr.fr (SMTP Server) with ESMTP id 11D4D1C017801 for ; Sat, 3 Apr 2021 01:03:57 +0200 (CEST) Original-Received: from hypra-graner (1.124.67.86.rev.sfr.net [86.67.124.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2625.sfr.fr (SMTP Server) with ESMTPS for ; Sat, 3 Apr 2021 01:03:56 +0200 (CEST) In-Reply-To: <83zgygebw3.fsf@gnu.org> (message from Eli Zaretskii on Fri, 02 Apr 2021 22:15:24 +0300) Received-SPF: pass client-ip=93.17.128.205; envelope-from=nicolas.graner@sfr.fr; helo=smtp26.services.sfr.fr X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:128825 Archived-At: Eli Zaretskii wrote on 2021-04-02 22:15: > call-process-region writes the data to a temporary file, and then > invokes the subprocess. So if you do the same "by hand" and then call > start-process, you will have the best of all worlds. IOW, the > temporary file solution you didn't like is exactly what > call-process-region does under the hood, and so efficiency is not the > issue here. As for cleaning up the temporary files, that isn't really > a problem, is it? Great, that's exactly the information I needed. I've rewritten the code using a temporary file and it works like a charm. Many thanks! Nicolas