From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: [BABEL] BUG - error on tangling - disappears when changing the filename Date: Fri, 27 Sep 2013 14:23:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPX55-0000Je-EH for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:23:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPX4y-0003gO-HP for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:23:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:60875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPX4y-0003g7-5a for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:23:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VPX4w-00049v-6B for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 14:23:26 +0200 Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Sep 2013 14:23:26 +0200 Received: from Rainer by arn78-1-88-186-171-7.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Sep 2013 14:23:26 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Eric Schulte --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi I have a strange error when tangling. I have a large org file with several code blocks tangling in about 20 R files and one bash file. Usually tangling works perfectly, but sometimes one code block does not tangle a code block to a file. These are different blocks. When I change the name of the fiole to be tangled to, it works again. After d=3Dsome time, I can rename it again and it works again. The last time it happened, I was debugging the function. But even when deleting all the content of the code block, the problem persists. This persists over restarts of org. The code block looks as follow: ,---- | *** dispProb2D (./R/dispProd2D.R)=20 | :PROPERTIES: | :tangle: ./R/dispProd2D.R | :comments: yes | :no-expand: TRUE | :END:=20 | #+begin_src R | cat(5) | #+end_src=20=20 `---- In the original version, there is obviously code in it, but the error occurs even in the empty block. I just renamed the block, and it is working again. Any idea what is causing this? Please find the backtrace below. Cheers, Rainer ,---- | ebugger entered--Lisp error: (wrong-type-argument stringp nil) | set-buffer(nil) | (save-current-buffer (set-buffer (get-file-buffer file)) (revert-buffer= t t t)) | org-babel-find-file-noselect-refresh("./R/dispProd2D.R") | (let* ((temp-path file) (visited-p (get-file-buffer temp-path)) temp-re= sult temp-file) (org-babel-find-file-noselect-refresh temp-path) (setq temp= -file (get-file-buffer temp-path)) (save-current-buffer (set-buffer temp-fi= le) (setq temp-result (progn (run-hooks (quote org-babel-post-tangle-hook))= ))) (if visited-p nil (kill-buffer temp-file)) temp-result) | (lambda (file) (let* ((temp-path file) (visited-p (get-file-buffer temp= -path)) temp-result temp-file) (org-babel-find-file-noselect-refresh temp-p= ath) (setq temp-file (get-file-buffer temp-path)) (save-current-buffer (set= -buffer temp-file) (setq temp-result (progn (run-hooks (quote org-babel-pos= t-tangle-hook))))) (if visited-p nil (kill-buffer temp-file)) temp-result))= ("./R/dispProd2D.R") | mapc((lambda (file) (let* ((temp-path file) (visited-p (get-file-buffer= temp-path)) temp-result temp-file) (org-babel-find-file-noselect-refresh t= emp-path) (setq temp-file (get-file-buffer temp-path)) (save-current-buffer= (set-buffer temp-file) (setq temp-result (progn (run-hooks (quote org-babe= l-post-tangle-hook))))) (if visited-p nil (kill-buffer temp-file)) temp-res= ult)) ("postTangleScript.sh" "./.gitignore" "./DESCRIPTION" "./.Rbuildignor= e" "./R/parmsFire.R" "./R/parmsPinus.R" "./R/parmsAcacia.R" "./R/parmsRubus= .R" "./R/parmsBudget.R" "./R/parameter.R" "./R/endYear.R" "./R/germEst.R" "= ./R/seedDispersal.R" "./R/seedProduction.R" "./R/fireAliens.R" "./R/clearAl= iens.R" "./R/prioritisation.R" "./R/beginYear.R" "./R/main.R" "./R/cumulati= veDc.R" "./R/dcToIndLayer.R" "./R/competition.R" "./R/dispProd2D.R" "./R/in= itfun.R" "./R/newInDrak.R" "./R/resetOptions.R" "./R/stats.R" "./R/layerIO.= R" "./R/layerNames.R" "./R/onLoad.R" "./NAMESPACE" "./R/package.R")) | (progn (mapc (function (lambda (file) (let* ((temp-path file) (visited-= p (get-file-buffer temp-path)) temp-result temp-file) (org-babel-find-file-= noselect-refresh temp-path) (setq temp-file (get-file-buffer temp-path)) (s= ave-current-buffer (set-buffer temp-file) (setq temp-result (progn ...))) (= if visited-p nil (kill-buffer temp-file)) temp-result))) (mapcar (function = car) path-collector))) | (if org-babel-post-tangle-hook (progn (mapc (function (lambda (file) (l= et* ((temp-path file) (visited-p ...) temp-result temp-file) (org-babel-fin= d-file-noselect-refresh temp-path) (setq temp-file (get-file-buffer temp-pa= th)) (save-current-buffer (set-buffer temp-file) (setq temp-result ...)) (i= f visited-p nil (kill-buffer temp-file)) temp-result))) (mapcar (function c= ar) path-collector)))) | (let ((block-counter 0) (org-babel-default-header-args (if target-file = (org-babel-merge-params org-babel-default-header-args (list (cons :tangle t= arget-file))) org-babel-default-header-args)) (tangle-file (if (equal arg (= quote (16))) (progn (or (cdr (assoc :tangle ...)) (user-error "Point is not= in a source code block"))))) path-collector) (mapc (function (lambda (by-l= ang) (let* ((lang (car by-lang)) (specs (cdr by-lang)) (ext (or ... lang)) = (lang-f (intern ...)) she-banged) (mapc (function (lambda ... ...)) specs))= )) (if (equal arg (quote (4))) (org-babel-tangle-single-block 1 t) (org-bab= el-tangle-collect-blocks lang tangle-file))) (message "Tangled %d code bloc= k%s from %s" block-counter (if (=3D block-counter 1) "" "s") (file-name-non= directory (buffer-file-name (or (buffer-base-buffer) (current-buffer))))) (= if org-babel-post-tangle-hook (progn (mapc (function (lambda (file) (let* (= ... ... temp-result temp-file) (org-babel-find-file-noselect-refresh temp-p= ath) (setq temp-file ...) (save-current-buffer ... ...) (if visited-p nil .= ..) temp-result))) (mapcar (function car) path-collector)))) (mapc (functio= n (lambda (pair) (if (cdr pair) (progn (set-file-modes (car pair) (cdr pair= )))))) path-collector) (mapcar (function car) path-collector)) | (save-excursion (let ((block-counter 0) (org-babel-default-header-args = (if target-file (org-babel-merge-params org-babel-default-header-args (list= (cons :tangle target-file))) org-babel-default-header-args)) (tangle-file = (if (equal arg (quote (16))) (progn (or (cdr ...) (user-error "Point is not= in a source code block"))))) path-collector) (mapc (function (lambda (by-l= ang) (let* ((lang ...) (specs ...) (ext ...) (lang-f ...) she-banged) (mapc= (function ...) specs)))) (if (equal arg (quote (4))) (org-babel-tangle-sin= gle-block 1 t) (org-babel-tangle-collect-blocks lang tangle-file))) (messag= e "Tangled %d code block%s from %s" block-counter (if (=3D block-counter 1)= "" "s") (file-name-nondirectory (buffer-file-name (or (buffer-base-buffer)= (current-buffer))))) (if org-babel-post-tangle-hook (progn (mapc (function= (lambda (file) (let* ... ... ... ... ... temp-result))) (mapcar (function = car) path-collector)))) (mapc (function (lambda (pair) (if (cdr pair) (prog= n (set-file-modes ... ...))))) path-collector) (mapcar (function car) path-= collector))) | (save-restriction (if (equal arg (quote (4))) (progn (let ((head (org-b= abel-where-is-src-block-head))) (if head (goto-char head) (user-error "Poin= t is not in a source code block"))))) (save-excursion (let ((block-counter = 0) (org-babel-default-header-args (if target-file (org-babel-merge-params o= rg-babel-default-header-args (list ...)) org-babel-default-header-args)) (t= angle-file (if (equal arg (quote ...)) (progn (or ... ...)))) path-collecto= r) (mapc (function (lambda (by-lang) (let* (... ... ... ... she-banged) (ma= pc ... specs)))) (if (equal arg (quote (4))) (org-babel-tangle-single-block= 1 t) (org-babel-tangle-collect-blocks lang tangle-file))) (message "Tangle= d %d code block%s from %s" block-counter (if (=3D block-counter 1) "" "s") = (file-name-nondirectory (buffer-file-name (or (buffer-base-buffer) (current= -buffer))))) (if org-babel-post-tangle-hook (progn (mapc (function (lambda = ... ...)) (mapcar (function car) path-collector)))) (mapc (function (lambda= (pair) (if (cdr pair) (progn ...)))) path-collector) (mapcar (function car= ) path-collector)))) | org-babel-tangle(nil) | call-interactively(org-babel-tangle nil nil) `---- =2D-=20 Rainer M. Krug email: RMKruggmailcom --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) iQEcBAEBAgAGBQJSRXitAAoJENvXNx4PUvmCnocIAKfstVkxN17bBw9hfKF36pEB 8LxEJ3lSQ51FsHSQLqZqgMU54jf6TTXnuC1aSlOkGpB8CjfNpDZhH5ht306vcQDO cYsTsyGRa9ZNJIqcL7EHp1RGAHNZrfVoq5AYCh+Pk2XfVlNne1zv9zm63ZsHOZmQ QPLVwrMYscZsRzR5I5dWGoSVrZ4C5d7xd3+Jv+qOrvNNLRWvM+WXcEtRMYxrdy8F HQZUF+EbgYr21QKAZMjYz1LLRuHAwuMmeEOzT2RVOAn8BAWkDDc5/So9pk7rgI8I ZeXi7Ebr6U1i/pO+VGwoQakmlr5LClc+oa1CRdERagriWMTeKNvia+MntpCX5KY= =lBtb -----END PGP SIGNATURE----- --=-=-=--