"Christopher M. Miles" <numbch...@gmail.com> writes: >> So, it looks to me like mpv is somehow trying to interpret "echo" commands >> the >> ob-shell is sending after "mpv ...." is executed: > ... > Don't know ob-shell which part did your said "echo" commands. I don't > know where to dig this issue. Hope you can help. Thanks for your > reproducing problem and dive in.
The underlying issue lies within how comint works + the fact that mpv reads key input from terminal. Try the following: 1. emacs -Q 2. M-x shell 3. cd /path/to/your/video <RET> 4. Copy the following into kill ring ----- mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4" m_ ----- 5. (in the shell buffer): C-y <RET> 6. Observe mpv playing no sound and video 7. Press m_ to restore video and sound. I am not sure if we can do much about this though. We run async shell commands in sessions using (insert (format ob-shell-async-indicator "start" uuid)) (comint-send-input nil t) (insert (org-trim body)) (comint-send-input nil t) (insert (format ob-shell-async-indicator "end" uuid)) (comint-send-input nil t) which sends "echo '....' <your command> echo '...'" to comint terminal session. The last echo '...' in this case is interpreted as key input by mpv - symbol by symbol. The only way I know how to work around this is a giant one-liner like echo '....'; <your command>; echo '...' However, (1) ";" may not work in some shells; (2) <your command> may contain multiple lines, leading to the same issue. Matt, maybe you have some ideas about this edge case? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>