From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id t6R6Okmai2DD8QAAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 07:48:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qC0YNUmai2DzdgAAbx9fmQ (envelope-from ) for ; Fri, 30 Apr 2021 05:48:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5BD1B1B6A6 for ; Fri, 30 Apr 2021 07:48:57 +0200 (CEST) Received: from localhost ([::1]:50982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcM1I-0005CM-4s for larch@yhetil.org; Fri, 30 Apr 2021 01:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcM0g-0005BK-N7 for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 01:48:18 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:38816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcM0f-0002Nu-5i for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 01:48:18 -0400 Received: by mail-pf1-x42f.google.com with SMTP id j6so8356502pfh.5 for ; Thu, 29 Apr 2021 22:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=OZFbSr95nK4DkJlrjgmDt+i/WYzfnbAQqmnO+L5RTiU=; b=OtLu3jBlBBOcSdIb182hgZlOPNPyoRcG4lks4OmYQK2D9YVuu268hxkAAY640+YtBJ BdUYrQa6xPhxe2lcmmy34C8RUTAkzQ0iEH8s92NfWeplV1BsHceT7val4A1JcT60c2GB vPPLbpCFfxjJbxNgtrOYYdflvnTcO7L8VqQA8RAwKu72oD6JJmsEsruvOiUAqKTfMMZa Vo46nigir/hug4JM4bhA6Iye8G0+sIMsq1o/F34pVFqP+/uD4+DCcVBNBQD5tnBjm3hu w/YFnibYwur55BGw2MSlv4DPOGt4eiwT3zJWBUDT8ArpXekzm4gbgjHmEbAO2nZyoOdG YG1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=OZFbSr95nK4DkJlrjgmDt+i/WYzfnbAQqmnO+L5RTiU=; b=V/sb8KVReezKdkbQ99VL+vFnkAydhO7CKuvjepmkiX6wE++czTFaVtKEGdLJJhyMlE uBpzfUeYMPJfqv6asrqooT2/YoMOPPRqloKKcx/1Uw0n5BIA+O14LmidqrMF2nb8rzJO aG7/NIjrpYMN+CzZrW/vO4vVkeobmTzUhM1iq1+31r+gl2aNT5UMpbZUxsE8kgrgcdb/ 5tVpSpExEfZTZt+taE64h3vvhBJ9LceGwX3pTAfJ/rLlCofCaDt+MnWy2f5tnkZi8Tof T8OyQrl64WefHFTpVcsMoqdazGrb0FkUZaxsCYU56byOWEWT+0a558tpG2fCRQB31tks 6+HQ== X-Gm-Message-State: AOAM533KzJiWsSMF+GisQaJLiU3scesE9PUif9FjX8cJnmgOFH+0+tEC RAx6bgodoahRsjcPfEufc5J3SFVIqC0= X-Google-Smtp-Source: ABdhPJxRssY66UTNj/Va8CN+1Zd8NOJ1jd6g1rHEmqFrUl8DovJMNH8QeUff7JS3icFa2MULHk69HA== X-Received: by 2002:a05:6a00:b4b:b029:276:6388:a3ac with SMTP id p11-20020a056a000b4bb02902766388a3acmr3201288pfo.80.1619761695238; Thu, 29 Apr 2021 22:48:15 -0700 (PDT) Received: from tim-desktop (203-206-8-119.dyn.iinet.net.au. [203.206.8.119]) by smtp.gmail.com with ESMTPSA id w3sm9124524pjg.7.2021.04.29.22.48.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 22:48:14 -0700 (PDT) References: User-agent: mu4e 1.5.12; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: async export and then do something with file Date: Fri, 30 Apr 2021 15:36:49 +1000 In-reply-to: Message-ID: <87bl9wiaqs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619761737; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OZFbSr95nK4DkJlrjgmDt+i/WYzfnbAQqmnO+L5RTiU=; b=BDCxapq/frf8l0AAzZR7SdM8pnpSrHCRzcA7NM97JJJfpd38dB8iZGXcXYE0q9cSqirBON wj+4zgohMvSIuKG2AUpFO9hp7Lz1F70snLvYv7x7J8k4oj29w4eBxF1bp433ug2PT3kyjt uzJwd/Rk6zwy/SLyQsKjX4jE1aXQN2r7w39wwtXRUYutiubFWpOH//DsYbxXxtZz83oOqv l68ebu5p/Vx8G28SUJ8d0Qeqj09g2dXHy5R06d4KpwyxTKxjLlBC7xanvdK/VeeKFNh0RM 8sLxY4aRkT0Ru+gvuW7OEbkbRP6oS1HOeZClIfE3N/8hcuje1TyyI55xRCp0nA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619761737; a=rsa-sha256; cv=none; b=fyzF6ugaCfQDHD0Jap95qqxzZb1inzIUEkXGtEJdBqS3x9wCOWILl1nik9paSst4mTb8vF qqMqiCZJ9u+IDK0sQO/PWc47nkXRy8SQONVmtD7rPyPmikCa2Jm3srbFYj9doWHOtwhu9B 4FuoHkoEkAIzee3WzXrnQ48+f5CbvCrF8aeqs9+aPOoyjOametEOUtcp5CdITbFyl6y2Un wPOuoeyc8LmQXie3f39Bo1YIHQYzhOA2IObAy8rFfCFwL62KL3t3YOkZbGKkMogTYCPBPg /iewulZOxhEIWGUeGsY2ZpYVeOAyziuSj5v5uVz2fM6+UUmjIaaogCkjotJQDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=OtLu3jBl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=OtLu3jBl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 5BD1B1B6A6 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: dO2v+5LOl63N Matt Price writes: > Hi everyone, > > I am wondering if I can perform and export asynchronously and then, without tying up emacs, wait around for the export to finish and then perform > some other task, like upload the file to a server. Has anyone tried this before? I think perhaps the easiest thing to do would be to use async.el or > some similar third-party, but I can't tell what the preferred method is. I would love osme guidance! > The asynchronous export should be possible and I've seen some proposed patches for this discussed recently. The challenge is your second part. In other languages, you could use something like a 'future' (Clojure) or a Promise (Javascript), but I'm not 100% sure with Elisp. I suspect you would need to create the async process and use the :sentinal option to pass in a process sentinal function, which is essentially a function that will run whenever the status of a process changes. The sentinal would need to watch for a status change which indicates the process has finished and then call whatever your post-export actions are. HTH Tim -- Tim Cross