Slashes inserted into Common Lisp code evaluation results

2023-05-01 Thread Nathan Van Ymeren
Hi all, For my studies I’ve been using org as a superior form of jupyter notebook, and I do my assignments and whatnot using code blocks for computation. My preferred language these days is Common Lisp, using the SBCL implementation. Whereas languages like python default to using IEEE double-

[CLOSED] [ANSWER] Re: a temporary workaround solution using another language like "python"

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I check out ob-screen, it indeed can be used in my situation, thanks for >> suggestion. > > Also, you can try --no-terminal cmd switch for mpv. It will suppress > terminal interaction, AFAIU. Indeed, this option solved the problem r

Re: Suggestion to increase usefulness of TAB key / 'org-cycle' function

2023-05-01 Thread Philipp Kiefer
I see. Thank you for your very helpful reply! On 01.05.2023 20:45, Ihor Radchenko wrote: Philipp Kiefer writes: Do I understand you correctly that you mean tab should cycle visibility in this case? * headline some text CURSOR IS HERE - a list Yes, I suggested that in those cases, org-cycle

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > I'm under macOS system. the result of (getenv "DISPLAY") is > "ssh-askpass". This is weird... I also have (setenv "SSH_ASKPASS" "ssh-askpass-fullscreen") in my config. Maybe you are setting similar things in bashrc or init.el. -- Ihor Radchenko // yantar92, Org

Re: [SOLUTION] a temporary workaround solution using another language like "python"

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > I check out ob-screen, it indeed can be used in my situation, thanks for > suggestion. Also, you can try --no-terminal cmd switch for mpv. It will suppress terminal interaction, AFAIU. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org m

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> The current CPU report indeed not contains heavy org-crypt. Because my >> epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it >> suspend on epa waiting for process to finished. It never ends unless I >> press [C-g] to

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> My first version property "EVAL" inline src block indeed don't using >> :async and :session. It can play video file. >> >> But I found it will block [Tab] org-cycle expand headline. I don't want >> Emacs to be suspended. So I added :a

Re: [SOLUTION] a temporary workaround solution using another language like "python"

2023-05-01 Thread Christopher M. Miles
Max Nikulin writes: > On 01/05/2023 20:08, Christopher M. Miles wrote: >> I use another language "python" to replace "sh" to play video now. It >> successes. >> :EVAL: src_python{import os; video_file = "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"; >> os.system("mpv \"%s\" " %(video_file))} >> It's not as

Re: Suggestion to increase usefulness of TAB key / 'org-cycle' function

2023-05-01 Thread Ihor Radchenko
Philipp Kiefer writes: >> Do I understand you correctly that you mean tab should cycle visibility >> in this case? >> >> * headline >> some text >> CURSOR IS HERE >> - a list > Yes, I suggested that in those cases, org-cycle should fold the subtree > point is in, i. e. fold up to the next parent

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > My first version property "EVAL" inline src block indeed don't using > :async and :session. It can play video file. > > But I found it will block [Tab] org-cycle expand headline. I don't want > Emacs to be suspended. So I added :async change. For my use case, I s

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I might consider to use another language like python instead of sh to >> execute command to play video to get around this issue. I will update >> here if I success. > > All you need to do is getting rid of :async and :session. > Just

Re: [SOLUTION] a temporary workaround solution using another language like "python"

2023-05-01 Thread Max Nikulin
On 01/05/2023 20:08, Christopher M. Miles wrote: I use another language "python" to replace "sh" to play video now. It successes. :EVAL: src_python{import os; video_file = "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"; os.system("mpv \"%s\" " %(video_file))} It's not as convenient as shell command directl

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > The current CPU report indeed not contains heavy org-crypt. Because my > epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it > suspend on epa waiting for process to finished. It never ends unless I > press [C-g] to quit it. Which looks like gpg t

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > > May you elaborate what performance issues you are experiencing? My performance issue is a large Org file about 2M size on saving. I will reproduce and generate profiler report for more detailed data and update i

[SOLUTION] a temporary workaround solution using another language like "python"

2023-05-01 Thread Christopher M. Miles
I use another language "python" to replace "sh" to play video now. It successes. Here is my example: #+begin_src org ,* 《枕刀歌》 :PROPERTIES: :DATE: [2021-05-13 Thu 20:09] :Douban: https://movie.douban.com/subject/35350794/ :DIR: 枕刀歌 :EVAL: src_python{import os; video_file = "枕刀歌/《枕刀

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > I might consider to use another language like python instead of sh to > execute command to play video to get around this issue. I will update > here if I success. All you need to do is getting rid of :async and :session. Just use :results none + "&" at the end of

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" 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 t

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: May you elaborate what performance issues you are experiencing? >>> >>> My performance issue is a large Org file about 2M size on saving. I will >>> reproduce and generate profiler report for more detailed data and update >>> in this thread. >> >> Please save t

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >>> We should certainly not attempt decryption on by default - it may >>> be annoying when you actually do not want to decrypt anything, just >>> look inside. >> >> You're right, I have not consider enough. > > Of course, you can still

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: >> We should certainly not attempt decryption on by default - it may >> be annoying when you actually do not want to decrypt anything, just >> look inside. > > You're right, I have not consider enough. Of course, you can still use `org-cycle-hook' if you want this

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)

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" 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

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> I'm also try to improve this file to improve large Org buffer saving >> performance. > > org-encrypt already caches the encrypted text and takes basically no > time for the repeated encryption, as long the text to be encrypted is >

Re: [PATCH] Fix ob-latex.el command injection vulnerability.

2023-05-01 Thread Ihor Radchenko
Max Nikulin writes: > I just have noticed that it is tracked as a CVE record: > > https://www.cve.org/CVERecord?id=CVE-2023-28617 > https://nvd.nist.gov/vuln/detail/CVE-2023-28617 And we do not need to do anything about it, right? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more

Re: [PATCH] Fix ob-latex.el command injection vulnerability.

2023-05-01 Thread Max Nikulin
On 12/03/2023 18:28, Ihor Radchenko wrote: lux writes: Ok, I'll undo this part of the changes first, and repost patch. From b48784a16c5806694498f072ffdd98e5a3c144b5 Mon Sep 17 00:00:00 2001 From: Xi Lu Date: Sat, 11 Mar 2023 18:53:37 +0800 Subject: [PATCH] * lisp/ob-latex.el: Fix command injec

Re: [Need Help] Error to evaluate "mpv" command in inline src block

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > But I failed to execute mpv command: #+begin_src org Test src_sh{mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"} #+end_src >>> >>> May you elaborate what you mean by "failed"? >> >> The "failed" means the MPV video player wind

Re: [Need Help] Error to evaluate "mpv" command in inline src block

2023-05-01 Thread Christopher M. Miles
Ihor Radchenko writes: > "Christopher M. Miles" writes: > But I failed to execute mpv command: #+begin_src org Test src_sh{mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"} #+end_src >>> >>> May you elaborate what you mean by "failed"? >> >> The "failed" means the MPV video player wind

Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: > I'm also try to improve this file to improve large Org buffer saving > performance. org-encrypt already caches the encrypted text and takes basically no time for the repeated encryption, as long the text to be encrypted is unchanged. > I have some ideas: > > -

Re: [Need Help] Error to evaluate "mpv" command in inline src block

2023-05-01 Thread Ihor Radchenko
"Christopher M. Miles" writes: >>> But I failed to execute mpv command: >>> >>> #+begin_src org >>> Test src_sh{mpv "枕刀歌/《枕刀歌》SE05 江海阔 歌谣哼唱.mp4"} >>> #+end_src >> >> May you elaborate what you mean by "failed"? > > The "failed" means the MPV video player window does not show up, no video, no > a