emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mode git master. ox-latex export errors out due to a table
@ 2015-11-02 17:05 Kaushal Modi
  2015-11-02 17:53 ` Nick Dokos
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 17:05 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 18769 bytes --]

Hi,

I updated my copy of org-mode from git master after about 2-3 weeks. The
ox-latex export used to work fine but now it is failing due to something in
the tables I have in my .org files.  If I comment out those tables, the
ox-latex export works fine. Else it errors out due to (void-function nil)
error.

Here is one of such tables. The below is a MWE which can reproduce the
error I am seeing. The error occurs when I do "C-c C-e l l"

===== MWE =====

* Severity
#+CAPTION: Macros for reporting messages of different severities
#+NAME: tab__uvm_reporting_macros
|----------+------------------------------------------+-------------------|
| Severity | Macro                                    | Default Verbosity |
|----------+------------------------------------------+-------------------|
| Info     | =`uvm_info("ID", "Message", UVM_MEDIUM)= | No default        |
| Warning  | =`uvm_warning("ID", "Message")=          | =UVM_NONE=        |
| Error    | =`uvm_error("ID", "Message")=            | =UVM_NONE=        |
| Fatal    | =`uvm_fatal("ID", "Message")= [fn:1]     | =UVM_NONE=        |
|----------+------------------------------------------+-------------------|


* Footnotes
[fn:1] Simulation is quit when this macro is called


===== Backtrace =====

Debugger entered--Lisp error: (void-function nil)
  nil(((paragraph (:begin 740 :end 785 :contents-begin 740 :contents-end
785 :post-blank 0 :post-affiliated 740 :parent (footnote-definition (:label
"fn:1" :begin 733 :end 785 :contents-begin 740 :contents-end 785
:post-blank 0 :post-affiliated 733 :parent (section (:begin 733 :end 785
:contents-begin 733 :contents-end 785 :post-blank 0 :post-affiliated 733
:parent (headline ... #5)) #3)) #1)) #("Simulation is quit when this macro
is called\n" 0 45 (:parent #1)))))
  #[257 "\303 \300\"\2050 \301 \301\242B\240\210\304 \211;\203 \305\306
#\202# \307 A@ \"\266\202\310=\2050 \302\311 \300\"!\207" [(:export-options
nil :input-buffer "ox-latex-table-export-error.org" :input-file
"/home/kmodi/sandbox/org/ox-latex-table-export-error.org" :latex-class
"article" :latex-class-options nil :latex-header nil :latex-header-extra
nil :description nil :keywords nil :subtitle nil
:latex-active-timestamp-format "\\textit{%s}" :latex-caption-above (table)
:latex-classes (("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" .
"\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}"))) :latex-default-figure-position "H"
:latex-default-table-environment "tabular" :latex-default-table-mode table
:latex-diary-timestamp-format "\\textit{%s}" :latex-footnote-separator
"\\textsuperscript{,}\\," :latex-format-drawer-function #[514 "\207" [] 3
"\n\n(fn _ CONTENTS)"] :latex-format-headline-function
org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) (((footnote-reference
(:label "fn:1" :type standard :begin 610 :end 616 :contents-begin nil
:contents-end nil :post-blank 0 :parent (table-cell (:begin 579 :end 622
:contents-begin 580 :contents-end 616 :post-blank 0 :parent ...) (verbatim
...) #4))))) nil org-export-footnote-first-reference-p :type
get-text-property 0 plist-get standard org-export-get-footnote-definition]
7 "\n\n(fn REF)"]((footnote-reference (:label "fn:1" :type standard :begin
610 :end 616 :contents-begin nil :contents-end nil :post-blank 0 :parent
(table-cell (:begin 579 :end 622 :contents-begin 580 :contents-end 616
:post-blank 0 :parent (table-row (:type standard :begin 567 :end 643
:contents-begin 568 :contents-end 642 :post-blank 0 :post-affiliated 567
:parent (table (:begin 12 :end 719 :type org :tblfm nil :contents-begin 111
:contents-end 719 :value nil :post-blank 0 :post-affiliated 111 :caption
... :name "tab__uvm_reporting_macros" :parent ...) (table-row ...)
(table-row ... ... ... ...) (table-row ...) (table-row ... ... ... ...)
(table-row ... ... ... ...) (table-row ... ... ... ...) #4 (table-row
...))) (table-cell (:begin 568 :end 579 :contents-begin 569 :contents-end
574 :post-blank 0 :parent #4) #("Fatal" 0 5 (:parent #5))) #2 (table-cell
(:begin 622 :end 642 :contents-begin 623 :contents-end 633 :post-blank 0
:parent #4) (verbatim (:value "UVM_NONE" :begin 623 :end 633 :post-blank 0
:parent #5))))) (verbatim (:value "`uvm_fatal(\"ID\", \"Message\")" :begin
580 :end 610 :post-blank 1 :parent #2)) #0))))
  #[257 "\211\211:\204 \211;\205 \311\262 \202 \211@9\205 \211@\262
?\206\247 \301\203- \312\301\313\">\206\247 \211\2049 \314\310\242
\"\202\247 \211\315=\203] \314\310\242 \211:\204N \316\262 \202Y \211@9\203Y
\211AA\262 \"\202\247 \211\304>\203~ \300 !\211\203} \302\203v \317\320
\"\210\202} \307 \307\242B\240\210\210\306\321=\203\271 ;\204\271 \211
\236A\211\203\270 \211@\310\242 \211;\203\247 \322\323 #\266\202\202\257
\312 A@ \"\266\202!\210 A\266\202\202\216 \210\303\203P \306\321=\203P \211
>\203P \211\203O \211@\211@ A \211;\203\346 \322\323 #\266\202\202\356 \312
A@ \"\266\202\211\203F \235\203/ \235\203 \324 !\211\203 \211@\310\242
A!\210\310\242 @!\210 A\266\202\202 \210\202F \310\242 A!\210\310\242
@!\210\202F \235\203A \314\310\242\324 !\"\210\202F \310\242 !\210\266
A\266\202\202\314 \210\211\305>\206\247 \211:\204b \316\262 \202m \211@9\203m
\211AA\262 ?\206\247 \306\325=\203 \211 >?\206\247 \306\326=\203\214 \211
>\206\247 \314\310\242 \211:\204\233 \316\262 \202\246 \211@9\203\246
\211AA\262 \"\207" [#[257 "\303 \300\"\2050 \301 \301\242B\240\210\304
\211;\203 \305\306 #\202# \307 A@ \"\266\202\310=\2050 \302\311
\300\"!\207" [(:export-options nil :input-buffer "
ox-latex-table-export-error.org" :input-file "/home/kmodi/sandbox/org/
ox-latex-table-export-error.org" :latex-class "article"
:latex-class-options nil :latex-header nil :latex-header-extra nil
:description nil :keywords nil :subtitle nil :latex-active-timestamp-format
"\\textit{%s}" :latex-caption-above (table) :latex-classes (("article"
"\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report"
"\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
:latex-default-figure-position "H" :latex-default-table-environment
"tabular" :latex-default-table-mode table :latex-diary-timestamp-format
"\\textit{%s}" :latex-footnote-separator "\\textsuperscript{,}\\,"
:latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
:latex-format-headline-function org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) (((footnote-reference
(:label "fn:1" :type standard :begin 610 :end 616 :contents-begin nil
:contents-end nil :post-blank 0 :parent ...)))) nil
org-export-footnote-first-reference-p :type get-text-property 0 plist-get
standard org-export-get-footnote-definition] 7 "\n\n(fn REF)"]
(:export-options nil :input-buffer "ox-latex-table-export-error.org"
:input-file "/home/kmodi/sandbox/org/ox-latex-table-export-error.org"
:latex-class "article" :latex-class-options nil :latex-header nil
:latex-header-extra nil :description nil :keywords nil :subtitle nil
:latex-active-timestamp-format "\\textit{%s}" :latex-caption-above (table)
:latex-classes (("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" .
"\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}"))) :latex-default-figure-position "H"
:latex-default-table-environment "tabular" :latex-default-table-mode table
:latex-diary-timestamp-format "\\textit{%s}" :latex-footnote-separator
"\\textsuperscript{,}\\," :latex-format-drawer-function #[514 "\207" [] 3
"\n\n(fn _ CONTENTS)"] :latex-format-headline-function
org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) nil nil
(footnote-reference) nil objects (nil) (#0) plain-text plist-get
:ignore-list mapc org-data nil throw :--map-first-match objects
get-text-property 0 reverse greater-elements elements
org-element-secondary-value-alist org-element-all-elements
org-element--parsed-properties-alist org-element-dual-keywords
org-element-multiple-keywords org-element-greater-elements
org-element-all-objects] 11 "\n\n(fn --DATA)"]((footnote-reference (:label
"fn:1" :type standard :begin 610 :end 616 :contents-begin nil :contents-end
nil :post-blank 0 :parent (table-cell (:begin 579 :end 622 :contents-begin
580 :contents-end 616 :post-blank 0 :parent (table-row (:type standard
:begin 567 :end 643 :contents-begin 568 :contents-end 642 :post-blank 0
:post-affiliated 567 :parent (table (:begin 12 :end 719 :type org :tblfm
nil :contents-begin 111 :contents-end 719 :value nil :post-blank 0
:post-affiliated 111 :caption ... :name "tab__uvm_reporting_macros" :parent
...) (table-row ...) (table-row ... ... ... ...) (table-row ...) (table-row
... ... ... ...) (table-row ... ... ... ...) (table-row ... ... ... ...) #4
(table-row ...))) (table-cell (:begin 568 :end 579 :contents-begin 569
:contents-end 574 :post-blank 0 :parent #4) #("Fatal" 0 5 (:parent #5))) #2
(table-cell (:begin 622 :end 642 :contents-begin 623 :contents-end 633
:post-blank 0 :parent #4) (verbatim (:value "UVM_NONE" :begin 623 :end 633
:post-blank 0 :parent #5))))) (verbatim (:value "`uvm_fatal(\"ID\",
\"Message\")" :begin 580 :end 610 :post-blank 1 :parent #2)) #0))))
  mapc(#[257 "\211\211:\204 \211;\205 \311\262 \202 \211@9\205 \211@\262
?\206\247 \301\203- \312\301\313\">\206\247 \211\2049 \314\310\242
\"\202\247 \211\315=\203] \314\310\242 \211:\204N \316\262 \202Y \211@9\203Y
\211AA\262 \"\202\247 \211\304>\203~ \300 !\211\203} \302\203v \317\320
\"\210\202} \307 \307\242B\240\210\210\306\321=\203\271 ;\204\271 \211
\236A\211\203\270 \211@\310\242 \211;\203\247 \322\323 #\266\202\202\257
\312 A@ \"\266\202!\210 A\266\202\202\216 \210\303\203P \306\321=\203P \211
>\203P \211\203O \211@\211@ A \211;\203\346 \322\323 #\266\202\202\356 \312
A@ \"\266\202\211\203F \235\203/ \235\203 \324 !\211\203 \211@\310\242
A!\210\310\242 @!\210 A\266\202\202 \210\202F \310\242 A!\210\310\242
@!\210\202F \235\203A \314\310\242\324 !\"\210\202F \310\242 !\210\266
A\266\202\202\314 \210\211\305>\206\247 \211:\204b \316\262 \202m \211@9\203m
\211AA\262 ?\206\247 \306\325=\203 \211 >?\206\247 \306\326=\203\214 \211
>\206\247 \314\310\242 \211:\204\233 \316\262 \202\246 \211@9\203\246
\211AA\262 \"\207" [#[257 "\303 \300\"\2050 \301 \301\242B\240\210\304
\211;\203 \305\306 #\202# \307 A@ \"\266\202\310=\2050 \302\311
\300\"!\207" [(:export-options nil :input-buffer "
ox-latex-table-export-error.org" :input-file "/home/kmodi/sandbox/org/
ox-latex-table-export-error.org" :latex-class "article"
:latex-class-options nil :latex-header nil :latex-header-extra nil
:description nil :keywords nil :subtitle nil :latex-active-timestamp-format
"\\textit{%s}" :latex-caption-above (table) :latex-classes (("article"
"\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report"
"\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}")) ("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
:latex-default-figure-position "H" :latex-default-table-environment
"tabular" :latex-default-table-mode table :latex-diary-timestamp-format
"\\textit{%s}" :latex-footnote-separator "\\textsuperscript{,}\\,"
:latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
:latex-format-headline-function org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) (((footnote-reference
(:label "fn:1" :type standard :begin 610 :end 616 :contents-begin nil
:contents-end nil :post-blank 0 :parent ...)))) nil
org-export-footnote-first-reference-p :type get-text-property 0 plist-get
standard org-export-get-footnote-definition] 7 "\n\n(fn REF)"]
(:export-options nil :input-buffer "ox-latex-table-export-error.org"
:input-file "/home/kmodi/sandbox/org/ox-latex-table-export-error.org"
:latex-class "article" :latex-class-options nil :latex-header nil
:latex-header-extra nil :description nil :keywords nil :subtitle nil
:latex-active-timestamp-format "\\textit{%s}" :latex-caption-above (table)
:latex-classes (("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" .
"\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" .
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" .
"\\subsubsection*{%s}"))) :latex-default-figure-position "H"
:latex-default-table-environment "tabular" :latex-default-table-mode table
:latex-diary-timestamp-format "\\textit{%s}" :latex-footnote-separator
"\\textsuperscript{,}\\," :latex-format-drawer-function #[514 "\207" [] 3
"\n\n(fn _ CONTENTS)"] :latex-format-headline-function
org-latex-format-headline-default-function
:latex-format-inlinetask-function
org-latex-format-inlinetask-default-function :latex-hyperref-template
"\\hypersetup{\n pdfauthor={%a},\n pdftitle={%t},\n pdfkeywords={%k},\n
pdfsubject={%d},\n pdfcreator={%c}, \n pdflang={%L}}\n"
:latex-image-default-height "" :latex-image-default-option ""
:latex-image-default-width ".9\\linewidth" ...) nil nil
(footnote-reference) nil objects (nil) (#0) plain-text plist-get
:ignore-list mapc org-data nil throw :--map-first-match objects
get-text-property 0 reverse greater-elements elements
org-element-secondary-value-alist org-element-all-elements
org-element--parsed-properties-alist org-element-dual-keywords
org-element-multiple-keywords org-element-greater-elements
org-element-all-objects] 11 "\n\n(fn --DATA)"] ((verbatim (:value
"`uvm_fatal(\"ID\", \"Message\")" :begin 580 :end 610 :post-blank 1 :parent
(table-cell (:begin 579 :end 622 :contents-begin 580 :contents-end 616
:post-blank 0 :parent (table-row (:type standard :begin 567 :end 643
:contents-begin 568 :contents-end 642 :post-blank 0 :post-affiliated 567
:parent (table ... ... ... ... ... ... ... #5 ...)) (table-cell (:begin 568
:end 579 :contents-begin 569 :contents-end 574 :post-blank 0 :parent #5)
#("Fatal" 0 5 ...)) #3 (table-cell (:begin 622 :end 642 :contents-begin 623
:contents-end 633 :post-blank 0 :parent #5) (verbatim ...)))) #1
(footnote-reference (:label "fn:1" :type standard :begin 610 :end 616
:contents-begin nil :contents-end nil :post-blank 0 :parent #3)))))
(footnote-reference (:label "fn:1" :type standard :begin 610 :end 616
:contents-begin nil :contents-end nil :post-blank 0 :parent (table-cell
(:begin 579 :end 622 :contents-begin 580 :contents-end 616 :post-blank 0
:parent (table-row (:type standard :begin 567 :end 643 :contents-begin 568
:contents-end 642 :post-blank 0 :post-affiliated 567 :parent (table ... ...
... ... ... ... ... #5 ...)) (table-cell (:begin 568 :end 579
:contents-begin 569 :contents-end 574 :post-blank 0 :parent #5) #("Fatal" 0
5 ...)) #3 (table-cell (:begin 622 :end 642 :contents-begin 623
:contents-end 633 :post-blank 0 :parent #5) (verbatim ...)))) (verbatim
(:value "`uvm_fatal(\"ID\", \"Message\")" :begin 580 :end 610 :post-blank 1
:parent #3)) #1)))))

--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 22728 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 17:05 org-mode git master. ox-latex export errors out due to a table Kaushal Modi
@ 2015-11-02 17:53 ` Nick Dokos
  2015-11-02 18:06   ` Kaushal Modi
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2015-11-02 17:53 UTC (permalink / raw)
  To: emacs-orgmode

Thank you for providing the backtrace, but ... You knew there was
a "but" coming, right? :-)

Although some people can make sense of a backtrace produced with
compiled code, it is far more useful to provide a backtrace produced
with *uncompiled* code. What you have to do is

C-u M-x org-reload RET

and *then* produce the backtrace. If you want to go back to compiled
code afterwards, do the M-x org-reload  without the C-u.

See

  (info "(org) Feedback")

particularly the section entitled "How to create a useful backtrace".

Also, please always provide the org-mode version:

C-u M-x org-version

FWIW, I can export your sample to PDF with no problems. I'm on
Org-mode version 8.3.2 (release_8.3.2-178-g96681f)

--
Nick

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 17:53 ` Nick Dokos
@ 2015-11-02 18:06   ` Kaushal Modi
  2015-11-02 18:10     ` Kaushal Modi
  2015-11-02 18:34     ` Nick Dokos
  0 siblings, 2 replies; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 18:06 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

> Although some people can make sense of a backtrace produced with
compiled code, it is far more useful to provide a backtrace produced
with *uncompiled* code.

Apologies, I was unaware of that. I should have read that Info node first.
Below is a gist link to the full backtrace with uncompiled code.

https://gist.github.com/kaushalmodi/b76de1274b7a7bfe6020

Here's more info about this issue I am facing:
- I cannot reproduce this error in emacs -Q with the same git version of
org-mode in load-path.
- But I can reproduce this error consistently even if I "delete/move" my
~/.emacs.d/init.el and ~/.emacs.d/elpa. I do not have a ~/.emacs file.
While this step should be equivalent to emacs -Q, it doesn't seem to work
that way for me. Even the load-path var is exact same as with emacs -Q (I
install org-mode in the share/emacs dir).

While I resolve the mystery of why removing the init.el is not the same as
emacs -Q for me, I hope that the backtrace from uncompiled code can help
point the problem in my emacs setup.

Many thanks!

[-- Attachment #2: Type: text/html, Size: 1810 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:06   ` Kaushal Modi
@ 2015-11-02 18:10     ` Kaushal Modi
  2015-11-02 18:19       ` Kaushal Modi
  2015-11-02 18:34     ` Nick Dokos
  1 sibling, 1 reply; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 18:10 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

Also, I am on the latest org-mode and emacs builds:

org-mode version: Org-mode version 8.3.2 (release_8.3.2-251-g4ca117 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)
emacs-version:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=5401bb8645f955b6fde8c0a5e5c8cf5ec1cab626

[-- Attachment #2: Type: text/html, Size: 561 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:10     ` Kaushal Modi
@ 2015-11-02 18:19       ` Kaushal Modi
  2015-11-02 18:34         ` Kaushal Modi
  2015-11-02 18:38         ` Nick Dokos
  0 siblings, 2 replies; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 18:19 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Some more info:

I cannot recreate this error when using
- my emacs config
- the same emacs build from git
- BUT the latest org-plus-contrib from org elpa: Org-mode version 8.3.2
(8.3.2-10-g00dacd-elpaplus @
/home/kmodi/.emacs.d/elpa_25_0/org-plus-contrib-20151005/)

So it is some change between:
- 8.3.2-10-g00dacd-elpaplus, and
- release_8.3.2-251-g4ca117

Now I just need to decode what "g4ca117" means in that version that does
not work for me. It doesn't seem to be any part of the git hash for the
commit I am on (
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=8bccb2131374bba8c82c2774abb34af488826ce4
)

[-- Attachment #2: Type: text/html, Size: 1250 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:19       ` Kaushal Modi
@ 2015-11-02 18:34         ` Kaushal Modi
  2015-11-02 18:57           ` Nick Dokos
  2015-11-02 18:38         ` Nick Dokos
  1 sibling, 1 reply; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 18:34 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

@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.

[-- Attachment #2: Type: text/html, Size: 484 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:06   ` Kaushal Modi
  2015-11-02 18:10     ` Kaushal Modi
@ 2015-11-02 18:34     ` Nick Dokos
  1 sibling, 0 replies; 14+ messages in thread
From: Nick Dokos @ 2015-11-02 18:34 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

>> Although some people can make sense of a backtrace produced with
> compiled code, it is far more useful to provide a backtrace produced
> with *uncompiled* code.
>
> Apologies, I was unaware of that. I should have read that Info node first.
> Below is a gist link to the full backtrace with uncompiled code.
>
> https://gist.github.com/kaushalmodi/b76de1274b7a7bfe6020
>

I can reproduce it with the latest version too. It may have something to
do with the recent conversion of ox-latex to lexical binding: I see
closures all over the backtrace.

> Here's more info about this issue I am facing:
> - I cannot reproduce this error in emacs -Q with the same git version of org-mode in load-path.
> - But I can reproduce this error consistently even if I "delete/move" my ~/.emacs.d/init.el and ~
> /.emacs.d/elpa. I do not have a ~/.emacs file. While this step should be equivalent to emacs -Q, it
> doesn't seem to work that way for me. Even the load-path var is exact same as with emacs -Q (I install
> org-mode in the share/emacs dir).
>
> While I resolve the mystery of why removing the init.el is not the same as emacs -Q for me, I hope that
> the backtrace from uncompiled code can help point the problem in my emacs setup.
>
> Many thanks!

--
Nick

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:19       ` Kaushal Modi
  2015-11-02 18:34         ` Kaushal Modi
@ 2015-11-02 18:38         ` Nick Dokos
  2015-11-02 18:48           ` Kaushal Modi
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2015-11-02 18:38 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

> Some more info:
>
> I cannot recreate this error when using
> - my emacs config
> - the same emacs build from git
> - BUT the latest org-plus-contrib from org elpa: Org-mode version 8.3.2 (8.3.2-10-g00dacd-elpaplus @ /
> home/kmodi/.emacs.d/elpa_25_0/org-plus-contrib-20151005/)
>
> So it is some change between:
> - 8.3.2-10-g00dacd-elpaplus, and
> - release_8.3.2-251-g4ca117
>

My guess is that it's this commit:

commit 8bccb2131374bba8c82c2774abb34af488826ce4
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date:   Thu Oct 29 19:03:52 2015 +0100

    ox-latex: Use lexical binding

but I haven't reverted it yet to check.

> Now I just need to decode what "g4ca117" means in that version that does not work for me. It doesn't
> seem to be any part of the git hash for the commit I am on ( http://orgmode.org/cgit.cgi/org-mode.git/
> commit/?id=8bccb2131374bba8c82c2774abb34af488826ce4 )

The "g" stands for "git" and it's not part of the SHA1: 4ca117 are
the first six digits of the SHA1 at the HEAD of the branch:

commit 4ca1179c9e9c707267ac3738cc7c8442001b204b
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date:   Sun Nov 1 00:58:57 2015 +0100

    ox-odt: Use lexical binding

--
Nick

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:38         ` Nick Dokos
@ 2015-11-02 18:48           ` Kaushal Modi
  0 siblings, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 18:48 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

> The "g" stands for "git" and it's not part of the SHA1: 4ca117 are the
first six digits of the SHA1 at the HEAD of the branch

Ah, now that you spell it out, it's obvious. I swear I kept staring at the
git hash to find the "117" in "g4ca117" in
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=4ca1179c9e9c707267ac3738cc7c8442001b204b
but I never saw it! Now it stands out clear.

And of course, I should have realized that "g" can never be part of the hex
hash.

Thanks, and also thanks for confirming that you see this error too.

[-- Attachment #2: Type: text/html, Size: 1257 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:34         ` Kaushal Modi
@ 2015-11-02 18:57           ` Nick Dokos
  2015-11-02 19:25             ` Nick Dokos
  2015-11-02 20:01             ` Nicolas Goaziou
  0 siblings, 2 replies; 14+ messages in thread
From: Nick Dokos @ 2015-11-02 18:57 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> 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.

--
Nick

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:57           ` Nick Dokos
@ 2015-11-02 19:25             ` Nick Dokos
  2015-11-02 19:40               ` Kaushal Modi
  2015-11-02 20:01             ` Nicolas Goaziou
  1 sibling, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2015-11-02 19:25 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Kaushal Modi <kaushal.modi@gmail.com> 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

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 19:25             ` Nick Dokos
@ 2015-11-02 19:40               ` Kaushal Modi
  0 siblings, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 19:40 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Thanks Nick. That patch resolves the issue for now. At least, all my pdf
exports are working fine as before.

[-- Attachment #2: Type: text/html, Size: 164 bytes --]

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 18:57           ` Nick Dokos
  2015-11-02 19:25             ` Nick Dokos
@ 2015-11-02 20:01             ` Nicolas Goaziou
  2015-11-02 21:56               ` Kaushal Modi
  1 sibling, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2015-11-02 20:01 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Hello,

Nick Dokos <ndokos@gmail.com> writes:

> Kaushal Modi <kaushal.modi@gmail.com> 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.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-mode git master. ox-latex export errors out due to a table
  2015-11-02 20:01             ` Nicolas Goaziou
@ 2015-11-02 21:56               ` Kaushal Modi
  0 siblings, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2015-11-02 21:56 UTC (permalink / raw)
  To: Nick Dokos, emacs-org list

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

Thanks to you both for the quick solution and the upstream fix.

[-- Attachment #2: Type: text/html, Size: 116 bytes --]

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

end of thread, other threads:[~2015-11-02 21:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02 17:05 org-mode git master. ox-latex export errors out due to a table Kaushal Modi
2015-11-02 17:53 ` Nick Dokos
2015-11-02 18:06   ` Kaushal Modi
2015-11-02 18:10     ` Kaushal Modi
2015-11-02 18:19       ` Kaushal Modi
2015-11-02 18:34         ` Kaushal Modi
2015-11-02 18:57           ` Nick Dokos
2015-11-02 19:25             ` Nick Dokos
2015-11-02 19:40               ` Kaushal Modi
2015-11-02 20:01             ` Nicolas Goaziou
2015-11-02 21:56               ` Kaushal Modi
2015-11-02 18:38         ` Nick Dokos
2015-11-02 18:48           ` Kaushal Modi
2015-11-02 18:34     ` Nick Dokos

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).