GNU bug report logs - #52545
29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

Previous Next

Package: org-mode;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Thu, 16 Dec 2021 10:36:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: "Berry, Charles" <ccberry <at> health.ucsd.edu>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: "52545 <at> debbugs.gnu.org" <52545 <at> debbugs.gnu.org>, Kyle Meyer <kyle <at> kyleam.com>, Rudolf Adamkovič <salutis <at> me.com>
Subject: bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks
Date: Fri, 24 Dec 2021 19:52:38 +0000

> On Dec 23, 2021, at 8:09 PM, Ihor Radchenko <yantar92 <at> gmail.com> wrote:
> 
> Rudolf Adamkovič <salutis <at> me.com> writes:
> 
>>> So, Org cannot distinguish between language backends that are simply
>>> not loaded and the ones that do not define org-babel-execute:lang.
>> 
>> Oh, if we have this architectural limitation in place, then Org cannot
>> help the user, and every user will have "explain" to Org that executing
>> BibTeX makes no sense.  I guess we can then close this bug then!
> 
> Not necessarily close. As I proposed above, one way is adding a user
> customisation. And we do not have to force the users adding trivial
> things like bibtex. Bibtex may be one of the defaults.

Honestly, I think there is no problem here to solve. 

If there is a use case that you think I didn't cover below, please provide an ECM and directions for triggering the unwanted behavior.

Details:

---

Exports do not eval blocks for which there is no org-babel-execute:<lang>.

So, `C-c C-e l L' (and so on) will *not eval* bibtex src blocks.

The problem cited here *only* exists for execution using org-babel-execute-buffer or similar functions.

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.

So the user needs to add just one-line per language to set this up.

Following (info "(org) Property Syntax") the user can set this behavior for all Org files by customize-ing `org-global-properties', whose docstring gives plentiful details.

---



HTH,
Chuck


This bug report was last modified 3 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.