I am planning to (re)organize my ahk code as code blocks into an org file and tangle this file to obtain the source file.
This is my ahk-guivho.org
input file, with two code blocks, empty for the sake of this post:
#+TITLE: AHK config file
+AUTHOR: Guido Van Hoecke
+EMAIL: (concat "guivho" at-sign "gmail.com")
#+PROPERTY: header-args :tangle ahk-guivho.ahk
#+PROPERTY: header-args+ :padline yes
#+PROPERTY: header-args+ :eval never
#+PROPERTY: header-args+ :eval no
#+PROPERTY: header-args+ :exports code
* HideWindow - hides the active window
#+BEGIN_SRC ahk
HideWindow(title="", x=0, y=0) { ;hides the active window
}
#+END_SRC
* ActivateWindow
#+BEGIN_SRC ahk
ActivateWindow(title="") {
}
#+END_SRC
I expect org-babel-tangle
to produce a file called ahk-guivho.ahk
with two empty subs (HideWindow and ActivateWindow) but it does not.
It simply complains: Tangled 0 code blocks from ahk-guivho.org
I am pretty sure that my org and babel setup is ok: I tangle my .emacs
from an org file without any problems.
I do realize that ahk is not among the officially supported languages.
But when I edit a code block from the org file, I get a buffer with ahk-mode
as expected.
Do I need to initialize something somewhere to be able to tangle ahk code from an org file?
#+BEGIN_SRC ahk :tangle ahk-guivho.ahk
Doing that for both blocks will append as you expect. The tangle path can also be set at the file level#+PROPERTY:
lines, he did not refresh the buffer withC-c C-c
on at least one of them. I suspect that if he reverts the buffer from the file, everything should work. As a minor point, the#+AUTHOR:
and#+EMAIL:
lines are missing the initial#
but that should not affect the tangling at all (and after the#
is added, the buffer needs to be refreshed again withC-c C-c
on one of those lines, or the buffer reverted, or saved and killed and the file reopened).