From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: How to post-process the buffer populated by the async `start-process' Date: Sat, 12 Jan 2019 11:10:00 -0500 Message-ID: References: <4191547274729@myt1-8f46c049cd43.qloud-c.yandex.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1547309343 32194 195.159.176.226 (12 Jan 2019 16:09:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2019 16:09:03 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Chunyang Xu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 17:08:59 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giLqF-0008EN-8B for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 17:08:59 +0100 Original-Received: from localhost ([127.0.0.1]:45651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giLsM-0001aF-5C for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 11:11:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giLrs-0001Zw-Hf for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 11:10:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giLrr-0000Gr-KL for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 11:10:40 -0500 Original-Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:43743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giLrr-0000FX-8W for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 11:10:39 -0500 Original-Received: by mail-lj1-x236.google.com with SMTP id q2-v6so15466972lji.10 for ; Sat, 12 Jan 2019 08:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DB+S3HiSwWzl0aTPZBvi/je2TK4y5BkqBc2zJpZeLI4=; b=bAME2DYrDEVOGtCyvFCcVkLQGr4S+Y4Kj3XvVrAwoQeorbZJTzKaw0MXTIMV+qciMl Z/YbjB9I0zS+91fwoF5g240brxmUuYFeTL3Zc7S2yaf20Ovs5nxaj7wMJk37VOUkaLJv /7l9QAzAh0bD6cGlaoytfwUwQsgG2eTKio+VaBdPtZHrgKpIGzMQOlnjY93vO+/XorKs WjB4GYv/2qZZjaaN9HpW9QUdVxDik4xCLylTWkDG0rzUWD+HMsM6RaBh4EGRMDrc+9F3 UV+jMqi8CQPwMOcrOd/Z03VUt/JbCeUqlOfFxs1joTNat1F/RkB9LQ1rmqwf6ssulAba ZTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DB+S3HiSwWzl0aTPZBvi/je2TK4y5BkqBc2zJpZeLI4=; b=EHHqVLyziJ2djXZxuxN9G6hdGwwJ+HwfG6Jgva/xwc/QQ4NShKSJ2i4QRZPCGEDF3i 2tRedcmr/Zxt78+sMy2UxtCQgSv2WpwtoAqaz3LCqpRtfSurnCP767pwzkrkDLsOYHnv pi37tk9ohr0QPdEBnguB53PW/Yi51btRHgGaa0uZZRC5X/SDnEAU+mAI+gssi6/s8XOb zxal30W0EJWs3p/Ph5LmpgiNVpQA1q+QLmS9DmrAxeShdsvXgZ3e1UQE6oLmv0Y++I12 WAvgVTG+tKk2vYsBOKg/4urUdE+W45PRAmyFSPA4xd6NpQ/jKfLdFLhnF0sdljQ8vckF h3ow== X-Gm-Message-State: AJcUuke3cQYN5nEMthocNdaVfzOJj1v3hzUb3EU2bkjZ/5ndT6CJ+5Gk 5WTOv37Cj+pUR09EyQnn0ElAXs8LumFUlgREYmRIZw== X-Google-Smtp-Source: ALg8bN5EmratIX4Pw5I3ipdrA7N/bl0gWy8+czzVfY8+F23wq+C0DQcHQqaeUtHAO5O/viBJCNL3fRK8E5Kdii0/XMA= X-Received: by 2002:a2e:145a:: with SMTP id 26-v6mr10711875lju.116.1547309437738; Sat, 12 Jan 2019 08:10:37 -0800 (PST) In-Reply-To: <4191547274729@myt1-8f46c049cd43.qloud-c.yandex.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:119111 Archived-At: On Sat, Jan 12, 2019 at 1:32 AM wrote: > > Have you tried (info "(elisp) Sentinels")? The info already provides a > nice example, here is another example: > > (set-process-sentinel > (start-process "sleep" "*sleep*" "sleep" "3") > (lambda (_process event) > (when (string= event "finished\n") > (message "TODO Do something")))) > I did not know about Sentinels, and your example is much better than that in the manual :) Thanks for your help!