* Bug: problem when exporting a org-mode file with a lots of code blocks
@ 2015-03-10 7:37 XIE Yuheng
2015-03-10 16:51 ` John Kitchin
2015-03-10 17:19 ` Charles Berry
0 siblings, 2 replies; 8+ messages in thread
From: XIE Yuheng @ 2015-03-10 7:37 UTC (permalink / raw)
To: emacs-orgmode
Bug: org-babel-parse-src-block-match reporting "Wrong type argument:
stringp, nil" when exporting a org-mode file with a lots of code blocks
[8.3beta (release_8.3beta-895-g375c83 @ /usr/share/emacs/site-lisp/org/)]
the following is *Messages* buffer
https://www.refheap.com/98243
the following is the org-mode file with a lot of code blocks
https://github.com/the-little-language-designer/cicada-nymph/blob/master/cicada-nymph.org
the following is an the fasm-mode I am using
https://github.com/the-little-language-designer/fasm-mode/blob/master/fasm-mode.el
Emacs : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7)
of 2015-01-18 on bisson
Package: Org-mode version 8.3beta (release_8.3beta-895-g375c83 @ /usr/share/emacs/site-lisp/org/)
current state:
==============
(setq
org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-html-format-drawer-function '(lambda (name contents) contents)
org-src-window-setup 'current-window
org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-babel-no-eval-on-ctrl-c-ctrl-c t
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-latex-format-drawer-function '(lambda (name contents) contents)
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer
(lambda nil (local-set-key (kbd "C-s C-s") (quote org-edit-src-exit))))
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '((lambda nil (local-set-key (kbd "C-,") (quote ska-jump-to-register))) t current-window 0 nil
#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-archive-hook '(org-attach-archive-delete-maybe)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-todo-keywords '((sequence "><" "|" "><><" "|" "><><><") (sequence "todo") (sequence "待") (sequence "note" "|" "test")
(sequence "記" "|" "測") (sequence "记" "|" "测"))
org-reveal-hlevel 2
org-babel-tangle-lang-exts '(("lisp" . "lisp") ("emacs-lisp" . "el") ("elisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-src-ask-before-returning-to-edit-buffer nil
org-edit-src-content-indentation 0
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-html-format-headline-function 'org-html-format-headline-default-function
org-structure-template-alist '(("sf" "#+end_src\n?\n#+begin_src" "<src lang=\"?\">\n\n</src>")
("s" "#+begin_src\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("picturef" "#+end_src\n?\n#+begin_src picture" "<src lang=\"?\">\n\n</src>")
("picture" "#+begin_src picture\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("yamlf" "#+end_src\n?\n#+begin_src yaml" "<src lang=\"?\">\n\n</src>")
("yaml" "#+begin_src yaml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("bnff" "#+end_src\n?\n#+begin_src bnf" "<src lang=\"?\">\n\n</src>")
("bnf" "#+begin_src bnf\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("coqf" "#+end_src\n?\n#+begin_src coq" "<src lang=\"?\">\n\n</src>")
("coq" "#+begin_src coq\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("ljf" "#+end_src\n?\n#+begin_src lojban" "<src lang=\"?\">\n\n</src>")
("lj" "#+begin_src lojban\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("ssf" "#+end_src\n?\n#+begin_src scheme" "<src lang=\"?\">\n\n</src>")
("ss" "#+begin_src scheme\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("lispf" "#+end_src\n?\n#+begin_src lisp" "<src lang=\"?\">\n\n</src>")
("lisp" "#+begin_src lisp\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("shenf" "#+end_src\n?\n#+begin_src shen" "<src lang=\"?\">\n\n</src>")
("shen" "#+begin_src shen\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("clojuref" "#+end_src\n?\n#+begin_src clojure" "<src lang=\"?\">\n\n</src>")
("clojure" "#+begin_src clojure\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("seef" "#+end_src\n?\n#+begin_src emacs-lisp :tangle \"~/.emacs\"" "<src lang=\"?\">\n\n</src>")
("see" "#+begin_src emacs-lisp :tangle \"~/.emacs\"\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("sef" "#+end_src\n?\n#+begin_src emacs-lisp" "<src lang=\"?\">\n\n</src>")
("se" "#+begin_src emacs-lisp\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("cf" "#+end_src\n?\n#+begin_src cicada" "<src lang=\"?\">\n\n</src>")
("c" "#+begin_src cicada\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("cnf" "#+end_src\n?\n#+begin_src cicada-nymph" "<src lang=\"?\">\n\n</src>")
("cn" "#+begin_src cicada-nymph\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("forthf" "#+end_src\n?\n#+begin_src forth" "<src lang=\"?\">\n\n</src>")
("forth" "#+begin_src forth\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("smlf" "#+end_src\n?\n#+begin_src sml" "<src lang=\"?\">\n\n</src>")
("sml" "#+begin_src sml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("camlf" "#+end_src\n?\n#+begin_src caml" "<src lang=\"?\">\n\n</src>")
("caml" "#+begin_src caml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("erlangf" "#+end_src\n?\n#+begin_src erlang" "<src lang=\"?\">\n\n</src>")
("erlang" "#+begin_src erlang\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("lfef" "#+end_src\n?\n#+begin_src lfe" "<src lang=\"?\">\n\n</src>")
("lfe" "#+begin_src lfe\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("fasmf" "#+end_src\n?\n#+begin_src fasm" "<src lang=\"?\">\n\n</src>")
("fasm" "#+begin_src fasm\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("nasmf" "#+end_src\n?\n#+begin_src nasm" "<src lang=\"?\">\n\n</src>")
("nasm" "#+begin_src nasm\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("Cf" "#+end_src\n?\n#+begin_src C" "<src lang=\"?\">\n\n</src>")
("C" "#+begin_src C\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("javaf" "#+end_src\n?\n#+begin_src java" "<src lang=\"?\">\n\n</src>")
("java" "#+begin_src java\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("jsf" "#+end_src\n?\n#+begin_src javascript" "<src lang=\"?\">\n\n</src>")
("js" "#+begin_src javascript\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("luaf" "#+end_src\n?\n#+begin_src lua" "<src lang=\"?\">\n\n</src>")
("lua" "#+begin_src lua\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("perlf" "#+end_src\n?\n#+begin_src perl" "<src lang=\"?\">\n\n</src>")
("perl" "#+begin_src perl\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("shf" "#+end_src\n?\n#+begin_src sh" "<src lang=\"?\">\n\n</src>")
("sh" "#+begin_src sh\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("sqlf" "#+end_src\n?\n#+begin_src sql :result value" "<src lang=\"?\">\n\n</src>")
("sql" "#+begin_src sql :result value\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("rubyf" "#+end_src\n?\n#+begin_src ruby" "<src lang=\"?\">\n\n</src>")
("ruby" "#+begin_src ruby\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("tclf" "#+end_src\n?\n#+begin_src tcl" "<src lang=\"?\">\n\n</src>")
("tcl" "#+begin_src tcl\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("hsf" "#+end_src\n?\n#+begin_src haskell" "<src lang=\"?\">\n\n</src>")
("hs" "#+begin_src haskell\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("xmonadf" "#+end_src\n?\n#+begin_src haskell :tangle \"~/.xmonad/xmonad.hs\""
"<src lang=\"?\">\n\n</src>")
("xmonad" "#+begin_src haskell :tangle \"~/.xmonad/xmonad.hs\"\n?\n#+end_src"
"<src lang=\"?\">\n\n</src>")
("conff" "#+end_src\n?\n#+begin_src conf :tangle " "<src lang=\"?\">\n\n</src>")
("conf" "#+begin_src conf :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("confuf" "#+end_src\n?\n#+begin_src conf-unix :tangle " "<src lang=\"?\">\n\n</src>")
("confu" "#+begin_src conf-unix :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
("confxf" "#+end_src\n?\n#+begin_src conf-xdefaults :tangle " "<src lang=\"?\">\n\n</src>")
("confx" "#+begin_src conf-xdefaults :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>"))
org-babel-load-languages '((scheme . t) (lisp . t) (emacs-lisp . t) (coq . t))
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-agenda-files "~/.org-agenda-files"
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-confirm-babel-evaluate nil
)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-10 7:37 Bug: problem when exporting a org-mode file with a lots of code blocks XIE Yuheng
@ 2015-03-10 16:51 ` John Kitchin
2015-03-10 17:19 ` Charles Berry
1 sibling, 0 replies; 8+ messages in thread
From: John Kitchin @ 2015-03-10 16:51 UTC (permalink / raw)
To: XIE Yuheng; +Cc: emacs-orgmode
I could not reproduce this on 8.2.10. I tangled 106 blocks out with no
errors.
XIE Yuheng writes:
> Bug: org-babel-parse-src-block-match reporting "Wrong type argument:
> stringp, nil" when exporting a org-mode file with a lots of code blocks
> [8.3beta (release_8.3beta-895-g375c83 @ /usr/share/emacs/site-lisp/org/)]
>
>
>
> the following is *Messages* buffer
> https://www.refheap.com/98243
> the following is the org-mode file with a lot of code blocks
> https://github.com/the-little-language-designer/cicada-nymph/blob/master/cicada-nymph.org
> the following is an the fasm-mode I am using
> https://github.com/the-little-language-designer/fasm-mode/blob/master/fasm-mode.el
>
>
> Emacs : GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7)
> of 2015-01-18 on bisson
> Package: Org-mode version 8.3beta (release_8.3beta-895-g375c83 @ /usr/share/emacs/site-lisp/org/)
>
>
>
> current state:
> ==============
> (setq
> org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
> org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
> org-occur-hook '(org-first-headline-recenter)
> org-metaup-hook '(org-babel-load-in-session-maybe)
> org-html-format-drawer-function '(lambda (name contents) contents)
> org-src-window-setup 'current-window
> org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
> org-confirm-shell-link-function 'yes-or-no-p
> org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
> org-babel-no-eval-on-ctrl-c-ctrl-c t
> org-latex-format-headline-function 'org-latex-format-headline-default-function
> org-after-todo-state-change-hook '(org-clock-out-if-current)
> org-latex-format-drawer-function '(lambda (name contents) contents)
> org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer
> (lambda nil (local-set-key (kbd "C-s C-s") (quote org-edit-src-exit))))
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-babel-pre-tangle-hook '(save-buffer)
> org-mode-hook '((lambda nil (local-set-key (kbd "C-,") (quote ska-jump-to-register))) t current-window 0 nil
> #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
> #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
> org-babel-result-hide-spec org-babel-hide-all-hashes)
> org-archive-hook '(org-attach-archive-delete-maybe)
> org-ascii-format-drawer-function '(lambda (name contents width) contents)
> org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines
> org-optimize-window-after-visibility-change)
> org-todo-keywords '((sequence "><" "|" "><><" "|" "><><><") (sequence "todo") (sequence "待") (sequence "note" "|" "test")
> (sequence "記" "|" "測") (sequence "记" "|" "测"))
> org-reveal-hlevel 2
> org-babel-tangle-lang-exts '(("lisp" . "lisp") ("emacs-lisp" . "el") ("elisp" . "el"))
> org-confirm-elisp-link-function 'yes-or-no-p
> org-src-ask-before-returning-to-edit-buffer nil
> org-edit-src-content-indentation 0
> org-metadown-hook '(org-babel-pop-to-session-maybe)
> org-html-format-headline-function 'org-html-format-headline-default-function
> org-structure-template-alist '(("sf" "#+end_src\n?\n#+begin_src" "<src lang=\"?\">\n\n</src>")
> ("s" "#+begin_src\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("picturef" "#+end_src\n?\n#+begin_src picture" "<src lang=\"?\">\n\n</src>")
> ("picture" "#+begin_src picture\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("yamlf" "#+end_src\n?\n#+begin_src yaml" "<src lang=\"?\">\n\n</src>")
> ("yaml" "#+begin_src yaml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("bnff" "#+end_src\n?\n#+begin_src bnf" "<src lang=\"?\">\n\n</src>")
> ("bnf" "#+begin_src bnf\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("coqf" "#+end_src\n?\n#+begin_src coq" "<src lang=\"?\">\n\n</src>")
> ("coq" "#+begin_src coq\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("ljf" "#+end_src\n?\n#+begin_src lojban" "<src lang=\"?\">\n\n</src>")
> ("lj" "#+begin_src lojban\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("ssf" "#+end_src\n?\n#+begin_src scheme" "<src lang=\"?\">\n\n</src>")
> ("ss" "#+begin_src scheme\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("lispf" "#+end_src\n?\n#+begin_src lisp" "<src lang=\"?\">\n\n</src>")
> ("lisp" "#+begin_src lisp\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("shenf" "#+end_src\n?\n#+begin_src shen" "<src lang=\"?\">\n\n</src>")
> ("shen" "#+begin_src shen\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("clojuref" "#+end_src\n?\n#+begin_src clojure" "<src lang=\"?\">\n\n</src>")
> ("clojure" "#+begin_src clojure\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("seef" "#+end_src\n?\n#+begin_src emacs-lisp :tangle \"~/.emacs\"" "<src lang=\"?\">\n\n</src>")
> ("see" "#+begin_src emacs-lisp :tangle \"~/.emacs\"\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("sef" "#+end_src\n?\n#+begin_src emacs-lisp" "<src lang=\"?\">\n\n</src>")
> ("se" "#+begin_src emacs-lisp\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("cf" "#+end_src\n?\n#+begin_src cicada" "<src lang=\"?\">\n\n</src>")
> ("c" "#+begin_src cicada\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("cnf" "#+end_src\n?\n#+begin_src cicada-nymph" "<src lang=\"?\">\n\n</src>")
> ("cn" "#+begin_src cicada-nymph\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("forthf" "#+end_src\n?\n#+begin_src forth" "<src lang=\"?\">\n\n</src>")
> ("forth" "#+begin_src forth\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("smlf" "#+end_src\n?\n#+begin_src sml" "<src lang=\"?\">\n\n</src>")
> ("sml" "#+begin_src sml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("camlf" "#+end_src\n?\n#+begin_src caml" "<src lang=\"?\">\n\n</src>")
> ("caml" "#+begin_src caml\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("erlangf" "#+end_src\n?\n#+begin_src erlang" "<src lang=\"?\">\n\n</src>")
> ("erlang" "#+begin_src erlang\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("lfef" "#+end_src\n?\n#+begin_src lfe" "<src lang=\"?\">\n\n</src>")
> ("lfe" "#+begin_src lfe\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("fasmf" "#+end_src\n?\n#+begin_src fasm" "<src lang=\"?\">\n\n</src>")
> ("fasm" "#+begin_src fasm\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("nasmf" "#+end_src\n?\n#+begin_src nasm" "<src lang=\"?\">\n\n</src>")
> ("nasm" "#+begin_src nasm\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("Cf" "#+end_src\n?\n#+begin_src C" "<src lang=\"?\">\n\n</src>")
> ("C" "#+begin_src C\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("javaf" "#+end_src\n?\n#+begin_src java" "<src lang=\"?\">\n\n</src>")
> ("java" "#+begin_src java\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("jsf" "#+end_src\n?\n#+begin_src javascript" "<src lang=\"?\">\n\n</src>")
> ("js" "#+begin_src javascript\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("luaf" "#+end_src\n?\n#+begin_src lua" "<src lang=\"?\">\n\n</src>")
> ("lua" "#+begin_src lua\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("perlf" "#+end_src\n?\n#+begin_src perl" "<src lang=\"?\">\n\n</src>")
> ("perl" "#+begin_src perl\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("shf" "#+end_src\n?\n#+begin_src sh" "<src lang=\"?\">\n\n</src>")
> ("sh" "#+begin_src sh\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("sqlf" "#+end_src\n?\n#+begin_src sql :result value" "<src lang=\"?\">\n\n</src>")
> ("sql" "#+begin_src sql :result value\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("rubyf" "#+end_src\n?\n#+begin_src ruby" "<src lang=\"?\">\n\n</src>")
> ("ruby" "#+begin_src ruby\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("tclf" "#+end_src\n?\n#+begin_src tcl" "<src lang=\"?\">\n\n</src>")
> ("tcl" "#+begin_src tcl\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("hsf" "#+end_src\n?\n#+begin_src haskell" "<src lang=\"?\">\n\n</src>")
> ("hs" "#+begin_src haskell\n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("xmonadf" "#+end_src\n?\n#+begin_src haskell :tangle \"~/.xmonad/xmonad.hs\""
> "<src lang=\"?\">\n\n</src>")
> ("xmonad" "#+begin_src haskell :tangle \"~/.xmonad/xmonad.hs\"\n?\n#+end_src"
> "<src lang=\"?\">\n\n</src>")
> ("conff" "#+end_src\n?\n#+begin_src conf :tangle " "<src lang=\"?\">\n\n</src>")
> ("conf" "#+begin_src conf :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("confuf" "#+end_src\n?\n#+begin_src conf-unix :tangle " "<src lang=\"?\">\n\n</src>")
> ("confu" "#+begin_src conf-unix :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>")
> ("confxf" "#+end_src\n?\n#+begin_src conf-xdefaults :tangle " "<src lang=\"?\">\n\n</src>")
> ("confx" "#+begin_src conf-xdefaults :tangle \n?\n#+end_src" "<src lang=\"?\">\n\n</src>"))
> org-babel-load-languages '((scheme . t) (lisp . t) (emacs-lisp . t) (coq . t))
> org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
> org-agenda-files "~/.org-agenda-files"
> org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> org-confirm-babel-evaluate nil
> )
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-10 7:37 Bug: problem when exporting a org-mode file with a lots of code blocks XIE Yuheng
2015-03-10 16:51 ` John Kitchin
@ 2015-03-10 17:19 ` Charles Berry
2015-03-10 21:22 ` [PATCH} " Charles C. Berry
1 sibling, 1 reply; 8+ messages in thread
From: Charles Berry @ 2015-03-10 17:19 UTC (permalink / raw)
To: emacs-orgmode
XIE Yuheng <xyheme <at> gmail.com> writes:
>
>
> Bug: org-babel-parse-src-block-match reporting "Wrong type argument:
> stringp, nil" when exporting a org-mode file with a lots of code blocks
> [8.3beta (release_8.3beta-895-g375c83 <at>
> /usr/share/emacs/site-lisp/org/)]
>
> the following is *Messages* buffer
> https://www.refheap.com/98243
> the following is the org-mode file with a lot of code blocks
> https://github.com/the-little-language-designer/cicada-nymph/blob/
master/cicada-nymph.org
Look at the *Messages* buffer and you will see a list of src blocks that were
processed without error.
The src block *after* the last block in the list (before the error message)
caused the error.
`org-babel-parse-src-block-match' expects a language for a src block.
Specify a language for every src block and it will export.
HTH,
Chuck
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH} Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-10 17:19 ` Charles Berry
@ 2015-03-10 21:22 ` Charles C. Berry
2015-03-11 7:40 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Charles C. Berry @ 2015-03-10 21:22 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1305 bytes --]
The patch causes an informative error message to be reported for src
blocks like this (no language):
#+begin_src
(+ 1 2)
#_end_src
when exporting instead of failing with a cryptic error message.
Arguably, it would be better to skip the malformed src block as
`org-babel-map-src-blocks' does or (as per John's message)
org-babel-tangle does.
WDYT?
Chuck
On Tue, 10 Mar 2015, Charles Berry wrote:
> XIE Yuheng <xyheme <at> gmail.com> writes:
>
>>
>>
>> Bug: org-babel-parse-src-block-match reporting "Wrong type argument:
>> stringp, nil" when exporting a org-mode file with a lots of code blocks
>> [8.3beta (release_8.3beta-895-g375c83 <at>
>> /usr/share/emacs/site-lisp/org/)]
>>
>> the following is *Messages* buffer
>> https://www.refheap.com/98243
>> the following is the org-mode file with a lot of code blocks
>> https://github.com/the-little-language-designer/cicada-nymph/blob/
> master/cicada-nymph.org
>
>
> Look at the *Messages* buffer and you will see a list of src blocks that were
> processed without error.
>
> The src block *after* the last block in the list (before the error message)
> caused the error.
>
> `org-babel-parse-src-block-match' expects a language for a src block.
>
> Specify a language for every src block and it will export.
>
> HTH,
>
> Chuck
>
>
>
[-- Attachment #2: Better error for bad src block --]
[-- Type: TEXT/PLAIN, Size: 1333 bytes --]
From f9859c09c5ad4790ef94d87477e7dfb97f264880 Mon Sep 17 00:00:00 2001
From: Charles Berry <ccberry@ucsd.edu>
Date: Tue, 10 Mar 2015 14:09:52 -0700
Subject: [PATCH] ob-exp.el: org-babel-exp-process-buffer reports src block w/o
language
* lisp/ob-exp.el (org-babel-exp-process-buffer): Issue an error when a
src block with neither language nor headers is processed.
Throw an error with an informative message when trying to export buffer
containing `#+src_block\n'.
Reported-by: XIE Yuheng <xyheme@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95920>
---
lisp/ob-exp.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 4c53a55..d17e49f 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -268,7 +268,11 @@ may make them unreachable."
;; the block should be left as-is while an empty
;; string should remove the block.
(let ((replacement
- (progn (goto-char match-start)
+ (progn (when (null (car headers))
+ (error
+ "No src block language or headers at line %S"
+ (line-number-at-pos)))
+ (goto-char match-start)
(org-babel-exp-src-block headers))))
(cond ((not replacement) (goto-char end))
((equal replacement "")
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH} Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-10 21:22 ` [PATCH} " Charles C. Berry
@ 2015-03-11 7:40 ` Nicolas Goaziou
2015-03-11 11:16 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2015-03-11 7:40 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode
Hello,
"Charles C. Berry" <ccberry@ucsd.edu> writes:
> The patch causes an informative error message to be reported for src
> blocks like this (no language):
>
> #+begin_src
> (+ 1 2)
> #_end_src
Thanks. However could you move the check for language earlier (i.e.,
right after "(src-block ...)")?
> Arguably, it would be better to skip the malformed src block as
> `org-babel-map-src-blocks' does or (as per John's message)
> org-babel-tangle does.
The current trend is to throw an error when something is missing during
export (e.g., a footnote definition, a macro template). So it's fine.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH} Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-11 7:40 ` Nicolas Goaziou
@ 2015-03-11 11:16 ` Nicolas Goaziou
2015-03-12 2:30 ` Charles C. Berry
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2015-03-11 11:16 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> "Charles C. Berry" <ccberry@ucsd.edu> writes:
>
>> The patch causes an informative error message to be reported for src
>> blocks like this (no language):
>>
>> #+begin_src
>> (+ 1 2)
>> #_end_src
>
> Thanks. However could you move the check for language earlier (i.e.,
> right after "(src-block ...)")?
Also, `line-number-at-pos' is not a reliable information in this case
(preceding block might have modified the buffer anyway).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH} Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-11 11:16 ` Nicolas Goaziou
@ 2015-03-12 2:30 ` Charles C. Berry
2015-03-13 8:12 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Charles C. Berry @ 2015-03-12 2:30 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
On Wed, 11 Mar 2015, Nicolas Goaziou wrote:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> "Charles C. Berry" <ccberry@ucsd.edu> writes:
>>
>>> The patch causes an informative error message to be reported for src
>>> blocks like this (no language):
>>>
>>> #+begin_src
>>> (+ 1 2)
>>> #_end_src
>>
>> Thanks. However could you move the check for language earlier (i.e.,
>> right after "(src-block ...)")?
>
Done -- lines 3--6 below "(src-block ".
> Also, `line-number-at-pos' is not a reliable information in this case
> (preceding block might have modified the buffer anyway).
>
It now reports the src-block name (if any).
Pushed to master.
Chuck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH} Re: Bug: problem when exporting a org-mode file with a lots of code blocks
2015-03-12 2:30 ` Charles C. Berry
@ 2015-03-13 8:12 ` Nicolas Goaziou
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2015-03-13 8:12 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode
"Charles C. Berry" <ccberry@ucsd.edu> writes:
> Done -- lines 3--6 below "(src-block ".
Thank you.
> It now reports the src-block name (if any).
OK.
Regards,
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-03-13 8:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 7:37 Bug: problem when exporting a org-mode file with a lots of code blocks XIE Yuheng
2015-03-10 16:51 ` John Kitchin
2015-03-10 17:19 ` Charles Berry
2015-03-10 21:22 ` [PATCH} " Charles C. Berry
2015-03-11 7:40 ` Nicolas Goaziou
2015-03-11 11:16 ` Nicolas Goaziou
2015-03-12 2:30 ` Charles C. Berry
2015-03-13 8:12 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.