(Hi Shlomi!) When I export this to html, I get what looks to be the same error. Here's some info that may help track this down.
My org-version line: Org-mode version 8.3.4 (8.3.4-9-gfda14f-elpaplus @ c:/Users/bill/.emacs.d/elpa/org-plus-contrib-20160307/) The error I get: org-element--current-element: Wrong type argument: integer-or-marker-p, nil [2 times] The stack trace: Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) org-element-plain-list-parser(122 (86) ((28 2 "- " nil nil nil 51) (51 2 "-" nil nil nil 55) (55 2 "-" nil nil nil 59) (59 2 "-" nil nil nil 63) (63 2 "- " nil nil nil 99) (99 2 "- " nil nil nil 135) (135 2 "- " nil nil nil 158))) org-element--current-element(122 element nil ((28 2 "- " nil nil nil 51) (51 2 "-" nil nil nil 55) (55 2 "-" nil nil nil 59) (59 2 "-" nil nil nil 63) (63 2 "- " nil nil nil 99) (99 2 "- " nil nil nil 135) (135 2 "- " nil nil nil 158))) org-element--parse-to(101) org-element-at-point() org-element-context() org-babel-exp-process-buffer(#<buffer tmp.org<2><2>>) (unwind-protect (org-babel-exp-process-buffer reference) (kill-buffer reference)) (let ((reference (org-export-copy-buffer))) (unwind-protect (org-babel-exp-process-buffer reference) (kill-buffer reference))) org-export-execute-babel-code() (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list (quote org-export-backend) backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list (quote org-export-backend) backend))) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn nil (or (and (memq ... cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list ... backend))) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result (funcall filter info backend-name))) (if result (progn (setq info result)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let* ((date (plist-get info :date)) (value (or ... ""))) (if (and (consp date) (not ...) (eq ... ...)) (format "(eval (if (org-string-nw-p \"$1\") %s %S))" (format "(org-timestamp-format '%S \"$1\")" ...) value) value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if (not (functionp inner-template)) body (funcall inner-template body info)) info)) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (functionp template)) body-only) full-body (funcall template full-body info)) info)))) (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list (quote org-export-backend) backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or (and (memq ... cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list ... backend))) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn nil (or (and ...) (signal ... ...)) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result ...)) (if result (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let* ((date ...) (value ...)) (if (and ... ... ...) (format "(eval (if (org-string-nw-p \"$1\") %s %S))" ... value) value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if (not ...) body (funcall inner-template body info)) info)) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) full-body (funcall template full-body info)) info))))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or (and (memq ... cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list ... backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or (and ...) (signal ... ...)) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn nil (or ... ...) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let (...) (if result ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (let* (... ...) (if ... ... value))) (cons "email" (org-element-interpret-data (plist-get info :email))) (cons "title" (org-element-interpret-data (plist-get info :title))) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or ... ""))) (inner-template (cdr (assq ... ...))) (full-body (org-export-filter-apply-functions (plist-get info :filter-body) (if ... body ...) info)) (template (cdr (assq ... ...)))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) full-body (funcall template full-body info)) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or (and ...) (signal ... ...)) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn nil (or ... ...) (aref backend 1)))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (let ((backend-name (progn nil ... ...))) (let ((--dolist-tail-- ...) filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq --dolist-tail-- ...)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data ...)) (cons "date" (let* ... ...)) (cons "email" (org-element-interpret-data ...)) (cons "title" (org-element-interpret-data ...)) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string ...)) (inner-template (cdr ...)) (full-body (org-export-filter-apply-functions ... ... info)) (template (cdr ...))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... full-body ...) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))) (let* ((org-export-current-backend (progn nil (or (and (memq (aref backend 0) cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list (quote org-export-backend) backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list (and subtreep ...) (and visible-only ...) (and body-only ...)))) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function (lambda (o) (and ... ...))) (append (org-export-get-all-options backend) org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil (or ... ...) (aref backend 1))) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn nil ... ...))) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters (org-combine-plists info ...))) (let ((backend-name ...)) (let (... filter) (while --dolist-tail-- ... ... ...))) (org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons "email" ...) (cons "title" ...) (cons "results" "$1")) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body ...) (inner-template ...) (full-body ...) (template ...)) (org-no-properties (org-export-filter-apply-functions ... ... info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))) (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn nil (or (and (memq ... cl-struct-org-export-backend-tags)) (signal (quote wrong-type-argument) (list ... backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list ... ... ...))) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function (lambda ... ...)) (append (org-export-get-all-options backend) org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn nil ... ...)) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args ... ...)) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info (org-export-install-filters ...)) (let (...) (let ... ...)) (org-macro-replace-all (list ... ... ... ... ...) (quote finalize) parsed-keywords) (setq tree (org-element-parse-buffer nil visible-only)) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree (org-export-filter-apply-functions ... tree info)) (setq info (org-combine-plists info ...)) (let* (... ... ... ...) (org-no-properties ...)))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))))) (save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn nil (or (and ...) (signal ... ...)) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil ...)) (org-export--get-buffer-attributes))) (parsed-keywords (delq nil (mapcar (function ...) (append ... org-export-options-alist)))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args ... ...) (org-export-expand-include-keyword) (org-export--delete-comments) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates nil parsed-keywords) (org-set-regexps-and-options) (org-update-radio-target-regexp) (org-export-execute-babel-code) (org-set-regexps-and-options) (org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (org-set-regexps-and-options) (org-update-radio-target-regexp) (setq info ...) (let ... ...) (org-macro-replace-all ... ... parsed-keywords) (setq tree ...) (org-export--merge-external-footnote-definitions tree) (org-export--prune-tree tree info) (org-export--remove-uninterpreted-data tree info) (setq tree ...) (setq info ...) (let* ... ...))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer ... ...) (kill-buffer --buf-copy)))))))) org-export-as(html nil nil nil (:output-file "./tmp.html")) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ((coding-system-for-write encoding)) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file)) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message (current-message)) (message "%s" with-temp-message))) (let ((--copy-fun (org-export--generate-copy-script ...)) (--temp-file (make-temp-file "org-export-process")) (--coding buffer-file-coding-system)) (let ((temp-file --temp-file) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))) (let* ((process-connection-type nil) (--proc-buffer ...) (--process ...)) (org-export-add-to-stack (get-buffer --proc-buffer) nil --process) (let (...) (set-process-sentinel --process ...))))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let (...) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))) (let ((ext-plist (org-combine-plists (list (quote :output-file) file) ext-plist)) (encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message ...) (message "%s" with-temp-message))) (let ((--copy-fun ...) (--temp-file ...) (--coding buffer-file-coding-system)) (let (... ...) (unwind-protect ... ...)) (let* (... ... ...) (org-export-add-to-stack ... nil --process) (let ... ...)))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file)))) (if (not (file-writable-p file)) (error "Output file not writable") (let ((ext-plist (org-combine-plists (list (quote :output-file) file) ext-plist)) (encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn ... ...)) (let (... ... ...) (let ... ...) (let* ... ... ...))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ...) (and ... ...)))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))))) org-export-to-file(html "./tmp.html" nil nil nil nil nil) (let* ((extension (concat "." (or (plist-get ext-plist :html-extension) org-html-extension "html"))) (file (org-export-output-file-name extension subtreep)) (org-export-coding-system org-html-coding-system)) (org-export-to-file (quote html) file async subtreep visible-only body-only ext-plist)) org-html-export-to-html() funcall-interactively(org-html-export-to-html) call-interactively(org-html-export-to-html record nil) command-execute(org-html-export-to-html record) helm-M-x(nil "org-html-export-to-html") funcall-interactively(helm-M-x nil "org-html-export-to-html") call-interactively(helm-M-x nil nil) command-execute(helm-M-x) On Thu, Mar 10, 2016 at 7:46 AM Shlomi Vaknin <shlomivak...@gmail.com> wrote: > >> Its been in master since Jan 2015. > > Yeah, I guess I didnt update my packages in quite a while :P > > >> >> It works for me as does the same with `emacs-lisp' as the language >> under latex or html export to buffer or file using: Org-mode version >> 8.3.4 (release_8.3.4-635-g268486 ...) producing the expected document. >> >> Not sure what gives. Perhaps a mixed installation of org-mode? >> > > So I checked this (to the best of my knowledge), I searched and removed > everything that had to do with org-mode, got master, compiled and installed > it. (org-version) now gives "Org-mode version 8.3.4 > (release_8.3.4-635-g268486 @ ~/org-mode/org-mode/lisp/)" > > and although the minimal example I posted above *does* work now, my real > file does not. I managed to make another non-working example (should I make > a gif showing what I see?): > > --------------------------------------- > - src_elisp{3} {{{results(=3=)}}} > > * B > - src_elisp{3} {{{results(=3=)}}} > - > - > - > - src_elisp{3} {{{results(=3=)}}} > - src_elisp{2} {{{results(=2=)}}} > - {{{results(=2=)}}} > --------------------------------------- > > again, removing any line from this makes export work again. Otherwise I > get =org-element--current-element: Wrong type argument: > integer-or-marker-p, nil= > > This might be something silly, but I really dont know what else to do and > I am quite stuck, I need to present my org file to emacs-hostile people :| > > I have a new installation of emacs (used =find= to remove all other emacs > paths), new org-mode compiled from source (looked through =find= as well as > checked all 'load-path locations and removed anything I found) and no > custom init files.... What else could I check on my system? > > I am using a mac, if that makes any differences.. > > Thanks for your help! > > > >