Questions tagged [async]

The tag has no usage guidance.

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
424 views

How can I wrap org-preview-latex-fragment to be async?

Calling org-preview-latex-fragment blocks user input for a second or two depending on the size of your fragment, and with universal args, converting all fragments in buffer can take minutes. It would ...
sooheon's user avatar
  • 481
5 votes
0 answers
201 views

Is there some way to continue reading from a STDIN file descriptor when data is PIPED to Emacs on Command-line?

Historical Perspective On Unix like operating systems, it is common practice to redirect IO between shell commands using pipes. For example, the command below would insert all the lines that didn't ...
Melioratus's user avatar
  • 4,564
3 votes
0 answers
125 views

Org async export show pdf after completion

With synchronous export I can call C-c C-e l o to generate a pdf and open it. If I try the same keys with the async export, i.e. C-c C-e C-a l o, then the pdf will be generated but the pdf won't open. ...
Daniel's user avatar
  • 3,593
2 votes
0 answers
34 views

Debugging for Elisp threads?

Let's say some package does (make-thread (lambda () (message "Started thread.") (error "Fit happens.") (message "Finished thread."))) Regardless of M-x ...
kdb's user avatar
  • 1,561
2 votes
0 answers
70 views

How to avoid losing focus after starting an asynchronous process?

The lisp function start-process is meant to start an asynchronous subprocess, namely a process running independently of Emacs itself. I have noticed that, under my GNOME desktop environment, when my ...
Ruy's user avatar
  • 839
2 votes
1 answer
288 views

How can I automatically rename buffers created with `async-shell-command` to the shell command that was called?

I am often opening exwm buffers by running async-shell-command but unfortunately these buffers always get named *EXWM*. It would be great if when I ran async-shell-command 'firefox the buffer that ...
Nicholas Hubbard's user avatar
2 votes
0 answers
133 views

Process sentinels don't run during init in GUI Emacs

Ok, this issue I'm running into seems pretty weird. I'm running an async process during init and I have set a process sentinel to tell me when it exits. This works fine in terminal Emacs but in GUI ...
PythonNut's user avatar
  • 10.3k
2 votes
0 answers
226 views

How to debug hanging emacs-async command?

I'm trying to set up a function running on my timer to refresh my org-gcal files by using the emacs-async library as follows: (async-get (async-start `(lambda () ,(async-inject-variables "...
telotortium's user avatar
1 vote
0 answers
35 views

Insert output of slow external process in current buffer, character-by-character

Imagine in the current buffer I have the text: Hello Bye I want to call an external program and add the output of it at the end of the buffer. The tricky thing is that the external program provides ...
scaramouche's user avatar
  • 1,772
1 vote
0 answers
61 views

How can I execute synchronously a xdotool process in an Elisp function?

I want to perform a repetitive task using Emacs and another program (which, unfortunately, runs under X). I have then set up an elisp function and a xdotool script to do the two parts of the work. The ...
Alessandro Bertulli's user avatar
1 vote
0 answers
67 views

Exporting JPG image from LaTeX SRC-block with :async header

I like to generate JPG images from my LaTeX/tikz drawings in my org files. For this, I use constructs like #+NAME: my image #+HEADER: :file my-image.jpg #+BEGIN_SRC latex :results file raw :...
vdegner's user avatar
  • 25
1 vote
0 answers
119 views

Using diff-buffer-with-file to merge differences between the disk and the buffer

I sync my org files via Dropbox. Occasionally, Dropbox will bring in changes into a file whose buffer I've already modified. I can diff the buffer and the file on disk with diff-buffer-with-file; but ...
EightyEight's user avatar
1 vote
2 answers
484 views

How to prevent a function being called multiple times? (locking)

With a function that calls an asynchronous process, it's possible to call the same function multiple times. What is a reliable way to avoid this that properly handles quit and errors being raised? ...
ideasman42's user avatar
  • 8,546
1 vote
0 answers
315 views

asynchronously running org-toggle-latex-fragment

In orgmode, it is quite useful to view the equations inline. However, sometimes this can take a while to execute. Running org-toggle-latex-fragment asynchronously would be quite useful. However, most ...
Quarky Quanta's user avatar
1 vote
0 answers
139 views

How to make dired-do-async-shell-command wait for all sub processes to finish

I'm trying to run the bash script, ~/bin/xlda, ... #!/bin/sh # ~/bin/xlda old_filename="$1" new_filename=`echo $old_filename | sed 's/\(.*\.\)flac/\1m4a/'` ~/bin/xld -f alac -o "$new_filename" "$...
Donavan Costaras's user avatar
0 votes
1 answer
77 views

#+BIND and org-mode asynchronous exporting document

Let's say I have the following org-file: #+TITLE: Presentation title #+BIND: org-beamer-outline-frame-title "My own title" #+LATEX_CLASS: beamer * Section 1 ** Slide 1 When I export this ...
martinoidar's user avatar
0 votes
0 answers
29 views

Move mail in the background with gnus?

I switched from webmail to gnus with imap to be more efficient when going through emails. (I feel like I'm going back 5 years). 15 minutes in (after the annoying set up) and it feels great and ...
Att Righ's user avatar
  • 745
0 votes
0 answers
19 views

Change buffer before async call returns its result

I have the following function that creates a new buffer and calls a compilation watcher asynchronously in it. This means that every time I save the file I'm working on the watcher will compile it and ...
Lhooq's user avatar
  • 230
0 votes
0 answers
23 views

Emacs continuously asking for input and not sure what is the cause

I have this function implemented to basically compile and run the cpp file I am writing. Some files needs input (cin) so running this function will not stop and would continuously showing this message:...
SFbay007's user avatar
  • 554
0 votes
1 answer
138 views

Best way to test output sent to a buffer

I'm writing an emacs package for Pipenv and the spike solution uses sync shell calls, which is not desirable for general usage. I'm now changing calls to be async (make-process) and for output to go ...
pwalsh's user avatar
  • 245