emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: async export and then do something with file
Date: Fri, 30 Apr 2021 15:36:49 +1000	[thread overview]
Message-ID: <87bl9wiaqs.fsf@gmail.com> (raw)
In-Reply-To: <CAN_Dec8WNx=gNAVWL6403LbBUbnLGYH0MsT82q4M9684YLhvaA@mail.gmail.com>


Matt Price <moptop99@gmail.com> 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


      reply	other threads:[~2021-04-30  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 22:00 async export and then do something with file Matt Price
2021-04-30  5:36 ` Tim Cross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl9wiaqs.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).