Jason-S-Ross / ox-context

An Org Mode export backend for ConTeXt
13 stars 4 forks source link

problem with the demo - "(wrong-number-of-arguments (3 . 3) 4)" #2

Closed gour closed 3 years ago

gour commented 3 years ago

Hello,

I'm trying demo.org, but after modifying paths for included docs, I get the following:

Debugger entered--Lisp error: (wrong-number-of-arguments (3 . 3) 4)
  org-export-custom-protocol-maybe((link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph ... ... #1 ...))) nil latex (:export-options nil :back-end #s(org-export-backend :name context :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ... ...) :blocks nil :menu (67 "Export to ConTeXt" ...)) :translate-alist ((bold . org-context-bold) (center-block . org-context-center-block) (clock . org-context-clock) (code . org-context-code) (drawer . org-context-drawer) (dynamic-block . org-context-dynamic-block) (entity . org-context-entity) (example-block . org-context-example-block) (export-block . org-context-export-block) (export-snippet . org-context-export-snippet) (fixed-width . org-context-fixed-width) (footnote-reference . org-context-footnote-reference) (headline . org-context-headline) (horizontal-rule . org-context-horizontal-rule) (inline-src-block . org-context-inline-src-block) (inlinetask . org-context-inlinetask) (inner-template . org-context-inner-template) (italic . org-context-italic) (item . org-context-item) (keyword . org-context-keyword) (latex-environment . org-context-latex-environment) (latex-fragment . org-context-latex-fragment) (line-break . org-context-line-break) (link . org-context-link) (node-property . org-context-node-property) (paragraph . org-context-paragraph) ...) :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj/context/dem..." :attention nil :closing nil :context-block-source-environment ("OrgBlkSrc" . "\\definetyping[OrgBlkSrc][e...") :context-blockquote-environment ("OrgBlockQuote" . "\\definenarrower[OrgBlockQu...") :context-bullet-off-command ("OrgItemOff" . "\\define\\OrgItemOff{\\square...") :context-bullet-on-command ("OrgItemOn" . "\\define\\OrgItemOn{\\boxplus...") :context-bullet-trans-command ("OrgItemTrans" . "\\define\\OrgItemTrans{\\boxt...") ...))
  (cond ((org-export-custom-protocol-maybe link desc 'latex info)) (imagep (org-context--inline-image link info)) ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) (if (not destination) desc (format "\\goto{%s}[%s]" desc (org-export-get-reference destination info))))) ((member type '("custom-id" "fuzzy" "id")) (let ((destination (if (string= type "fuzzy") (org-export-resolve-fuzzy-link link info 'latex-matrices) (org-export-resolve-id-link link info)))) (let* ((temp (org-element-type destination))) (cond ((eql temp 'plain-text) (if desc (format "\\goto{%s}[url(%s)]" desc destination) (format "\\goto{\\hyphenatedurl{%s}}[url(%s)]" destination destination))) ((memql temp '...) (format "\\hyphenatedurl{%s}" (org-element-property :raw-link link))) (t (let (...) (if ... ... ...))))))) ((string= type "coderef") (let* ((code-block (org-context--find-coderef-parent raw-path info)) (ref-label (org-context--get-coderef-label raw-path code-block info)) (linenum (org-export-get-loc code-block info)) (retain-labels (org-element-property :retain-labels code-block))) (cond ((and linenum (not retain-labels)) (format "\\inline{ }[%s]" ref-label)) ((not retain-labels) (format "\\goto{\\ref[default][%s]}[%s]" ref-label ref-label)) (t (format "\\goto{%s}[%s]" path ref-label))))) ((and path desc) (format "\\goto{%s}[url(%s)]" desc path)) (path (format "\\goto{\\hyphenatedurl{%s}}[url(%s)]" path path)) (t (format "\\hyphenatedurl{%s}" desc)))
  (let* ((type (org-element-property :type link)) (raw-path (org-element-property :path link)) (desc (and (not (string= desc "")) desc)) (imagep (org-export-inline-image-p link (plist-get info :context-inline-image-rules))) (path (org-context--protect-text (cond ((member type '...) (concat type ":" raw-path)) ((equal type '"file") (org-export-file-uri raw-path)) (t raw-path))))) (cond ((org-export-custom-protocol-maybe link desc 'latex info)) (imagep (org-context--inline-image link info)) ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) (if (not destination) desc (format "\\goto{%s}[%s]" desc (org-export-get-reference destination info))))) ((member type '("custom-id" "fuzzy" "id")) (let ((destination (if (string= type "fuzzy") (org-export-resolve-fuzzy-link link info ...) (org-export-resolve-id-link link info)))) (let* ((temp (org-element-type destination))) (cond ((eql temp ...) (if desc ... ...)) ((memql temp ...) (format "\\hyphenatedurl{%s}" ...)) (t (let ... ...)))))) ((string= type "coderef") (let* ((code-block (org-context--find-coderef-parent raw-path info)) (ref-label (org-context--get-coderef-label raw-path code-block info)) (linenum (org-export-get-loc code-block info)) (retain-labels (org-element-property :retain-labels code-block))) (cond ((and linenum (not retain-labels)) (format "\\inline{ }[%s]" ref-label)) ((not retain-labels) (format "\\goto{\\ref[default][%s]}[%s]" ref-label ref-label)) (t (format "\\goto{%s}[%s]" path ref-label))))) ((and path desc) (format "\\goto{%s}[url(%s)]" desc path)) (path (format "\\goto{\\hyphenatedurl{%s}}[url(%s)]" path path)) (t (format "\\hyphenatedurl{%s}" desc))))
  org-context-link((link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph ... ... #1 ...))) nil (:export-options nil :back-end #s(org-export-backend :name context :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ... ...) :blocks nil :menu (67 "Export to ConTeXt" ...)) :translate-alist ((bold . org-context-bold) (center-block . org-context-center-block) (clock . org-context-clock) (code . org-context-code) (drawer . org-context-drawer) (dynamic-block . org-context-dynamic-block) (entity . org-context-entity) (example-block . org-context-example-block) (export-block . org-context-export-block) (export-snippet . org-context-export-snippet) (fixed-width . org-context-fixed-width) (footnote-reference . org-context-footnote-reference) (headline . org-context-headline) (horizontal-rule . org-context-horizontal-rule) (inline-src-block . org-context-inline-src-block) (inlinetask . org-context-inlinetask) (inner-template . org-context-inner-template) (italic . org-context-italic) (item . org-context-item) (keyword . org-context-keyword) (latex-environment . org-context-latex-environment) (latex-fragment . org-context-latex-fragment) (line-break . org-context-line-break) (link . org-context-link) (node-property . org-context-node-property) (paragraph . org-context-paragraph) ...) :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj/context/dem..." :attention nil :closing nil :context-block-source-environment ("OrgBlkSrc" . "\\definetyping[OrgBlkSrc][e...") :context-blockquote-environment ("OrgBlockQuote" . "\\definenarrower[OrgBlockQu...") :context-bullet-off-command ("OrgItemOff" . "\\define\\OrgItemOff{\\square...") :context-bullet-on-command ("OrgItemOn" . "\\define\\OrgItemOn{\\boxplus...") :context-bullet-trans-command ("OrgItemTrans" . "\\define\\OrgItemTrans{\\boxt...") ...))
  org-export-data((link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph ... ... #1 ...))) (:export-options nil :back-end #s(org-export-backend :name context :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ... ...) :blocks nil :menu (67 "Export to ConTeXt" ...)) :translate-alist ((bold . org-context-bold) (center-block . org-context-center-block) (clock . org-context-clock) (code . org-context-code) (drawer . org-context-drawer) (dynamic-block . org-context-dynamic-block) (entity . org-context-entity) (example-block . org-context-example-block) (export-block . org-context-export-block) (export-snippet . org-context-export-snippet) (fixed-width . org-context-fixed-width) (footnote-reference . org-context-footnote-reference) (headline . org-context-headline) (horizontal-rule . org-context-horizontal-rule) (inline-src-block . org-context-inline-src-block) (inlinetask . org-context-inlinetask) (inner-template . org-context-inner-template) (italic . org-context-italic) (item . org-context-item) (keyword . org-context-keyword) (latex-environment . org-context-latex-environment) (latex-fragment . org-context-latex-fragment) (line-break . org-context-line-break) (link . org-context-link) (node-property . org-context-node-property) (paragraph . org-context-paragraph) ...) :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj/context/dem..." :attention nil :closing nil :context-block-source-environment ("OrgBlkSrc" . "\\definetyping[OrgBlkSrc][e...") :context-blockquote-environment ("OrgBlockQuote" . "\\definenarrower[OrgBlockQu...") :context-bullet-off-command ("OrgItemOff" . "\\define\\OrgItemOff{\\square...") :context-bullet-on-command ("OrgItemOn" . "\\define\\OrgItemOn{\\boxplus...") :context-bullet-trans-command ("OrgItemTrans" . "\\define\\OrgItemTrans{\\boxt...") ...))
  #f(compiled-function (element) #<bytecode 0x15954d45d9a5>)((link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline ... #43)) (src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines ... :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (beer > 0) {     (ref:Jav..." :post-blank 1 :post-affiliated 4191 :caption ... :parent #43)) #27)) #("Here's a link to " 0 17 (:parent #27)) #1 #("\n" 0 1 (:parent #27))))))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d45d9a5>) (#("Here's a link to " 0 17 (:parent (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent ...) (src-block ...) #6)) . #2))) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent ...) (src-block ...) #30)) . #2))) #("\n" 0 1 (:parent (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent ...) (src-block ...) #8)) . #2)))) "")
  org-export-data((paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section ... ... #1)) #("Here's a link to " 0 17 (:parent #1)) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent #1)) #("\n" 0 1 (:parent #1))) (:export-options nil :back-end #s(org-export-backend :name context :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ... ...) :blocks nil :menu (67 "Export to ConTeXt" ...)) :translate-alist ((bold . org-context-bold) (center-block . org-context-center-block) (clock . org-context-clock) (code . org-context-code) (drawer . org-context-drawer) (dynamic-block . org-context-dynamic-block) (entity . org-context-entity) (example-block . org-context-example-block) (export-block . org-context-export-block) (export-snippet . org-context-export-snippet) (fixed-width . org-context-fixed-width) (footnote-reference . org-context-footnote-reference) (headline . org-context-headline) (horizontal-rule . org-context-horizontal-rule) (inline-src-block . org-context-inline-src-block) (inlinetask . org-context-inlinetask) (inner-template . org-context-inner-template) (italic . org-context-italic) (item . org-context-item) (keyword . org-context-keyword) (latex-environment . org-context-latex-environment) (latex-fragment . org-context-latex-fragment) (line-break . org-context-line-break) (link . org-context-link) (node-property . org-context-node-property) (paragraph . org-context-paragraph) ...) :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj/context/dem..." :attention nil :closing nil :context-block-source-environment ("OrgBlkSrc" . "\\definetyping[OrgBlkSrc][e...") :context-blockquote-environment ("OrgBlockQuote" . "\\definenarrower[OrgBlockQu...") :context-bullet-off-command ("OrgItemOff" . "\\define\\OrgItemOff{\\square...") :context-bullet-on-command ("OrgItemOn" . "\\define\\OrgItemOn{\\boxplus...") :context-bullet-trans-command ("OrgItemTrans" . "\\define\\OrgItemTrans{\\boxt...") ...))
  #f(compiled-function (element) #<bytecode 0x15954d6ba78d>)((paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 4129 :title (...) :parent (headline ... ... #33 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) #17)) (src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines (new . 0) :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (beer > 0) {     (ref:Jav..." :post-blank 1 :post-affiliated 4191 :caption ((...)) :parent #17)) #1)) #("Here's a link to " 0 17 (:parent #1)) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent #1)) #("\n" 0 1 (:parent #1))))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d6ba78d>) ((src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines (new . 0) :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (beer > 0) {     (ref:Jav..." :post-blank 1 :post-affiliated 4191 :caption (((#("99 Bottles of Beer in Javascript" 0 32 ...)))) :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 4129 :title ... :parent ...) #35)) . #2))) (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 4129 :title ... :parent ...) #20)) . #2)) #("Here's a link to " 0 17 (:parent #4)) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent #4)) #("\n" 0 1 (:parent #4)))) "")
  org-export-data((section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline ... #1)) (src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines ... :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (..." :post-blank 1 :post-affiliated 4191 ...)) (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent #1) #("Here's a link to " 0 17 ...) (link ...) #("\n" 0 1 ...))) (:export-options nil :back-end #s(org-export-backend :name context :parent nil :transcoders (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :options (... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :filters (... ... ... ...) :blocks nil :menu (67 "Export to ConTeXt" ...)) :translate-alist ((bold . org-context-bold) (center-block . org-context-center-block) (clock . org-context-clock) (code . org-context-code) (drawer . org-context-drawer) (dynamic-block . org-context-dynamic-block) (entity . org-context-entity) (example-block . org-context-example-block) (export-block . org-context-export-block) (export-snippet . org-context-export-snippet) (fixed-width . org-context-fixed-width) (footnote-reference . org-context-footnote-reference) (headline . org-context-headline) (horizontal-rule . org-context-horizontal-rule) (inline-src-block . org-context-inline-src-block) (inlinetask . org-context-inlinetask) (inner-template . org-context-inner-template) (italic . org-context-italic) (item . org-context-item) (keyword . org-context-keyword) (latex-environment . org-context-latex-environment) (latex-fragment . org-context-latex-fragment) (line-break . org-context-line-break) (link . org-context-link) (node-property . org-context-node-property) (paragraph . org-context-paragraph) ...) :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj/context/dem..." :attention nil :closing nil :context-block-source-environment ("OrgBlkSrc" . "\\definetyping[OrgBlkSrc][e...") :context-blockquote-environment ("OrgBlockQuote" . "\\definenarrower[OrgBlockQu...") :context-bullet-off-command ("OrgItemOff" . "\\define\\OrgItemOff{\\square...") :context-bullet-on-command ("OrgItemOn" . "\\define\\OrgItemOn{\\boxplus...") :context-bullet-trans-command ("OrgItemTrans" . "\\define\\OrgItemTrans{\\boxt...") ...))
  #f(compiled-function (element) #<bytecode 0x15954d6ba775>)((section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 4129 :title (#("Javascript" 0 10 ...)) :parent (headline (:raw-value "Source Blocks" :begin 3353 :end 18011 :pre-blank 0 :contents-begin 3371 :contents-end 18011 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 3353 :title ... :parent ...) (section ... ... ... ... ... ... ... ...) #17 (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...))) #1)) (src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines (new . 0) :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (beer > 0) {     (r..." :post-blank 1 :post-affiliated 4191 :caption (((...))) :parent #1)) (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent #1) #("Here's a link to " 0 17 (:parent #5)) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent #5)) #("\n" 0 1 (:parent #5)))))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d6ba775>) ((section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent (headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 4129 :title (#("Javascript" 0 10 ...)) :parent (headline (:raw-value "Source Blocks" :begin 3353 :end 18011 :pre-blank 0 :contents-begin 3371 :contents-end 18011 :level 3 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 3353 :title ... :parent ...) (section ... ... ... ... ... ... ... ...) #19 (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...) (headline ... ...))) . #2)) (src-block (:language "javascript" :switches "-n" :parameters nil :begin 4145 :end 4560 :number-lines (new . 0) :preserve-indent nil :retain-labels t :use-labels t :label-fmt nil :value "  var beer = 99;\n  while (beer > 0) {     (ref:Jav..." :post-blank 1 :post-affiliated 4191 :caption (((...))) :parent #3)) (paragraph (:begin 4560 :end 4591 :contents-begin 4560 :contents-end 4591 :post-blank 0 :post-affiliated 4560 :parent #3) #("Here's a link to " 0 17 (:parent #7)) (link (:type "coderef" :path "JavaRef" :format bracket :raw-link "(JavaRef)" :application nil :search-option nil :begin 4577 :end 4590 :contents-begin nil :contents-end nil :post-blank 0 :parent #7)) #("\n" 0 1 (:parent #7))))) "")
  org-export-data((headline ... ...) (:export-options nil :back-end ... :translate-alist ... :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj..." :attention nil ...))
  #f(compiled-function (element) #<bytecode 0x15954d767779>)((headline (:raw-value "Javascript" :begin 4129 :end 4593 :pre-blank 0 :contents-begin 4145 :contents-end 4591 :level 4 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil ...) (section (:begin 4145 :end 4593 :contents-begin 4145 :contents-end 4591 :post-blank 2 :post-affiliated 4145 :parent #1) (src-block ...) (paragraph ... ... ... ...))))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d767779>) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) "")
  org-export-data((headline ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (:export-options nil :back-end ... :translate-alist ... :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj..." :attention nil ...))
  #f(compiled-function (element) #<bytecode 0x15954d767621>)((headline ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d767621>) (... ... ... ... ... ... ...) "")
  org-export-data((headline ... ... ... ... ... ... ... ...) (:export-options nil :back-end ... :translate-alist ... :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj..." :attention nil ...))
  #f(compiled-function (element) #<bytecode 0x15954d767609>)((headline ... ... ... ... ... ... ... ...))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d767609>) (... ... ...) "")
  org-export-data((headline ... ... ... ...) (:export-options nil :back-end ... :translate-alist ... :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj..." :attention nil ...))
  #f(compiled-function (element) #<bytecode 0x15954d77d37d>)((headline ... ... ... ...))
  mapconcat(#f(compiled-function (element) #<bytecode 0x15954d77d37d>) (... ... ... ... ... ... ... ... ... ... ... ...) "")
  org-export-data((org-data nil ... ... ... ... ... ... ... ... ... ... ... ...) (:export-options nil :back-end ... :translate-alist ... :exported-data #<hash-table eq 144/4001 0x15954d66deed> :input-buffer "demo.org" :input-file "/home/gour/prj..." :attention nil ...))
  org-export-as(context nil nil nil (:output-file "demo.mkiv"))
  org-export-to-file(context "demo.mkiv" nil nil nil nil nil (lambda (file) (org-context-compile file)))
  (let ((outfile (org-export-output-file-name ".mkiv" subtreep))) (org-export-to-file 'context outfile async subtreep visible-only body-only ext-plist #'(lambda (file) (org-context-compile file))))
  org-context-export-to-pdf(nil nil nil nil)
  org-export-dispatch(nil)
  funcall-interactively(org-export-dispatch nil)
  #<subr call-interactively>(org-export-dispatch nil nil)
  apply(#<subr call-interactively> org-export-dispatch (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-export-dispatch nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (org-export-dispatch nil nil))
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)

Any hint?

Jason-S-Ross commented 3 years ago

I believe this is related to a change in the call signature for org-export-custom-protocol-maybe with version 9.4 of Org. This should work org version 9.4 or later. Can you confirm your org version?

gour commented 3 years ago

I believe this is related to a change in the call signature for org-export-custom-protocol-maybe with version 9.4 of Org. This should work org version 9.4 or later. Can you confirm your org version? Heh, another reason to move to Doom in order to not be bothered about updates. :-)

Updated to 9.4.5 and now I get the following:

context demo.mkiv 

resolvers       | formats | executing runner 'run luametatex format': /home/gour/opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="demo" --fmt=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui  --c:currentrun=1 --c:fulljobname="./demo.mkiv" --c:input="./demo.mkiv" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/gour/opt/lmtx/tex/texmf-linux-64/bin"
fonts           > beware: no fonts are loaded yet, using 'lm mono' in box
system          > 
system          > ConTeXt  ver: 2021.03.27 19:09 LMTX  fmt: 2021.3.28  int: english/english
system          > 
system          > 'cont-new.mkxl' loaded
open source     > level 1, order 1, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 1, order 1, name '/home/gour/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > files > jobname 'demo', input './demo.mkiv', result 'demo'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 1, order 2, name './demo.mkiv'
modules         > 'vim' is not found
system          > error: invalid parent subsubsubsubsubsubsubsubsubsubsubsubsubsubsection for subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionNoToc, subsubsubsubsubsubsubsubsubsubsubsubsubsubsection defined too (best check it)
system          > error: invalid parent subsubsubsubsubsubsubsubsubsubsubsubsubsubsection for subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionNoToc, subsubsubsubsubsubsubsubsubsubsubsubsubsubsection defined too (best check it)
system          > error: invalid parent subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionnumber for subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionNoTocnumber, subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionnumber defined too (best check it)
system          > error: invalid parent subsubsubsubsubsubsubsubsubsubsubsubsubsubsection for subsubsubsubsubsubsubsubsubsubsubsubsubsubsectionNoToc, subsubsubsubsubsubsubsubsubsubsubsubsubsubsection defined too (best check it)
publications    > no file 'bib.bib'

tex error       > tex error on line 45 in file ./demo.mkiv: Undefined control sequence

<recently read> \definevimtyping 

<line 3.45> \definevimtyping
    [OrgInlineSrcJavascript]

35        metadata:date={2021-01-07},
36        letter:foldmarks={stop},
37        letter:withbackaddress={start}]
38     \language[en]
39     %===============================================================================
40     % Define Environments and Commands
41     %===============================================================================
42     
43     % Turn on interaction to make links work
44     \setupinteraction[state=start]
45 >>  \definevimtyping[OrgInlineSrcJavascript]
46       [syntax=javascript,escape=command]
47     \definevimtyping[OrgBlkSrcJavascript]
48       [syntax=javascript,escape=command]
49     
50     \definevimtyping[OrgInlineSrcHtml]
51       [syntax=html,escape=command]
52     \definevimtyping[OrgBlkSrcHtml]
53       [syntax=html,escape=command]
54     
55     \definevimtyping[OrgInlineSrcCss]

The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.

mtx-context     | fatal error: return code: 256

Here is the line:

45 >>  \definevimtyping[OrgInlineSrcJavascript]

and I note modules > 'vim' is not found above?

Jason-S-Ross commented 3 years ago

The new ConTeXt (LMTX) doesn't ship with modules by default. Modules can be installed by following the instructions in the ConTeXt garden wiki. In case these instructions move, I'm copying them below

 # Transfer all modules from the ConTeXt Garden.
 #
 # No -p (--perms) is given to rsync, because, as of 2020-06-06, many
 # files (e.g. all files in
 # modules/t-letter/tex/context/third/letter/style) would come out
 # world-writeable, which may pose a significant security risk on a
 # multi-user system.
 #
 # The --chmod=D755,F644 may not be necessary. However, as of
 # 2020-06-06, without it files come out with executable bits set.
 rsync -rltsv --new-compress --delete --chmod=D755,F644    \
       rsync://contextgarden.net/minimals/current/modules/ \
       modules

 # Recreate tex/texmf-modules as an empty directory. WARNING: This
 # assumes that you have nothing but modules from ConTeXt Garden in
 # tex/texmf-modules.
 rm -rf tex/texmf-modules
 mkdir -p tex/texmf-modules

 # Create the union of all modules in tex/texmf-modules.
 for module in modules/* ; do
   rsync -rlts --exclude=/VERSION ${module}/ tex/texmf-modules
 done

 # Update the ConTeXt LMTX distribution. Alternatively, if you do not
 # want to do that, you have to run mtxrun --generate.
 sh ./install.sh

I've also fixed some bad relative paths in the demo file in 17dcdf3f60962c3ae9f5516cb13396e13ecff8f6 and with the header/footer in 0ea7e74236135d63d013eccaeffd0d3934e48b83 . 5bfb3745a9683ce47565b9f475434be8f4316056 fixes some issues with bibliographies and tables of enumerable items as well.

gour commented 3 years ago

The new ConTeXt (LMTX) doesn't ship with modules by default. Modules can be installed by following the instructions in the ConTeXt garden wiki. In case these instructions move, I'm copying them below

Thank you.

I've also fixed some bad relative paths in the demo file in 17dcdf3 and with the header/footer in 0ea7e74 . 5bfb374 fixes some issues with bibliographies and tables of enumerable items as well.

Now I get the following:

structures      > bookmark: Example Blocks
structure       > sectioning > subsubsubsection @ level 6 : 0.0.2.2.2.9 -> \OrgHeadline [Text={Example Blocks}]

tex error       > tex error on line 2127 in file ./demo.mkiv: Undefined control sequence

<line 3.2127> \startOrgExampleEnumerationEmtpy

2117     
2118     
2119     
2120     \startsubsubsubsection[title={\OrgHeadline
2121        [Text={Example Blocks}]},
2122        list={Example Blocks},
2123        marking={Example Blocks},
2124        bookmark={Example Blocks},
2125        reference={sec:org70db66a}]
2126     
2127 >>  \startOrgExampleEnumerationEmtpy
2128       [reference={orgd94dcc2}]
2129     \startOrgExample
2130     var beer = 99;
2131     while (beer > 0) {
2132         var verse = [
2133             beer + " bottles of beer on the wall,",
2134             beer + " bottles of beer!",
2135             "Take one down, pass it around",
2136             (beer - 1) + " bottles of beer on the wall!"
2137         ].join("\n");

The control sequence at the end of the top line of your error message was never
\def'ed. You can just continue as I'll forget about whatever was undefined.

mtx-context     | fatal error: return code: 256
Jason-S-Ross commented 3 years ago

That should have been fixed on e3b990880b899ae05c6c40b1b3d0ed5536cc32f3. Which version are you on?

gour commented 3 years ago

That should have been fixed on e3b9908. Which version are you on?

I'm on 5bfb3745.

Jason-S-Ross commented 3 years ago

Something's not adding up - the text startOrgExampleEnumerationEmtpy does not appear in 5bfb3745a9683ce47565b9f475434be8f4316056.

gour commented 3 years ago

Something's not adding up - the text startOrgExampleEnumerationEmtpy does not appear in 5bfb374.

Tried few times - cloning repo from the scratch, re-installed lmtx and moved examples to other directory and still get the same error. Inluding examples repo... examples.tar.gz

Any idea?

Jason-S-Ross commented 3 years ago

The issue is a typo in ox-context.el that's been corrected in later commits. If you're not replacing that exact file, it won't fix the issue. Also, you could be having a problem if you haven't restarted Emacs since getting the latest ox-context.el. Just to be certain, could you grep for startOrgExampleEnumerationEmtpy in your install directory if that doesn't help?

gour commented 3 years ago

My bad...I was pulling latest repo, but forgot to call/load it within Emacs. :blush:

Now, I have another problem:

[...]
tex error       > tex error on line 4603 in file ./demo.mkiv: 

lua error:

    registered function call [881]: [string "/home/gour/opt/lmtx/tex/texmf-context/tex/con..."]:902: missing number, treated as zero
stack traceback:
    [C]: in function 'tex.sp'
    [string "/home/gour/opt/lmtx/tex/texmf-context/tex/con..."]:902: in function <[string "/home/gour/opt/lmtx/tex/texmf-context/tex/con..."]:836>
    [C]: in function 'lpeg.match'
    [string "/home/gour/opt/lmtx/tex/texmf-context/tex/con..."]:929: in function <[string "/home/gour/opt/lmtx/tex/texmf-context/tex/con..."]:921>
    (...tail calls...)  

4593     
4594     \startsubsubsubsubsubsubsubsubsubsubsubsubsubsubsectionNoToc[title={\OrgHeadline
4595        [Todo={TODO},
4596        Priority={B},
4597        Text={Check Inline Task},
4598        Tags={tag1}]},
4599        list={Check Inline Task},
4600        marking={Check Inline Task},
4601        bookmark={Check Inline Task},
4602        reference={sec:orgf3afb4f}]
4603 >>  
4604     \OrgPlanning[
4605     DeadlineString={DEADLINE:},
4606     DeadlineTime={\date[d=31,m=01,y=2021]},
4607     ScheduledString={SCHEDULED:},
4608     ScheduledTime={\date[d=31,m=01,y=2021]},]
4609     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor
4610     tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis
4611     eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis
4612     parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor.
4613     Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum.

mtx-context     | fatal error: return code: 256
Jason-S-Ross commented 3 years ago

Try a (require 'org-inlinetask) in your config file. It's not enabled by default, so the inline task header is getting parsed as a subsubsubsubsubsubsubsubsubsubsubsubsubsubsection, which is more levels of nesting than ConTeXt can handle.

gour commented 3 years ago

Try a (require 'org-inlinetask) in your config file. It's not enabled by default, so the inline task header is getting parsed as a subsubsubsubsubsubsubsubsubsubsubsubsubsubsection, which is more levels of nesting than ConTeXt can handle.

Finally!!

It looks great and it will keep me busy studying it for some time. ;)

Jason-S-Ross commented 3 years ago

Great! Thank you for your patience as the first user :)