emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src


From: Berry, Charles
Subject: bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks
Date: Wed, 29 Dec 2021 17:47:10 +0000

Max,

> On Dec 29, 2021, at 4:53 AM, Max Nikulin <manikulin@gmail.com> wrote:
> 
> On 25/12/2021 02:52, Berry, Charles wrote:
>> For that case, setting buffer or heading properties, such as:
>> #+begin_src org
>>   :PROPERTIES:
>>   :header-args: :eval yes :exports results
>>   :header-args:bibtex: :eval no
>>   :END:
>> #+end_src
>> resolves the issue.
> 
> Chuck, is it expected that the following form to specify properties 
> suppresses of evaluation during export but allows execution during processing 
> of `org-babel-execute-buffer'? I am puzzled that behavior for property drawer 
> is different.
> 

It isn't different when you have `:header-args:elisp: :eval no' in the drawer.

I get the message `Evaluation of this elisp code block is disabled.' either way.

Caveat: I am running release_9.5.1-233-ged5335.

But a couple of things:

1) Be sure to refresh when introducing `#+property' lines. If you paste in a 
property line and then org-babel-execute-src-block, the property will not be 
acknowledged. AFAICS, property drawers do not suffer from this. 

2) Property drawers only affect the heading under which they are placed unless 
placed at the top of the file. And either way, it is an error to insert a blank 
line above a property drawer. org-lint will complain although the message may 
be cryptic.

3) You probably know this, but exports use `org-babel-exp-process-buffer' which 
may perform differently than `org-babel-execute-buffer'. 




> ---- >8 ----
> #+property: header-args :eval yes :exports both
> #+property: header-args:elisp :eval no
> 
> #+begin_src elisp
>  (message "From elisp")
> #+end_src
> ---- 8< ----


HTH,
Chuck





reply via email to

[Prev in Thread] Current Thread [Next in Thread]