this post was submitted on 18 Nov 2023
2 points (100.0% liked)

Emacs

305 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Hey hey.

I use the heck out of tuedachu/ytdl. One thing I would like to improve about it is that when you queue a download with ytdl-download it appears to be a synchronous call and it freezes emacs until youtube-dl/yt-dlp is able to start the actual download.

I've yet to dive into the code to see what synchronous function is being called -- I'm very aware of the "single-threaded" nature of Emacs -- but I use other libraries that are likely shelling and they do not hang like this and so I would like to see if there's a way to I can bring whatever technique they are using over to a PR against tuedachu/ytdl.

Appreciate any advice from the crew here.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 10 months ago

I use dwim shell command for these things (async by default). For example https://github.com/xenodium/dwim-shell-command/blob/e4a139fe181ed1b576302fb36f3761fbf9914580/dwim-shell-commands.el#L83C7-L83C7

Disclosure: authored the package