The attached patch makes tangling (org-babel-tangle) work in indirect buffers. Previously it would fail before running org-babel-post-tangle-hook because indirect have a buffer-file-name of nil whereas the code was expecting a string in the following fragment: (message "tangled %d code block%s from %s" block-counter (if (= block-counter 1) "" "s") (file-name-nondirectory (buffer-file-name (or (buffer-base-buffer) (current-buffer))))) I hope the patch is in the correct format. Shaun.