From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: akrl Newsgroups: gmane.emacs.help Subject: about async process Date: Sat, 25 Aug 2018 18:15:50 +0000 Organization: SDF Public Access UNIX System, Est. 1987 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535221403 8995 195.159.176.226 (25 Aug 2018 18:23:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2018 18:23:23 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 25 20:23:19 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftdDS-0002CW-9N for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Aug 2018 20:23:18 +0200 Original-Received: from localhost ([::1]:46706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftdFY-0005Eg-EU for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Aug 2018 14:25:28 -0400 Original-Path: usenet.stanford.edu!goblin3!goblin.stu.neva.ru!odin.sdf-eu.org!.POSTED.iceland.sdf.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Injection-Info: odin.sdf-eu.org; posting-host="iceland.sdf.org:205.166.94.5"; logging-data="21710"; mail-complaints-to="usenet@odin.sdf-eu.org" Cancel-Lock: sha1:nebc62Khy2q+/MuJCxnTy6gK3E4= Original-Xref: usenet.stanford.edu gnu.emacs.help:223611 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117736 Archived-At: Hi all, the question is: when is the process buffer updated after an async process finish to execute? This is what I'm trying to do: (make-thread (lambda () (let ((prc (start-process-shell-command "test" "out-buff" "echo foo"))) (while (not (equal (process-status prc) 'exit)) (thread-yield)) (with-current-buffer "out-buff" (print (buffer-string)) (sleep-for 0.1) (print (buffer-string)))))) I'm trying to execut an async process in a thread yielding till this has finished and then reading the output. When I execute this code the first print is printing "" and just the second print after the sleep il latching the output I would expect. So my question is when is the output buffer updated and if ther's a way to ensure this has happend or to request for it? Bests and thanks Andrea -- akrl@sdf.org