emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Simple source block breaks LaTeX export
@ 2011-12-13 22:33 Daniel E. Doherty
  2011-12-13 22:51 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel E. Doherty @ 2011-12-13 22:33 UTC (permalink / raw)
  To: Org-mode List


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)
  org-export-latex-preprocess((:emph-multiline t :for-backend latex :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :tasks t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil))
  org-export-preprocess-string(#("* Hello\n#+begin_src ruby\n  $f = []\n  $f[0] = $f[1] = 1\n#+end_src\n\n" 0 2 (fontified nil org-category "junk") 2 7 (fontified nil org-category "junk") 7 8 (fontified nil org-category "junk") 8 24 (font-lock-fontified t org-category "Notes" fontified nil) 24 25 (font-lock-fontified t org-category "Notes" fontified nil) 25 27 (font-lock-fontified t org-category "Notes" fontified nil) 27 28 (font-lock-fontified t org-category "Notes" fontified nil) 28 29 (font-lock-fontified t org-category "Notes" fontified nil) 29 30 (font-lock-fontified t org-category "Notes" fontified nil) 30 37 (font-lock-fontified t org-category "Notes" fontified nil) 37 38 (font-lock-fontified t org-category "Notes" fontified nil) 38 39 (font-lock-fontified t org-category "Notes" fon
 tified nil) 39 40 (font-lock-fontified t org-category "Notes" fontified nil) 40 45 (font-lock-fontified t org-category "Notes" fontified nil) 45 46 (font-lock-fontified t org-category "Notes" fontified nil) 46 47 (font-lock-fontified t org-category "Notes" fontified nil) 47 48 (font-lock-fontified t org-category "Notes" fontified nil) 48 54 (font-lock-fontified t org-category "Notes" fontified nil) 54 55 (font-lock-fontified t org-category "Notes" fontified nil) 55 64 (font-lock-fontified t org-category "Notes" fontified nil) 64 65 (org-category "Notes" fontified nil rear-nonsticky t) 65 66 (fontified nil)) :emph-multiline t :for-backend latex :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :tasks t :add-text nil :skip-before-1st-head
 ing nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil)
  org-export-as-latex(nil nil nil nil nil nil)
  org-export-as-pdf(nil)
  call-interactively(org-export-as-pdf)
  org-export(nil)
  call-interactively(org-export nil nil)
  recursive-edit()
  debug(error (error "No window right from selected window"))
  signal(error ("No window right from selected window"))
  error("No window %s from selected window" right)
  windmove-do-window-select(right nil)
  windmove-right(nil)
  call-interactively(windmove-right nil nil)
=====================================

Any ideas what may be causing it?  Looks like something going wrong with
org-export-footnotes-seen, but that's as much as I can tell.
-- 


====================================================
Law Offices of Daniel E. Doherty
7300 W. 110th Street, Suite 930
Overland Park, KS 66210
913.338.7182 (Phone)
913.338.7164 (FAX)
ded-law@ddoherty.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simple source block breaks LaTeX export
  2011-12-13 22:33 Simple source block breaks LaTeX export Daniel E. Doherty
@ 2011-12-13 22:51 ` Nick Dokos
       [not found]   ` <87aa6wcbe1.wl%ded-law@ddoherty.net>
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2011-12-13 22:51 UTC (permalink / raw)
  To: Daniel E. Doherty; +Cc: nicholas.dokos, Org-mode List

Daniel E. Doherty <ded-law@ddoherty.net> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simple source block breaks LaTeX export
       [not found]   ` <87aa6wcbe1.wl%ded-law@ddoherty.net>
@ 2011-12-14  0:45     ` Nick Dokos
  2011-12-14  2:29       ` Daniel E. Doherty
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2011-12-14  0:45 UTC (permalink / raw)
  To: Daniel E. Doherty; +Cc: nicholas.dokos, emacs-orgmode

Daniel E. Doherty <ded-law@ddoherty.net> 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 <n.goaziou@gmail.com>
| 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 <ded-law@ddoherty.net> 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
> > 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Simple source block breaks LaTeX export
  2011-12-14  0:45     ` Nick Dokos
@ 2011-12-14  2:29       ` Daniel E. Doherty
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel E. Doherty @ 2011-12-14  2:29 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

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 <ded-law@ddoherty.net> 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 <n.goaziou@gmail.com>
> | 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 <ded-law@ddoherty.net> 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
> > > 
> > 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-14  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 22:33 Simple source block breaks LaTeX export Daniel E. Doherty
2011-12-13 22:51 ` Nick Dokos
     [not found]   ` <87aa6wcbe1.wl%ded-law@ddoherty.net>
2011-12-14  0:45     ` Nick Dokos
2011-12-14  2:29       ` Daniel E. Doherty

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).