My scenario

  • python code creating a wav file
  • last line of code returns the written file name
  • org-mode src block with the option :results file

The result block correctly links to the audio file, and I can easily click it and play it.

My question is if it would be possible to add a hook, and if the resulted file has a .wav extension to automatically launch it (and will be opened by the OS default audio player)

Or could be more generic: if you can have a hook like org-babel-after-execute-hook but having access to the result if it's a file or not, the filename, or the contents etc..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.