Skip to main content

Questions tagged [async]

Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

(Running Emacs as a daemon and using emacsclient) I have a cron job that regularly creates an ICS file for an ORG file using (progn (find-file "myfile.org") (org-icalendar-export-to-ics t)) ...
Robert's user avatar
  • 125
0 votes
0 answers
82 views

I'm writing a package that makes remote calls for certain low-level emacs operations (think Tramp). I'm using a custom protocol between emacs and the remote system, and open-network-stream with a ...
marcantonio's user avatar
0 votes
1 answer
80 views

I'm trying to use shell asynchronously with named sessions, but it doesn't work: #+begin_src sh echo "a" #+end_src #+RESULTS: : a #+begin_src sh :async echo "a" #+end_src #+...
vslavkin's user avatar
1 vote
1 answer
414 views

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
1 answer
94 views

I'm trying to run a hook that should start after buffers are loaded - it hooks into ein package that starts an "ipython server" that takes some time to start and it seems that the subsequent ...
Daniel Krajnik's user avatar
3 votes
1 answer
279 views

in my library, i have completion backends that i add to completion-at-point-functions as per the docs, but my completion candidates are fetched from a server with an http request. the call is very ...
martian's user avatar
  • 608
1 vote
0 answers
49 views

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,796
1 vote
0 answers
126 views

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
1 answer
321 views

I'm using the org-pomodoro, and I have added a function to the org-pomodoro-started-hook that prompts the user for a reminder for what they should do during the break. However, I don't want to call ...
telotortium's user avatar
2 votes
0 answers
56 views

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,591
2 votes
0 answers
113 views

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
  • 859
2 votes
1 answer
304 views

I have a lot of org files in emacs 27.1 so when I do an agenda listing for the week it takes about 20seconds. Is there a nice way to do this in the background? I've put together the following function ...
map7's user avatar
  • 553
1 vote
1 answer
382 views

I am writing a lisp program to be run as a batch file through emacs. The program calls an external application which is supposed to stay running after the call to emacs finishes. The two basic ways ...
Ruy's user avatar
  • 859
1 vote
1 answer
455 views

I'm trying to make use of the fzf fuzzy finder to search through a list via a term process. The way I do this is very similar to fuzzy-finder.el or fzf.el. This is by launching fzf with: (progn (...
MHilton's user avatar
  • 131
1 vote
2 answers
139 views

I use notmuch to read emails. I've configured notmuch to call offlineimap via pre-new hook. When I press G to refresh my notmuch buffer, I want emacs to open my offlineimap log file in another window ...
SparedWhisle's user avatar
2 votes
1 answer
438 views

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
155 views

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.5k
2 votes
0 answers
102 views

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
  • 35
3 votes
1 answer
199 views

While I develop some Emacs-Lisp code, I often test it in the *scratch* buffer, just to make sure that what I just wrote behaves like I believe it does. But sometimes evaluating an expression takes ...
phs's user avatar
  • 1,259
1 vote
0 answers
178 views

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
5 votes
2 answers
3k views

I want to use async-shell-command to run a .bat file on Windows. Reading the function documentation it says: (defun async-shell-command (command &optional output-buffer error-buffer) "Execute ...
nephewtom's user avatar
  • 2,401
1 vote
2 answers
586 views

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
  • 9,513
0 votes
0 answers
26 views

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
  • 594
1 vote
0 answers
394 views

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
0 votes
1 answer
104 views

I have a situation in a mode I'm writing that saves a portion of the output of a long-running asynchronous process to a variable at intermittent intervals. I need to access this data periodically. My ...
AndrewE's user avatar
  • 80
2 votes
0 answers
120 views

I am trying to build a function, that takes a body of text from a buffer or a file, and "simulates typing" in another buffer. This will serve me towards recording programming videos where the code ...
Martin Mariano's user avatar
0 votes
1 answer
182 views

Emacs 27.0.50. Windows 10. This function works finely when the line is commented: (defun Pfedj/write-async-file () (interactive) (async-start (lambda () (setq path "~/org/file....
Pfedj's user avatar
  • 358
2 votes
2 answers
1k views

I've repurposed some code to show me a list of packages that I have installed which have upgrades available. Currently I'm running package-refresh-contents when I start-up Emacs and then display the ...
alecvn's user avatar
  • 439
0 votes
1 answer
202 views

I am trying to copy files from one directory on a remote computer to another directory on the same remote computer. Using Dired I can open up the two directories, mark the files I want to copy and ...
user27815's user avatar
  • 249
1 vote
2 answers
784 views

I found the following code in TRAMP: (defun tramp-adb-handle-shell-command (command &optional output-buffer error-buffer) "Like `shell-command' for Tramp files." (let* ((asynchronous (...
Alexander Shukaev's user avatar
-1 votes
1 answer
190 views

I would like to asynchronously run code blocks in org mode. My org mode version (org-version output) is: Org mode version 9.2.1 (9.2.1-23-g126a37-elpa @ /home/user/.emacs.d/elpa/org-9.2.2/) I ...
Zelphir Kaltstahl's user avatar
5 votes
1 answer
1k views

I'm running this emacs GNU Emacs 25.2.2 (x86_64-pc-linux-gnu) of 2017-09-22, modified by Debian directly in a Gnome terminal by calling emacs, which is actually a link to /etc/alternatives/emacs. ...
Craig  Hicks's user avatar
0 votes
1 answer
213 views

I have this snippet of code: (async-shell-command (concat "perl myscript.pl " (buffer-name)) (read-string "RETURN: ") (with-temp-file "file.new" (insert-file-contents "file.new") (perform-...
Gabriele's user avatar
  • 1,720
8 votes
1 answer
4k views

I want to run some Elisp when my command executed by async-shell-command terminates. How can I do this? Does it have completion hooks?
Matthew Piziak's user avatar
4 votes
1 answer
736 views

When I give a new async command with an interactively called async-shell-command, it gives a message "A command is running in the default buffer. Use a new buffer? (y or n)". I think this behaviour ...
mangelmentmanager's user avatar
3 votes
0 answers
136 views

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,743
5 votes
1 answer
605 views

I have a problem which is very similar to this one. I have some text that I'd like to listen to with macOS's say utility. Unfortunately, Emacs locks up when I use shell-command-on-region because it is ...
GDP2's user avatar
  • 1,380
1 vote
1 answer
316 views

I learnt about asynchronous execution of org babel shell code blocks, thanks to: How is #+BEGIN_SRC sh :results drawer different to #+BEGIN_SRC sh I want to know if it's possible to tail/stream the ...
american-ninja-warrior's user avatar
1 vote
1 answer
167 views

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
  • 255
1 vote
1 answer
619 views

If I locally call async-shell-command it takes the shell from shell-file-name (/bin/bash). However if I use su or ssh via tramp to invoke a shell command remotely it always runs as /bin/sh. The ...
Phil's user avatar
  • 545
2 votes
0 answers
269 views

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
1 answer
859 views

I have installed the Rust programming language (Debian). Now i can compile and run programs from terminal (with the cargo build and cargo run commands), but not from inside emacs. The cargo compiler ...
user avatar
0 votes
1 answer
136 views

Given code such as (defun some-code () (url-retrieve my-url #'my-callback) (setq *a-global-var* (some-func *a-global-var*)) ...) (defun my-callback (status &rest args) (setq *a-global-...
khinsen's user avatar
  • 103
1 vote
1 answer
120 views

I'm starting a process with start-process and immediately calling set-process-sentinel to get notifications when it ends. After attaching the sentinel I send the buffer's contents to the process's ...
abingham's user avatar
  • 927
1 vote
1 answer
401 views

If I am copying files using dired having previously called (dired-async-mode) to make it copy asynchronously, how do I know when it has successfully finished copying the files?
Alex's user avatar
  • 1,058
5 votes
0 answers
257 views

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,898
1 vote
1 answer
866 views

I use this function for tangling my init.el file (defun tangle-init () "If the current buffer is 'init.org' the code-blocks are tangled, and the tangled file is compiled." (when (equal (...
djangoliv's user avatar
  • 3,334
0 votes
2 answers
287 views

I have alias msexcel (w32-browser "C:/program files/microsoft office/office12/excel.exe") and this means I can do msexcel from eshell and an asynchronous MS Excel will begin to run. I am looking for ...
vpit3833's user avatar
  • 111
6 votes
0 answers
450 views

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
  • 491
1 vote
1 answer
171 views

I want to run several programs one after another and display their output in a single buffer. I can do this by calling call-process multiple times: (call-process "cmd1" nil "*out*" t) (call-process "...
kostya's user avatar
  • 523