From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel E. Doherty Subject: Re: Simple source block breaks LaTeX export Date: Tue, 13 Dec 2011 20:29:48 -0600 Message-ID: <87ipljj36r.wl%ded-law@ddoherty.net> References: <87borccdam.wl%ded-law@ddoherty.net> <4757.1323816665@alphaville.americas.hpqcorp.net> <87aa6wcbe1.wl%ded-law@ddoherty.net> <8470.1323823559@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaebU-00062C-7R for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 21:29:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaebS-0007o4-Ra for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 21:29:56 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:63200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaebS-0007nt-Ju for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 21:29:54 -0500 Received: by ghrr13 with SMTP id r13so332082ghr.0 for ; Tue, 13 Dec 2011 18:29:54 -0800 (PST) In-Reply-To: <8470.1323823559@alphaville.americas.hpqcorp.net> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org Thanks, Nick. That was it alright. Having the package manage in Emacs 24 makes this kind of fix really easy. Regards, At Tue, 13 Dec 2011 19:45:59 -0500, Nick Dokos wrote: > > Daniel E. Doherty wrote: > > > Nick, > > > > Oops, yeah, its version 7.7, as distributed with emacs 24.0.92. I've tried exporting to HTML also. It > > works. > > > > This was fixed shortly thereafter. You have to either upgrade or cherry-pick > the fix. The relevant commit is > > ,---- > | $ git show c3631aae7e68565978433cad8c4a2b286e91dfac > | commit c3631aae7e68565978433cad8c4a2b286e91dfac > | Author: Nicolas Goaziou > | Date: Sat Jul 30 12:38:06 2011 +0200 > | > | org-footnote: prevent LaTeX export from catching footnotes in protect environment > | > | * lisp/org-footnote.el (org-footnote-in-valid-context-p): check > | `org-protected' property before allowing to match a footnote. > | (org-footnote-at-reference-p): remove an obsolete test. It's now done > | in the previous function. > | > | diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el > | index 6fadd28..68b1412 100644 > | --- a/lisp/org-footnote.el > | +++ b/lisp/org-footnote.el > | @@ -171,8 +171,10 @@ (defun org-footnote-in-valid-context-p () > | (save-match-data > | (not (or (org-in-commented-line) > | (org-in-indented-comment-line) > | - (org-in-verbatim-emphasis) > | + ;; Avoid protected environments (LaTeX export) > | + (get-text-property (point) 'org-protected) > | ;; Avoid literal example. > | + (org-in-verbatim-emphasis) > | (save-excursion > | (beginning-of-line) > | (looking-at "[ \t]*:[ \t]+")) > | @@ -223,8 +225,7 @@ (defun org-footnote-at-reference-p () > | ;; optional argument of the command. Thus, check > | ;; the `org-protected' property of that command. > | (or (not (org-inside-latex-macro-p)) > | - (and (get-text-property (1- beg) 'org-protected) > | - (not (get-text-property beg 'org-protected))))) > | + (get-text-property (1- beg) 'org-protected))) > | (list label beg end > | ;; Definition: ensure this is an inline footnote first. > | (and (or (not label) (match-string 1)) > `---- > > Nick > > > At Tue, 13 Dec 2011 17:51:05 -0500, > > Nick Dokos wrote: > > > > > > Daniel E. Doherty wrote: > > > > > > > > > > > If I try to export the following org file to LaTeX, I get a stringp > > > > violation. > > > > > > > > ================================== > > > > * Hello > > > > #+begin_src ruby > > > > $f = [] > > > > $f[0] = $f[1] = 1 > > > > #+end_src > > > > ================================== > > > > > > > > Here is the traceback: > > > > ================================== > > > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > > > > string-match("ORG-LIST-END-MARKER\\'" nil) > > > > > > What version? It works fine with Org-mode version 7.7 (release_7.7.624.gda56) > > > which is not quite the latest, but it's close. I also took the opportunity > > > to pull latest (Org-mode version 7.8.02 (release_7.8.02.2.g490d6a)) and it > > > works fine there too. > > > > > > Nick > > > > >