I'm writing a bash script with literate org-mode.

The header of the file is:

#+TITLE: start-lcs
#+AUTHOR: Stahlberg
#+EMAIL: stahl at gmail dot com
#+DATE: 2019-11-02
#+PROPERTY: header-args:sh :tangle "start-lcs.sh" :shebang "#!/bin/bash" :padline no :tangle-mode (identity #o755)
#+OPTIONS: author:t date:t email:t H:3 num:nil toc:t ^:{}

There are 50 blocks of code, one of them is:

  readonly EC_SUCCESS=0
  readonly EC_GENERIC=100

The file ends this way:

# @ Local variables:
# @ org-src-preserve-indentation: t
# @ End:

How come that when I tangle the file (C-c C-v t) Org-mode returns Tangled 0 code blocks from start-lcs.org?

  • 1
    Do you have include :tangle yes either as the source block header arguments or set in org-babel-default-header-args? – Aquaactress Nov 3 '19 at 12:24
  • @Aquaactress there's :tangle "start-lcs.sh" in the #+PROPERTY section of the header. – Acciaierie Stahlberg Nov 3 '19 at 13:01
  • I copied your text to a file and tried it. I couldn't get it to work unless I used org-babel-default-header-args. Not sure why this is. The manual seems to indicate that this is possible but it doesn't seem to be reading the #+PROPERTY section. – Aquaactress Nov 3 '19 at 13:31
  • Solved! It was a single wrong keybinding in .emacs.d/init.el (not C-c C-v t nor one of Org-mode) that bugged all the Emacs configuration. Once corrected that keybinding Org-mode has begun to work as expected. – Acciaierie Stahlberg Nov 3 '19 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.