[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code b
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)] |
Date: |
Sat, 16 Mar 2024 11:48:12 +0000 |
Damien Cassou <damien@cassou.me> writes:
> If I understand correctly, you are saying that it is better to let the
> command crash as soon as possible instead of letting it execute
> potentially problematic code because some previous block has not been
> executed. I think it makes perfect sense. I'm now convinced that my
> patch is not desirable. Feel free to close the issue.
Yup, you understand correctly.
Although, we previously discussed a similar issue with bibtex
blocks in https://list.orgmode.org/87ilvnx29d.fsf@kyleam.com/, but the
proposed approach to solve the issue was different.
> Just because I didn't know it exists. Thank you for telling me. I have
> now added it to all my code blocks generating non-executable results
> using the :wrap keyword like this:
>
> #+name: show-tree
> #+begin_src sh :exports both :results output drawer :tangle yes :wrap
> "SRC text :eval no"
> echo foo
> #+end_src
>
> #+RESULTS: show-tree
> #+begin_SRC text :eval no
> foo
> #+end_SRC
>
> It works very well, thanks! Would you say this is how you would have
> done it as well or is there a better way?
Yes. You can add
#+property: header-args:text :eval no
on top of your Org file or add
(setq org-babel-default-header-args:text '((:eval . "no")))
to your config.
See https://orgmode.org/manual/Using-Header-Arguments.html
--
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>
- [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Damien Cassou, 2024/03/09
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Ihor Radchenko, 2024/03/12
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Damien Cassou, 2024/03/12
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Ihor Radchenko, 2024/03/12
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Damien Cassou, 2024/03/16
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)],
Ihor Radchenko <=
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Damien Cassou, 2024/03/16
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Gerard Vermeulen, 2024/03/17
- Re: [BUG] [PATCH] org-babel-execute-buffer: Prevent executing non-code blocks [9.6.20 ( @ /home/cassou/.emacs.d/lib/org/lisp/)], Ihor Radchenko, 2024/03/17