From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BABEL] BUG - error on tangling - disappears when changing the filename Date: Mon, 30 Sep 2013 18:10:19 -0600 Message-ID: <87had1rgug.fsf@gmail.com> References: <877ge1w22e.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQnYC-0005L4-5Z for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQnY6-0006R0-Nz for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:52 -0400 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:62303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQnY6-0006Qw-Gh for emacs-orgmode@gnu.org; Mon, 30 Sep 2013 20:10:46 -0400 Received: by mail-pa0-f44.google.com with SMTP id lf10so6595462pab.3 for ; Mon, 30 Sep 2013 17:10:41 -0700 (PDT) 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: Rainer M Krug Cc: emacs-orgmode@gnu.org >>> >>> The question is now why is this function org-babel-mark-file-as-tangled >>> receives NULL as a buffer-file-name? >> >> I'm not sure, but perhaps you could wrap the body of buffer-file-name in >> a (when (buffer-file-name) ...) form to protect against null files. > > Sounds reasonable and I'll put it in to have properly tangled files when > this happens - but then the file-local-variables would not be added if > the file name is null. Is there any way that I could find out why this > is happening (or under which conditions)? > I'm not sure why this is happening. You could use edebug to step through the tangling process by edebugging the `org-babel-tangle' function with (C-u C-M-x) i.e., (eval-defun 'edebug-it). Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D