emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ruijie Yu via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: stardiviner <numbchild@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Need Help] Error to evaluate "mpv" command in inline src block
Date: Sun, 30 Apr 2023 12:46:20 +0800	[thread overview]
Message-ID: <sdvfs8ij7r8.fsf@netyu.xyz> (raw)
In-Reply-To: <CAL1eYuJntGbXY6A794qM7PTbXH3DiU1aF6OayS7CLf3kOBsbig@mail.gmail.com>


stardiviner <numbchild@gmail.com> writes:

> I have example Org file like bellowing.
>
> Here is the testing Org content:
>
> #+begin_src org
> ,* 《枕刀歌》
> :PROPERTIES:
> :DATE:     [2021-05-13 Thu 20:09]
> :Douban:   https://movie.douban.com/subject/35350794/
> :DIR:      枕刀歌
> :EVAL:     src_sh{mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"}
> :END:
> #+end_src
>
> When I press Tab key to expand upper headline. I check the inline src block session buffer, here is the output:
>
> #+begin_example
> bash-5.2$ bash-5.2$ PROMPT_COMMAND=;PS1="org_babel_sh_prompt> ";PS2=
> org_babel_sh_prompt> echo 'ob_comint_async_shell_start_d1cc7563-be0c-4ed0-a4c2-d1b545333983'
> mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"
> echo 'ob_comint_async_shell_end_d1cc7563-be0c-4ed0-a4c2-d1b545333983'
> ob_comint_async_shell_start_d1cc7563-be0c-4ed0-a4c2-d1b545333983
> org_babel_sh_prompt> =[input] No key binding found for key 'c'.
> [input] No key binding found for key 'h'.
> [input] No key binding found for key '''.
> [input] No key binding found for key 'b'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key 'n'.
> [input] No key binding found for key 'a'.
> [input] No key binding found for key 'y'.
> [input] No key binding found for key 'n'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key 'h'.
> [input] No key binding found for key 'n'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key '-'.
> [input] No key binding found for key 'b'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key '-'.
> [input] No key binding found for key '-'.
> [input] No key binding found for key 'a'.
> [input] No key binding found for key 'c'.
> [input] No key binding found for key '-'.
> [input] No key binding found for key 'b'.
> [input] No key binding found for key '''.
>
> Resuming playback. This behavior can be disabled with --no-resume-playback.
>
>      Video --vid=1 (*) (h264 1920x1080 25.000fps)
>  (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
> AO: [coreaudio] 48000Hz stereo 2ch floatp
> Mute: yes
>
>   C-c C-c>
> Saving state.
>
> Exiting... (Quit)
> org_babel_sh_prompt> echo $SHELL 
> /bin/zsh
> org_babel_sh_prompt> 
> #+end_example
>
> Then I try to replace the "mpv" shell command with another command without need to invoke desktop GUI. Like bellowing Org content:
>
> #+begin_src org
> ,* 《枕刀歌》
> :PROPERTIES:
> :DATE:     [2021-05-13 Thu 20:09]
> :Douban:   https://movie.douban.com/subject/35350794/
> :DIR:      枕刀歌
> :EVAL:     src_sh{sleep 10; echo "done"}
> :END:
> #+end_src
>
> It evaluated fine.

Try putting "cat" there.  I suspect something is fed into the stdin of
the process.

-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- still investigating.]


  reply	other threads:[~2023-04-30  4:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30  4:27 [Need Help] Error to evaluate "mpv" command in inline src block stardiviner
2023-04-30  4:46 ` Ruijie Yu via General discussions about Org-mode. [this message]
2023-04-30 10:59   ` Christopher M. Miles
2023-04-30 14:52 ` Ihor Radchenko
2023-05-01  3:39   ` Christopher M. Miles
2023-05-01  7:45     ` Ihor Radchenko
2023-05-01 10:46       ` Christopher M. Miles
2023-05-01 11:39         ` ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively (was: [Need Help] Error to evaluate "mpv" command in inline src block) Ihor Radchenko
2023-05-01 12:50           ` ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively Christopher M. Miles
2023-05-01 13:14             ` Ihor Radchenko
2023-05-01 13:41               ` Christopher M. Miles
2023-05-01 14:20                 ` Ihor Radchenko
2023-05-01 19:06                   ` Christopher M. Miles
2023-05-01 13:08           ` [SOLUTION] a temporary workaround solution using another language like "python" Christopher M. Miles
     [not found]           ` <35881.2693202466$1682946783@news.gmane.org>
2023-05-01 13:35             ` Max Nikulin
2023-05-01 19:01               ` Christopher M. Miles
2023-05-01 19:16                 ` Ihor Radchenko
2023-05-02  4:17                   ` [CLOSED] [ANSWER] " Christopher M. Miles
2023-05-02 20:31           ` ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively (was: [Need Help] Error to evaluate "mpv" command in inline src block) Matt
2023-05-03 10:41             ` Ihor Radchenko
2023-05-03 11:01               ` ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively Christopher M. Miles
2023-05-03 12:01                 ` Ihor Radchenko
2023-05-03 16:31                   ` Christopher M. Miles
2023-05-01 10:50       ` [Need Help] Error to evaluate "mpv" command in inline src block Christopher M. Miles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sdvfs8ij7r8.fsf@netyu.xyz \
    --to=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).