emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* async export and then do something with file
@ 2021-04-29 22:00 Matt Price
  2021-04-30  5:36 ` Tim Cross
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2021-04-29 22:00 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

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!

Thanks,

Matt

[-- Attachment #2: Type: text/html, Size: 540 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: async export and then do something with file
  2021-04-29 22:00 async export and then do something with file Matt Price
@ 2021-04-30  5:36 ` Tim Cross
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Cross @ 2021-04-30  5:36 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-30  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 22:00 async export and then do something with file Matt Price
2021-04-30  5:36 ` Tim Cross

Code repositories for project(s) associated with this 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 NNTP newsgroup(s).