Hello,

a few weeks ago, I noted a problem that arose with the more recent
versions of emacs (I track emacs-snapshot for ubuntu):

    http://article.gmane.org/gmane.emacs.orgmode/76519/

The problem does not arise with the emacs 24 version distributed with
ubuntu 13.04. I had hoped that this problem would disappear but I have
upgraded emacs-snapshot two or three times since and the problem
continues.

To summarise, exporting an org file fails if there are any babel calls
(i.e. #+call: or inline call_).  The error is "Marker points into wrong
buffer".  I have verified this with =emacs -Q=.  I'm attaching a test
file along with the resulting backtrace from =org-export-dispatch=,
choosing export to LaTeX.

Yes, I can go back to an older version of emacs but that avoids getting
the problem fixed.  I have not filed an emacs bug report as I have only
run into this problem with org.  I was hoping that somebody here could
have a look.  I am happy to help in any way I can.  Too many (most!) of
my org files make use of babel now...

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.2.1-84-g2829fd
#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga

* babel test
#+name: test
#+begin_src emacs-lisp :var x=5
  (list x)
#+end_src

#+call: test('(a b c))

I should be able to put the output inline using call_test('(e f g)).
Debugger entered--Lisp error: (error "Marker points into wrong buffer" #<marker 
at 148 in examplebug.org<2>>)
  goto-char(#<marker at 148 in examplebug.org<2>>)
  (progn (goto-char org-babel-current-src-block-location))
  (if org-babel-current-src-block-location (progn (goto-char 
org-babel-current-src-block-location)))
  (save-excursion (if org-babel-current-src-block-location (progn (goto-char 
org-babel-current-src-block-location))) (org-babel-read ref))
  (let ((out (save-excursion (if org-babel-current-src-block-location (progn 
(goto-char org-babel-current-src-block-location))) (org-babel-read ref)))) (if 
(equal out ref) (if (string-match "^\".*\"$" ref) (read ref) 
(org-babel-ref-resolve ref)) out))
  (cons (intern var) (let ((out (save-excursion (if 
org-babel-current-src-block-location (progn (goto-char 
org-babel-current-src-block-location))) (org-babel-read ref)))) (if (equal out 
ref) (if (string-match "^\".*\"$" ref) (read ref) (org-babel-ref-resolve ref)) 
out)))
  (let ((var (match-string 1 assignment)) (ref (match-string 2 assignment))) 
(cons (intern var) (let ((out (save-excursion (if 
org-babel-current-src-block-location (progn ...)) (org-babel-read ref)))) (if 
(equal out ref) (if (string-match "^\".*\"$" ref) (read ref) 
(org-babel-ref-resolve ref)) out))))
  (progn (let ((var (match-string 1 assignment)) (ref (match-string 2 
assignment))) (cons (intern var) (let ((out (save-excursion (if 
org-babel-current-src-block-location ...) (org-babel-read ref)))) (if (equal 
out ref) (if (string-match "^\".*\"$" ref) (read ref) (org-babel-ref-resolve 
ref)) out)))))
  (if (string-match org-babel-ref-split-regexp assignment) (progn (let ((var 
(match-string 1 assignment)) (ref (match-string 2 assignment))) (cons (intern 
var) (let ((out (save-excursion ... ...))) (if (equal out ref) (if 
(string-match "^\".*\"$" ref) (read ref) (org-babel-ref-resolve ref)) out))))))
  org-babel-ref-parse("results=test('(a b c) )")
  (if (consp (cdr el)) (cdr el) (org-babel-ref-parse (cdr el)))
  (lambda (el) (if (consp (cdr el)) (cdr el) (org-babel-ref-parse (cdr 
el))))((:var . "results=test('(a b c) )"))
  mapcar((lambda (el) (if (consp (cdr el)) (cdr el) (org-babel-ref-parse (cdr 
el)))) ((:var . "results=test('(a b c) )")))
  (let* ((processed-vars (mapcar (function (lambda (el) (if (consp ...) (cdr 
el) (org-babel-ref-parse ...)))) (org-babel-get-header params :var))) 
(vars-and-names (if (and (assoc :colname-names params) (assoc :rowname-names 
params)) (list processed-vars) (org-babel-disassemble-tables processed-vars 
(cdr (assoc :hlines params)) (cdr (assoc :colnames params)) (cdr (assoc 
:rownames params))))) (raw-result (or (cdr (assoc :results params)) "")) 
(result-params (append (split-string (if (stringp raw-result) raw-result (eval 
raw-result))) (cdr (assoc :result-params params))))) (append (mapcar (function 
(lambda (var) (cons :var var))) (car vars-and-names)) (list (cons 
:colname-names (or (cdr (assoc :colname-names params)) (cadr vars-and-names))) 
(cons :rowname-names (or (cdr (assoc :rowname-names params)) (car (cdr (cdr 
vars-and-names))))) (cons :result-params result-params) (cons :result-type 
(cond ((member "output" result-params) (quote output)) ((member "value" 
result-params) (quote value)) (t (quote value))))) (org-babel-get-header params 
:var (quote other))))
  org-babel-process-params(((:comments . "") (:shebang . "") (:cache . "no") 
(:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "results") 
(:results . "replace") (:var . "results=test('(a b c) )") (:session . "none") 
(:hlines . "no")))
  (setq results (org-babel-process-params (org-babel-merge-params (nth 2 info) 
(list (cons (quote :results) (if silent "silent" "replace"))))))
  (save-restriction (if heading (progn (condition-case nil (let 
((org-link-search-inhibit-query t)) (org-link-search heading)) (error (if 
heading (progn (goto-char ...) (re-search-forward ... nil t))))))) (setq 
results (org-babel-process-params (org-babel-merge-params (nth 2 info) (list 
(cons (quote :results) (if silent "silent" "replace")))))))
  (progn (set-buffer original-buffer) (save-restriction (if heading (progn 
(condition-case nil (let ((org-link-search-inhibit-query t)) (org-link-search 
heading)) (error (if heading (progn ... ...)))))) (setq results 
(org-babel-process-params (org-babel-merge-params (nth 2 info) (list (cons 
(quote :results) (if silent "silent" "replace"))))))) (set-buffer 
export-buffer) results)
  (if original-buffer (progn (set-buffer original-buffer) (save-restriction (if 
heading (progn (condition-case nil (let (...) (org-link-search heading)) (error 
(if heading ...))))) (setq results (org-babel-process-params 
(org-babel-merge-params (nth 2 info) (list (cons ... ...)))))) (set-buffer 
export-buffer) results))
  (let* ((lang-headers (intern (concat "org-babel-default-header-args:" lang))) 
(heading (nth 4 (condition-case nil (progn (org-heading-components)) (error 
nil)))) (export-buffer (current-buffer)) (original-buffer 
(org-babel-exp-get-export-buffer)) results) (if original-buffer (progn 
(set-buffer original-buffer) (save-restriction (if heading (progn 
(condition-case nil (let ... ...) (error ...)))) (setq results 
(org-babel-process-params (org-babel-merge-params (nth 2 info) (list ...))))) 
(set-buffer export-buffer) results)))
  (setcar c (let* ((lang-headers (intern (concat 
"org-babel-default-header-args:" lang))) (heading (nth 4 (condition-case nil 
(progn (org-heading-components)) (error nil)))) (export-buffer 
(current-buffer)) (original-buffer (org-babel-exp-get-export-buffer)) results) 
(if original-buffer (progn (set-buffer original-buffer) (save-restriction (if 
heading (progn (condition-case nil ... ...))) (setq results 
(org-babel-process-params (org-babel-merge-params ... ...)))) (set-buffer 
export-buffer) results))))
  (let* ((c (nthcdr 2 info))) (setcar c (let* ((lang-headers (intern (concat 
"org-babel-default-header-args:" lang))) (heading (nth 4 (condition-case nil 
(progn ...) (error nil)))) (export-buffer (current-buffer)) (original-buffer 
(org-babel-exp-get-export-buffer)) results) (if original-buffer (progn 
(set-buffer original-buffer) (save-restriction (if heading (progn ...)) (setq 
results (org-babel-process-params ...))) (set-buffer export-buffer) results)))))
  (prog1 nil (let* ((c (nthcdr 1 info))) (setcar c body)) (let* ((c (nthcdr 2 
info))) (setcar c (let* ((lang-headers (intern (concat 
"org-babel-default-header-args:" lang))) (heading (nth 4 (condition-case nil 
... ...))) (export-buffer (current-buffer)) (original-buffer 
(org-babel-exp-get-export-buffer)) results) (if original-buffer (progn 
(set-buffer original-buffer) (save-restriction (if heading ...) (setq results 
...)) (set-buffer export-buffer) results))))) (cond ((equal type (quote block)) 
(org-babel-execute-src-block nil info)) ((equal type (quote inline)) 
(re-search-backward "[ \f      \n
]" nil t) (re-search-forward org-babel-inline-src-block-regexp nil t) 
(re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) 
((equal type (quote lob)) (save-excursion (re-search-backward 
org-babel-lob-one-liner-regexp nil t) (let (org-confirm-babel-evaluate) 
(org-babel-execute-src-block nil info))))))
  (progn (org-babel-eval-wipe-error-buffer) (prog1 nil (let* ((c (nthcdr 1 
info))) (setcar c body)) (let* ((c (nthcdr 2 info))) (setcar c (let* 
((lang-headers (intern ...)) (heading (nth 4 ...)) (export-buffer 
(current-buffer)) (original-buffer (org-babel-exp-get-export-buffer)) results) 
(if original-buffer (progn (set-buffer original-buffer) (save-restriction ... 
...) (set-buffer export-buffer) results))))) (cond ((equal type (quote block)) 
(org-babel-execute-src-block nil info)) ((equal type (quote inline)) 
(re-search-backward "[ \f    \n
]" nil t) (re-search-forward org-babel-inline-src-block-regexp nil t) 
(re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) 
((equal type (quote lob)) (save-excursion (re-search-backward 
org-babel-lob-one-liner-regexp nil t) (let (org-confirm-babel-evaluate) 
(org-babel-execute-src-block nil info)))))))
  (if (fboundp (intern (concat "org-babel-execute:" lang))) (progn 
(org-babel-eval-wipe-error-buffer) (prog1 nil (let* ((c (nthcdr 1 info))) 
(setcar c body)) (let* ((c (nthcdr 2 info))) (setcar c (let* ((lang-headers 
...) (heading ...) (export-buffer ...) (original-buffer ...) results) (if 
original-buffer (progn ... ... ... results))))) (cond ((equal type (quote 
block)) (org-babel-execute-src-block nil info)) ((equal type (quote inline)) 
(re-search-backward "[ \f     \n
]" nil t) (re-search-forward org-babel-inline-src-block-regexp nil t) 
(re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) 
((equal type (quote lob)) (save-excursion (re-search-backward 
org-babel-lob-one-liner-regexp nil t) (let (org-confirm-babel-evaluate) 
(org-babel-execute-src-block nil info))))))))
  (let ((lang (nth 0 info)) (body (if (org-babel-noweb-p (nth 2 info) :eval) 
(org-babel-expand-noweb-references info (org-babel-exp-get-export-buffer)) (nth 
1 info))) (info (copy-sequence info)) (org-babel-current-src-block-location 
(point-marker))) (if (fboundp (intern (concat "org-babel-execute:" lang))) 
(progn (org-babel-eval-wipe-error-buffer) (prog1 nil (let* ((c (nthcdr 1 
info))) (setcar c body)) (let* ((c (nthcdr 2 info))) (setcar c (let* (... ... 
... ... results) (if original-buffer ...)))) (cond ((equal type (quote block)) 
(org-babel-execute-src-block nil info)) ((equal type (quote inline)) 
(re-search-backward "[ \f        \n
]" nil t) (re-search-forward org-babel-inline-src-block-regexp nil t) 
(re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) 
((equal type (quote lob)) (save-excursion (re-search-backward 
org-babel-lob-one-liner-regexp nil t) (let ... ...))))))))
  (progn (let ((lang (nth 0 info)) (body (if (org-babel-noweb-p (nth 2 info) 
:eval) (org-babel-expand-noweb-references info 
(org-babel-exp-get-export-buffer)) (nth 1 info))) (info (copy-sequence info)) 
(org-babel-current-src-block-location (point-marker))) (if (fboundp (intern 
(concat "org-babel-execute:" lang))) (progn (org-babel-eval-wipe-error-buffer) 
(prog1 nil (let* ((c ...)) (setcar c body)) (let* ((c ...)) (setcar c (let* ... 
...))) (cond ((equal type ...) (org-babel-execute-src-block nil info)) ((equal 
type ...) (re-search-backward "[ \f \n
]" nil t) (re-search-forward org-babel-inline-src-block-regexp nil t) 
(re-search-backward "src_" nil t) (org-babel-execute-src-block nil info)) 
((equal type ...) (save-excursion ... ...))))))))
  (if (and (or (eq org-export-babel-evaluate t) (and (eq type (quote inline)) 
(eq org-export-babel-evaluate (quote inline-only)))) (not (and hash (equal hash 
(org-babel-current-result-hash))))) (progn (let ((lang (nth 0 info)) (body (if 
(org-babel-noweb-p (nth 2 info) :eval) (org-babel-expand-noweb-references info 
(org-babel-exp-get-export-buffer)) (nth 1 info))) (info (copy-sequence info)) 
(org-babel-current-src-block-location (point-marker))) (if (fboundp (intern 
(concat "org-babel-execute:" lang))) (progn (org-babel-eval-wipe-error-buffer) 
(prog1 nil (let* (...) (setcar c body)) (let* (...) (setcar c ...)) (cond (... 
...) (... ... ... ... ...) (... ...))))))))
  org-babel-exp-results(("emacs-lisp" "results" ((:comments . "") (:shebang . 
"") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports 
. "results") (:results . "replace") (:var . "results=test('(a b c) )") (:hlines 
. "no") (:session . "none")) "" nil 0) lob nil nil)
  (cond ((memql --cl-var-- (quote (quote none))) (funcall silently) (funcall 
clean) "") ((memql --cl-var-- (quote (quote code))) (funcall silently) (funcall 
clean) (org-babel-exp-code info)) ((memql --cl-var-- (quote (quote results))) 
(org-babel-exp-results info type nil hash) "") ((memql --cl-var-- (quote (quote 
both))) (org-babel-exp-results info type nil hash) (org-babel-exp-code info)))
  (let ((--cl-var-- (intern (or (cdr (assoc :exports (nth 2 info))) "code")))) 
(cond ((memql --cl-var-- (quote (quote none))) (funcall silently) (funcall 
clean) "") ((memql --cl-var-- (quote (quote code))) (funcall silently) (funcall 
clean) (org-babel-exp-code info)) ((memql --cl-var-- (quote (quote results))) 
(org-babel-exp-results info type nil hash) "") ((memql --cl-var-- (quote (quote 
both))) (org-babel-exp-results info type nil hash) (org-babel-exp-code info))))
  (let ((silently (function (lambda nil (let ((session ...)) (if (not ...) 
(progn ...)))))) (clean (function (lambda nil (if (eq type (quote inline)) nil 
(org-babel-remove-result info)))))) (let ((--cl-var-- (intern (or (cdr (assoc 
:exports ...)) "code")))) (cond ((memql --cl-var-- (quote (quote none))) 
(funcall silently) (funcall clean) "") ((memql --cl-var-- (quote (quote code))) 
(funcall silently) (funcall clean) (org-babel-exp-code info)) ((memql 
--cl-var-- (quote (quote results))) (org-babel-exp-results info type nil hash) 
"") ((memql --cl-var-- (quote (quote both))) (org-babel-exp-results info type 
nil hash) (org-babel-exp-code info)))))
  org-babel-exp-do-export(("emacs-lisp" "results" ((:comments . "") (:shebang . 
"") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports 
. "results") (:results . "replace") (:var . "results=test('(a b c) )") (:hlines 
. "no") (:session . "none")) "" nil 0) lob)
  (let* ((lob-info (org-babel-lob-get-info)) (results (org-babel-exp-do-export 
(list "emacs-lisp" "results" (apply (function org-babel-merge-params) 
org-babel-default-header-args org-babel-default-lob-header-args (append 
(org-babel-params-from-properties) (list ...))) "" (nth 3 lob-info) (nth 2 
lob-info)) (quote lob))) (rep (org-fill-template 
org-babel-exp-call-line-template (list (cons "line" (nth 0 lob-info)))))) (if 
(equal rep "") (delete-region beg-el (progn (goto-char end-el) (if (not (eq 
type (quote babel-call))) (progn (skip-chars-forward "       ") (point)) 
(skip-chars-forward " 
        \n") (line-beginning-position)))) (goto-char beg-el) (delete-region 
beg-el (progn (goto-char end-el) (skip-chars-backward " 
        \n") (point))) (insert rep)))
  (cond ((eql type (quote inline-src-block)) (let* ((info 
(org-babel-parse-inline-src-block-match)) (params (nth 2 info))) (let* ((c 
(nthcdr 1 info))) (setcar c (if (and (cdr ...) (string= "yes" ...)) 
(org-babel-expand-noweb-references info (org-babel-exp-get-export-buffer)) (nth 
1 info)))) (goto-char beg-el) (let ((replacement (org-babel-exp-do-export info 
(quote inline)))) (if (equal replacement "") (delete-region beg-el (progn 
(goto-char end-el) (skip-chars-forward "      ") (point))) (delete-region 
beg-el (progn (goto-char end-el) (skip-chars-backward "     ") (point))) 
(insert replacement))))) ((memql type (quote (babel-call inline-babel-call))) 
(let* ((lob-info (org-babel-lob-get-info)) (results (org-babel-exp-do-export 
(list "emacs-lisp" "results" (apply ... org-babel-default-header-args 
org-babel-default-lob-header-args ...) "" (nth 3 lob-info) (nth 2 lob-info)) 
(quote lob))) (rep (org-fill-template org-babel-exp-call-line-template (list 
(cons "line" ...))))) (if (equal rep "") (delete-region beg-el (progn 
(goto-char end-el) (if (not ...) (progn ... ...) (skip-chars-forward " 
        \n") (line-beginning-position)))) (goto-char beg-el) (delete-region 
beg-el (progn (goto-char end-el) (skip-chars-backward " 
        \n") (point))) (insert rep)))))
  (let ((beg-el (org-element-property :begin element)) (end-el 
(org-element-property :end element))) (cond ((eql type (quote 
inline-src-block)) (let* ((info (org-babel-parse-inline-src-block-match)) 
(params (nth 2 info))) (let* ((c (nthcdr 1 info))) (setcar c (if (and ... ...) 
(org-babel-expand-noweb-references info ...) (nth 1 info)))) (goto-char beg-el) 
(let ((replacement (org-babel-exp-do-export info ...))) (if (equal replacement 
"") (delete-region beg-el (progn ... ... ...)) (delete-region beg-el (progn ... 
... ...)) (insert replacement))))) ((memql type (quote (babel-call 
inline-babel-call))) (let* ((lob-info (org-babel-lob-get-info)) (results 
(org-babel-exp-do-export (list "emacs-lisp" "results" ... "" ... ...) (quote 
lob))) (rep (org-fill-template org-babel-exp-call-line-template (list ...)))) 
(if (equal rep "") (delete-region beg-el (progn (goto-char end-el) (if ... ... 
... ...))) (goto-char beg-el) (delete-region beg-el (progn (goto-char end-el) 
(skip-chars-backward " 
        \n") (point))) (insert rep))))))
  (progn (let ((beg-el (org-element-property :begin element)) (end-el 
(org-element-property :end element))) (cond ((eql type (quote 
inline-src-block)) (let* ((info (org-babel-parse-inline-src-block-match)) 
(params (nth 2 info))) (let* ((c ...)) (setcar c (if ... ... ...))) (goto-char 
beg-el) (let ((replacement ...)) (if (equal replacement "") (delete-region 
beg-el ...) (delete-region beg-el ...) (insert replacement))))) ((memql type 
(quote (babel-call inline-babel-call))) (let* ((lob-info 
(org-babel-lob-get-info)) (results (org-babel-exp-do-export ... ...)) (rep 
(org-fill-template org-babel-exp-call-line-template ...))) (if (equal rep "") 
(delete-region beg-el (progn ... ...)) (goto-char beg-el) (delete-region beg-el 
(progn ... ... ...)) (insert rep)))))))
  (if (memq type (quote (babel-call inline-babel-call inline-src-block))) 
(progn (let ((beg-el (org-element-property :begin element)) (end-el 
(org-element-property :end element))) (cond ((eql type (quote 
inline-src-block)) (let* ((info ...) (params ...)) (let* (...) (setcar c ...)) 
(goto-char beg-el) (let (...) (if ... ... ... ...)))) ((memql type (quote 
(babel-call inline-babel-call))) (let* ((lob-info ...) (results ...) (rep ...)) 
(if (equal rep "") (delete-region beg-el ...) (goto-char beg-el) (delete-region 
beg-el ...) (insert rep))))))))
  (let* ((element (save-excursion (backward-char) (let 
((save-match-data-internal (match-data))) (unwind-protect (progn 
(org-element-context)) (set-match-data save-match-data-internal (quote 
evaporate)))))) (type (org-element-type element))) (if (memq type (quote 
(babel-call inline-babel-call inline-src-block))) (progn (let ((beg-el 
(org-element-property :begin element)) (end-el (org-element-property :end 
element))) (cond ((eql type (quote inline-src-block)) (let* (... ...) (let* ... 
...) (goto-char beg-el) (let ... ...))) ((memql type (quote ...)) (let* (... 
... ...) (if ... ... ... ... ...))))))))
  (save-excursion (let* ((element (save-excursion (backward-char) (let 
((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data 
save-match-data-internal ...))))) (type (org-element-type element))) (if (memq 
type (quote (babel-call inline-babel-call inline-src-block))) (progn (let 
((beg-el (org-element-property :begin element)) (end-el (org-element-property 
:end element))) (cond ((eql type ...) (let* ... ... ... ...)) ((memql type ...) 
(let* ... ...))))))))
  (while (re-search-forward rx end t) (save-excursion (let* ((element 
(save-excursion (backward-char) (let (...) (unwind-protect ... ...)))) (type 
(org-element-type element))) (if (memq type (quote (babel-call 
inline-babel-call inline-src-block))) (progn (let ((beg-el ...) (end-el ...)) 
(cond (... ...) (... ...))))))))
  (let ((rx (concat "\\(?:" org-babel-inline-src-block-regexp "\\|" 
org-babel-lob-one-liner-regexp "\\)"))) (while (re-search-forward rx end t) 
(save-excursion (let* ((element (save-excursion (backward-char) (let ... ...))) 
(type (org-element-type element))) (if (memq type (quote (babel-call 
inline-babel-call inline-src-block))) (progn (let (... ...) (cond ... 
...))))))))
  (save-excursion (goto-char start) (if (markerp end) nil (let ((m 
(make-marker))) (set-marker m end (current-buffer)) (setq end m))) (let ((rx 
(concat "\\(?:" org-babel-inline-src-block-regexp "\\|" 
org-babel-lob-one-liner-regexp "\\)"))) (while (re-search-forward rx end t) 
(save-excursion (let* ((element (save-excursion ... ...)) (type 
(org-element-type element))) (if (memq type (quote ...)) (progn (let ... 
...))))))))
  org-babel-exp-non-block-elements(115 219)
  (let ((case-fold-search t) (pos (point-min))) (goto-char pos) (while 
(re-search-forward "^[   ]*#\\+BEGIN_SRC" nil t) (let ((element (let 
((save-match-data-internal ...)) (unwind-protect (progn ...) (set-match-data 
save-match-data-internal ...))))) (if (eq (org-element-type element) (quote 
src-block)) (progn (let* ((match-start ...) (begin ...) (block-end ...) (ind 
...) (headers ...)) (org-babel-exp-non-block-elements pos begin) (let (...) 
(cond ... ... ...)) (setq pos (line-beginning-position)) (set-marker 
match-start nil) (set-marker begin nil) (set-marker block-end nil)))))) 
(org-babel-exp-non-block-elements pos (point-max)))
  (progn (let ((case-fold-search t) (pos (point-min))) (goto-char pos) (while 
(re-search-forward "^[    ]*#\\+BEGIN_SRC" nil t) (let ((element (let (...) 
(unwind-protect ... ...)))) (if (eq (org-element-type element) (quote 
src-block)) (progn (let* (... ... ... ... ...) 
(org-babel-exp-non-block-elements pos begin) (let ... ...) (setq pos ...) 
(set-marker match-start nil) (set-marker begin nil) (set-marker block-end 
nil)))))) (org-babel-exp-non-block-elements pos (point-max))))
  (unwind-protect (progn (let ((case-fold-search t) (pos (point-min))) 
(goto-char pos) (while (re-search-forward "^[    ]*#\\+BEGIN_SRC" nil t) (let 
((element (let ... ...))) (if (eq (org-element-type element) (quote src-block)) 
(progn (let* ... ... ... ... ... ... ...))))) (org-babel-exp-non-block-elements 
pos (point-max)))) (set-window-configuration wconfig))
  (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let 
((case-fold-search t) (pos (point-min))) (goto-char pos) (while 
(re-search-forward "^[    ]*#\\+BEGIN_SRC" nil t) (let ((element ...)) (if (eq 
... ...) (progn ...)))) (org-babel-exp-non-block-elements pos (point-max)))) 
(set-window-configuration wconfig)))
  org-babel-exp-process-buffer()
  (let ((org-current-export-file reference)) (org-babel-exp-process-buffer))
  (unwind-protect (let ((org-current-export-file reference)) 
(org-babel-exp-process-buffer)) (kill-buffer reference))
  (let ((reference (org-export-copy-buffer))) (unwind-protect (let 
((org-current-export-file reference)) (org-babel-exp-process-buffer)) 
(kill-buffer reference)))
  org-export-execute-babel-code()
  (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn 
(or (and (vectorp backend) (>= (length backend) 8) (memq (aref backend 0) 
cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote 
org-export-backend-name) (quote org-export-backend))) (aref backend 1))) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and 
(vectorp backend) (>= (length backend) 8) (memq (aref backend 0) 
cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote 
org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (setq 
info (org-export-install-filters (org-combine-plists info 
(org-export-get-environment backend subtreep ext-plist)))) 
(org-macro-replace-all (list (cons "author" (org-element-interpret-data 
(plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get 
info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" 
(org-element-interpret-data (plist-get info :title))))) (let ((backend-name 
(progn (or (and (vectorp backend) (>= ... 8) (memq ... 
cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote 
org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) 
(progn (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--)))))) (setq 
tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) 
(org-element-parse-buffer nil visible-only) 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 (if (not (functionp inner-template)) body 
(funcall inner-template body 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 (or (and 
(vectorp backend) (>= (length backend) 8) (memq (aref backend 0) 
cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote 
org-export-backend-name) (quote org-export-backend))) (aref backend 1))) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and 
(vectorp backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags)) 
(error "%s accessing a non-%s" (quote org-export-backend-name) (quote 
org-export-backend))) (aref backend 1)))) (setq info 
(org-export-install-filters (org-combine-plists info 
(org-export-get-environment backend subtreep ext-plist)))) 
(org-macro-replace-all (list (cons "author" (org-element-interpret-data 
(plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get 
info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" 
(org-element-interpret-data (plist-get info :title))))) (let ((backend-name 
(progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref 
backend 1)))) (progn (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--)))))) (setq tree 
(org-export-filter-apply-functions (plist-get info :filter-parse-tree) 
(org-element-parse-buffer nil visible-only) 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 (if (not (functionp inner-template)) body 
(funcall inner-template body 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 (or (and (vectorp backend) (>= ... 8) 
(memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" 
(quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and ... 
... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (setq 
info (org-export-install-filters (org-combine-plists info 
(org-export-get-environment backend subtreep ext-plist)))) 
(org-macro-replace-all (list (cons "author" (org-element-interpret-data 
(plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get 
info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" 
(org-element-interpret-data (plist-get info :title))))) (let ((backend-name 
(progn (or ... ...) (aref backend 1)))) (progn (let ((--dolist-tail-- ...) 
filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq 
--dolist-tail-- ...))))) (setq tree (org-export-filter-apply-functions 
(plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) 
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 (if (not ...) body (funcall 
inner-template 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 (or (and 
... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1))) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args (quote org-export-before-parsing-hook) (progn (or ... ...) 
(aref backend 1)))) (setq info (org-export-install-filters (org-combine-plists 
info (org-export-get-environment backend subtreep ext-plist)))) 
(org-macro-replace-all (list (cons "author" (org-element-interpret-data ...)) 
(cons "date" (org-element-interpret-data ...)) (cons "email" (or ... "")) (cons 
"title" (org-element-interpret-data ...)))) (let ((backend-name (progn ... 
...))) (progn (let (... filter) (while --dolist-tail-- ... ... ...)))) (setq 
tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) 
(org-element-parse-buffer nil visible-only) 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 (if ... body ...)) (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 (or (and (vectorp backend) (>= 
(length backend) 8) (memq (aref backend 0) cl-struct-org-export-backend-tags)) 
(error "%s accessing a non-%s" (quote org-export-backend-name) (quote 
org-export-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))) 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 (or ... ...) (aref backend 1))) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args (quote org-export-before-parsing-hook) (progn ... ...))) 
(setq info (org-export-install-filters (org-combine-plists info ...))) 
(org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons 
"email" ...) (cons "title" ...))) (let ((backend-name ...)) (progn (let ... 
...))) (setq tree (org-export-filter-apply-functions (plist-get info 
:filter-parse-tree) (org-element-parse-buffer nil visible-only) 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 (or (and (vectorp backend) (>= ... 8) (memq 
... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote 
org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (info 
(org-combine-plists (list :export-options (delq nil (list ... ... ...))) 
(org-export--get-buffer-attributes))) 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 ... ...)) 
(org-export-expand-include-keyword) (org-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion 
(run-hook-with-args ... ...)) (setq info (org-export-install-filters ...)) 
(org-macro-replace-all (list ... ... ... ...)) (let (...) (progn ...)) (setq 
tree (org-export-filter-apply-functions ... ... 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 (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref 
backend 1))) (info (org-combine-plists (list :export-options (delq nil ...)) 
(org-export--get-buffer-attributes))) 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-macro-initialize-templates) 
(org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) 
(org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (setq 
info ...) (org-macro-replace-all ...) (let ... ...) (setq tree ...) (setq info 
...) (let* ... ...))) (and (buffer-live-p --buf-copy) (progn 
(save-current-buffer ... ...) (kill-buffer --buf-copy))))))))
  org-export-as(latex nil nil nil 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 ((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 ((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 
((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(latex "./examplebug.tex" nil nil nil nil nil)
  (let ((outfile (org-export-output-file-name ".tex" subtreep))) 
(org-export-to-file (quote latex) outfile async subtreep visible-only body-only 
ext-plist))
  org-latex-export-to-latex(nil nil nil nil)
  funcall(org-latex-export-to-latex nil nil nil nil)
  (save-excursion (if arg (progn (if (eq (marker-buffer 
org-export-dispatch-last-position) (org-base-buffer (current-buffer))) 
(goto-char org-export-dispatch-last-position) (move-marker 
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote 
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote 
visible) optns) t) (and (memq (quote body) optns) t)))
  (cond ((eql action (quote template)) (org-export-insert-default-template nil 
optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote 
publish-current-file)) (org-publish-current-file (memq (quote force) optns) 
(memq (quote async) optns))) ((eql action (quote publish-current-project)) 
(org-publish-current-project (memq (quote force) optns) (memq (quote async) 
optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc 
(org-icompleting-read "Publish project: " org-publish-project-alist nil t) 
org-publish-project-alist) (memq (quote force) optns) (memq (quote async) 
optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) 
optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq 
(marker-buffer org-export-dispatch-last-position) (org-base-buffer ...)) 
(goto-char org-export-dispatch-last-position) (move-marker 
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote 
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote 
visible) optns) t) (and (memq (quote body) optns) t)))))
  (let* ((input (cond ((equal arg (quote (16))) (quote (stack))) ((and arg 
org-export-dispatch-last-action)) (t (let ((wconfig ...)) (unwind-protect 
(progn ...) (set-window-configuration wconfig)))))) (action (car input)) (optns 
(cdr input))) (if (memq (quote subtree) optns) nil (move-marker 
org-export-dispatch-last-position nil)) (cond ((eql action (quote template)) 
(org-export-insert-default-template nil optns)) ((eql action (quote stack)) 
(org-export-stack)) ((eql action (quote publish-current-file)) 
(org-publish-current-file (memq (quote force) optns) (memq (quote async) 
optns))) ((eql action (quote publish-current-project)) 
(org-publish-current-project (memq (quote force) optns) (memq (quote async) 
optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc 
(org-icompleting-read "Publish project: " org-publish-project-alist nil t) 
org-publish-project-alist) (memq (quote force) optns) (memq (quote async) 
optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) 
optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq 
... ...) (goto-char org-export-dispatch-last-position) (move-marker 
org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote 
async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote 
visible) optns) t) (and (memq (quote body) optns) t))))))
  org-export-dispatch(nil)
  call-interactively(org-export-dispatch record nil)
  command-execute(org-export-dispatch record)
  execute-extended-command(nil "org-export-dispatch")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Reply via email to