From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Table caption produces trailing "nil" in pdf export Date: Tue, 10 Aug 2010 22:48:52 +0200 Message-ID: <87bp9a8a8b.wl%n.goaziou@gmail.com> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Tue_Aug_10_22:48:52_2010-1" Return-path: Received: from [140.186.70.92] (port=45167 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OivlF-0004Zq-PS for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 16:49:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OivlE-0004CE-N0 for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 16:49:25 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:37555) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OivlE-0004By-IO for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 16:49:24 -0400 Received: by wwi17 with SMTP id 17so413024wwi.30 for ; Tue, 10 Aug 2010 13:49:23 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode --Multipart_Tue_Aug_10_22:48:52_2010-1 Content-Type: text/plain; charset=US-ASCII Hello, >>>>> John Hendy writes: > Suddenly I'm getting a line with nothing but "nil" between the caption and > the table when exporting from org-mode to LaTeX. I swear this not happening. > I believe I did a git pull on Friday or some time last week. The only reason > I noticed is that I just set up emacs, org, and LaTeX on a new computer and > tested an old file to make sure the export was working. I then checked my > other computer with what I thought was a fine install and it's doing it now, > too. I originally thought I missed something on the new computer, but now > I'm wondering if it's from the fresh pull. This patch (needed by my own mistake) should correct the problem. Regards, -- Nicolas --Multipart_Tue_Aug_10_22:48:52_2010-1 Content-Type: text/plain; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="0001-Fix-empty-label-bug.patch" Content-Transfer-Encoding: 7bit >From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 10 Aug 2010 22:43:35 +0200 Subject: [PATCH] Fix empty label bug * org-latex.el (org-export-latex-tables): Return "" instead of nil when no label is attached. --- lisp/org-latex.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 056f1b3..b0ba939 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1683,7 +1683,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." "\\caption%s{%s} %s" (if shortn (concat "[" shortn "]") "") (or caption "") - (when label (format "\\label{%s}" label)))) + (if label (format "\\label{%s}" label) ""))) (if (and longtblp caption) "\\\\\n" "\n") (if (and org-export-latex-tables-centered (not longtblp)) "\\begin{center}\n") -- 1.7.2.1 --Multipart_Tue_Aug_10_22:48:52_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Multipart_Tue_Aug_10_22:48:52_2010-1--