From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-mode git master. ox-latex export errors out due to a table Date: Mon, 02 Nov 2015 14:25:13 -0500 Message-ID: <87si4ojjae.fsf@alphaville.usersys.redhat.com> References: <87y4eg2spv.fsf@alphaville.usersys.redhat.com> <87ziywjkkw.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtKjN-0006Qy-QA for emacs-orgmode@gnu.org; Mon, 02 Nov 2015 14:25:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtKjI-0006p1-Sr for emacs-orgmode@gnu.org; Mon, 02 Nov 2015 14:25:25 -0500 Received: from plane.gmane.org ([80.91.229.3]:47660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtKjI-0006ov-MG for emacs-orgmode@gnu.org; Mon, 02 Nov 2015 14:25:20 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZtKjH-0001xj-6o for emacs-orgmode@gnu.org; Mon, 02 Nov 2015 20:25:19 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Nov 2015 20:25:19 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Nov 2015 20:25:19 +0100 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 Nick Dokos writes: > Kaushal Modi writes: > >> @Nick Dokos Are you are on a commit before or after this lexical binding change? http://orgmode.org/ >> cgit.cgi/org-mode.git/commit/?id=8bccb2131374bba8c82c2774abb34af488826ce4 >> >> The failure symtoms in my backtrace look like they could be related to this change. > > I think that is right. > > The problem seems to be with the search-refs function defined in the > let* in org-latex--delayed-footnotes-definitions and passed down to > org-element-map which tries to find it in the lexical environment and > fails. > Brute-forcing search-refs to be a special variable (i.e. dynamically, rather than lexically, bound) seems to fix the error, although I doubt it's the ultimate solution: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 060f423..3279be7 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1459,6 +1459,8 @@ INFO is a plist used as a communication channel. See ;; Else use format string. (t (format fmt text))))) +(defvar search-refs) ; For byte-compiler. + (defun org-latex--delayed-footnotes-definitions (element info) "Return footnotes definitions in ELEMENT as a string. @@ -1481,7 +1483,6 @@ just outside of it." (org-export-get-footnote-definition ref info) info)))) ;; Find every footnote reference in ELEMENT. (let* (all-refs - search-refs ; For byte-compiler. (search-refs (function (lambda (data) --8<---------------cut here---------------end--------------->8--- -- Nick