Hi Eric, would it be possible, when tangling, to leave lines without source code in the resulting code file as empty lines? The reasoning would be that error messages (at least in R) give the line in which the error occurred. If the line numbers in which the code sits would be preserved (by leaving empty lines where no code is in the .org file), debugging would be much easier. By the way: I am using the after tangle hook and it works absolutely perfectly. Thanks and cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax: +27 - (0)86 516 2782 Fax: +49 - (0)321 2125 2244 email: Rainer@krugs.de Skype: RMkrug Google: R.M.Krug@gmail.com