0

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:

#+BEGIN_SRC sh
  readonly EC_SUCCESS=0
  readonly EC_GENERIC=100
  readonly EC_PROGRAM_NOT_INSTALLED=101
  readonly EC_CANCEL_BUTTON_PRESSED=102
  readonly EC_NOT_YET_IMPLEMENTED=103
#+END_SRC

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?

  • Do you have include :tangle yes either as the source block header arguments or set in org-babel-default-header-args? – Aquaactress Nov 3 at 12:24
  • @Aquaactress there's :tangle "start-lcs.sh" in the #+PROPERTY section of the header. – Acciaierie Stahlberg Nov 3 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 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 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.