emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in new exporter?
@ 2012-07-01 13:43 Thorsten Jolitz
  2012-07-01 14:46 ` Achim Gratz
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Jolitz @ 2012-07-01 13:43 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou, Eric Schulte

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


Hi list, 
when I try to use the new exporter outside of an Org buffer, e.g. from a
function or with M-:, it seems that there is a problem with the current
buffer that is used for exporting - it is not the buffer of the Org file
given as argument. 

I think the problem is here (line 2319 of org-export.el, function
org-export-as): 

#+begin_src emacs-lisp
(tree (let ((buf (or (buffer-file-name (buffer-base-buffer))
 	 (current-buffer))))
#+end_src

What I actually do to produce the backtrace above is a bit complicated,
I eval a function of mine with M-:, which in turn calls:

#+begin_src emacs-lisp
(org-export-to-file
'e-html "/home/mydir/myfile.org")
#+end_src

When I do this with point in a different buffer, I get an error (see
backtrace below). When I do it with point in myfile.org, the export
actually works, but replaces the Org text in myfile.org with the exported
html. When I do M-x org-e-html-export-to-html with point in myfile.org,
everything works fine and myfile.html is produced. 


[-- Attachment #2: backtrace --]
[-- Type: text/plain, Size: 32839 bytes --]

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  (and (looking-at org-planning-or-clock-line-re))
  (cond ((eq special (quote item)) (org-element-item-parser (or structure (org-list-struct)) raw-secondary-p)) ((eq special (quote quote-section)) (org-element-quote-section-parser)) ((eq special (quote table-row)) (org-element-table-row-parser)) ((org-with-limited-levels (org-at-heading-p)) (org-element-headline-parser raw-secondary-p)) ((eq special (quote section)) (org-element-section-parser)) ((and (looking-at org-planning-or-clock-line-re)) (if (equal (match-string 1) org-clock-string) (org-element-clock-parser) (org-element-planning-parser))) ((when (looking-at "[ 	]*#\\+BEGIN_\\([-A-Za-z0-9]+\\)\\(?: \\|$\\)") (let ((name (upcase (match-string 1))) parser) (cond ((not (save-excursion ...)) (org-element-paragraph-parser)) ((setq parser (assoc name org-element-block-name-alist)) (funcall (cdr parser))) (t (org-element-special-block-parser)))))) ((org-at-heading-p) (org-element-inlinetask-parser raw-secondary-p)) ((looking-at "[ 	]*\\\\begin{\\([A-Za-z0-9*]+\\)}") (if (save-excursion (re-search-forward (format "[ 	]*\\\\end{%s}[ 	]*" (regexp-quote (match-string 1))) nil t)) (org-element-latex-environment-parser) (org-element-paragraph-parser))) ((looking-at org-drawer-regexp) (let ((name (match-string 1))) (cond ((not (save-excursion (re-search-forward "^[ 	]*:END:[ 	]*$" nil t))) (org-element-paragraph-parser)) ((equal "PROPERTIES" name) (org-element-property-drawer-parser)) (t (org-element-drawer-parser))))) ((looking-at "[ 	]*:\\( \\|$\\)") (org-element-fixed-width-parser)) ((looking-at "[ 	]*#\\+\\([a-z]+\\(:?_[a-z]+\\)*\\):") (let ((key (upcase (match-string 1)))) (cond ((equal key "CALL") (org-element-babel-call-parser)) ((and (equal key "BEGIN") (save-excursion (re-search-forward "^[ 	]*#\\+END:\\(?: \\|$\\)" nil t))) (org-element-dynamic-block-parser)) ((and (not (equal key "TBLFM")) (not (member key org-element-affiliated-keywords))) (org-element-keyword-parser)) (t (org-element-paragraph-parser))))) ((looking-at org-footnote-definition-re) (org-element-footnote-definition-parser)) ((looking-at "\\(#\\|[ 	]*#\\+\\(?: \\|$\\)\\)") (org-element-comment-parser)) ((looking-at "[ 	]*-\\{5,\\}[ 	]*$") (org-element-horizontal-rule-parser)) ((org-at-table-p t) (org-element-table-parser)) ((looking-at (org-item-re)) (org-element-plain-list-parser (or structure (org-list-struct)))) (t (org-element-paragraph-parser)))
  (let ((case-fold-search t) (raw-secondary-p (and granularity (not (eq granularity (quote object)))))) (cond ((eq special (quote item)) (org-element-item-parser (or structure (org-list-struct)) raw-secondary-p)) ((eq special (quote quote-section)) (org-element-quote-section-parser)) ((eq special (quote table-row)) (org-element-table-row-parser)) ((org-with-limited-levels (org-at-heading-p)) (org-element-headline-parser raw-secondary-p)) ((eq special (quote section)) (org-element-section-parser)) ((and (looking-at org-planning-or-clock-line-re)) (if (equal (match-string 1) org-clock-string) (org-element-clock-parser) (org-element-planning-parser))) ((when (looking-at "[ 	]*#\\+BEGIN_\\([-A-Za-z0-9]+\\)\\(?: \\|$\\)") (let ((name (upcase ...)) parser) (cond ((not ...) (org-element-paragraph-parser)) ((setq parser ...) (funcall ...)) (t (org-element-special-block-parser)))))) ((org-at-heading-p) (org-element-inlinetask-parser raw-secondary-p)) ((looking-at "[ 	]*\\\\begin{\\([A-Za-z0-9*]+\\)}") (if (save-excursion (re-search-forward (format "[ 	]*\\\\end{%s}[ 	]*" (regexp-quote ...)) nil t)) (org-element-latex-environment-parser) (org-element-paragraph-parser))) ((looking-at org-drawer-regexp) (let ((name (match-string 1))) (cond ((not (save-excursion ...)) (org-element-paragraph-parser)) ((equal "PROPERTIES" name) (org-element-property-drawer-parser)) (t (org-element-drawer-parser))))) ((looking-at "[ 	]*:\\( \\|$\\)") (org-element-fixed-width-parser)) ((looking-at "[ 	]*#\\+\\([a-z]+\\(:?_[a-z]+\\)*\\):") (let ((key (upcase (match-string 1)))) (cond ((equal key "CALL") (org-element-babel-call-parser)) ((and (equal key "BEGIN") (save-excursion ...)) (org-element-dynamic-block-parser)) ((and (not ...) (not ...)) (org-element-keyword-parser)) (t (org-element-paragraph-parser))))) ((looking-at org-footnote-definition-re) (org-element-footnote-definition-parser)) ((looking-at "\\(#\\|[ 	]*#\\+\\(?: \\|$\\)\\)") (org-element-comment-parser)) ((looking-at "[ 	]*-\\{5,\\}[ 	]*$") (org-element-horizontal-rule-parser)) ((org-at-table-p t) (org-element-table-parser)) ((looking-at (org-item-re)) (org-element-plain-list-parser (or structure (org-list-struct)))) (t (org-element-paragraph-parser))))
  (save-excursion (when (looking-at org-element--affiliated-re) (let ((opoint (point))) (while (looking-at org-element--affiliated-re) (forward-line)) (when (looking-at "[ 	]*$") (goto-char opoint)))) (let ((case-fold-search t) (raw-secondary-p (and granularity (not (eq granularity (quote object)))))) (cond ((eq special (quote item)) (org-element-item-parser (or structure (org-list-struct)) raw-secondary-p)) ((eq special (quote quote-section)) (org-element-quote-section-parser)) ((eq special (quote table-row)) (org-element-table-row-parser)) ((org-with-limited-levels (org-at-heading-p)) (org-element-headline-parser raw-secondary-p)) ((eq special (quote section)) (org-element-section-parser)) ((and (looking-at org-planning-or-clock-line-re)) (if (equal (match-string 1) org-clock-string) (org-element-clock-parser) (org-element-planning-parser))) ((when (looking-at "[ 	]*#\\+BEGIN_\\([-A-Za-z0-9]+\\)\\(?: \\|$\\)") (let ((name ...) parser) (cond (... ...) (... ...) (t ...))))) ((org-at-heading-p) (org-element-inlinetask-parser raw-secondary-p)) ((looking-at "[ 	]*\\\\begin{\\([A-Za-z0-9*]+\\)}") (if (save-excursion (re-search-forward (format "[ 	]*\\\\end{%s}[ 	]*" ...) nil t)) (org-element-latex-environment-parser) (org-element-paragraph-parser))) ((looking-at org-drawer-regexp) (let ((name (match-string 1))) (cond ((not ...) (org-element-paragraph-parser)) ((equal "PROPERTIES" name) (org-element-property-drawer-parser)) (t (org-element-drawer-parser))))) ((looking-at "[ 	]*:\\( \\|$\\)") (org-element-fixed-width-parser)) ((looking-at "[ 	]*#\\+\\([a-z]+\\(:?_[a-z]+\\)*\\):") (let ((key (upcase ...))) (cond ((equal key "CALL") (org-element-babel-call-parser)) ((and ... ...) (org-element-dynamic-block-parser)) ((and ... ...) (org-element-keyword-parser)) (t (org-element-paragraph-parser))))) ((looking-at org-footnote-definition-re) (org-element-footnote-definition-parser)) ((looking-at "\\(#\\|[ 	]*#\\+\\(?: \\|$\\)\\)") (org-element-comment-parser)) ((looking-at "[ 	]*-\\{5,\\}[ 	]*$") (org-element-horizontal-rule-parser)) ((org-at-table-p t) (org-element-table-parser)) ((looking-at (org-item-re)) (org-element-plain-list-parser (or structure (org-list-struct)))) (t (org-element-paragraph-parser)))))
  org-element-current-element(nil nil nil)
  (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value (org-element-property (cdr sec-loc) element))) (unless (stringp sec-value) (mapc (lambda (obj) (unless ... ...)) sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or (memq granularity ...) (and ... ...) (eq type ...))) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type (headline ...) (plain-list ...) (table ...)) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity (quote ...))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element)))))
  (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value (org-element-property ... element))) (unless (stringp sec-value) (mapc (lambda ... ...) sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or (and visible-only ...) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or ... ... ...)) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type ... ... ...) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity ...)) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element))))))
  (save-restriction (narrow-to-region beg end) (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value ...)) (unless (stringp sec-value) (mapc ... sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or ... ...) element) ((and ... ...) (org-element-parse-elements cbeg ... ... ... granularity visible-only element)) ((and cbeg ...) (org-element-parse-objects cbeg ... element ...)) (t element)))))))
  (save-excursion (save-restriction (narrow-to-region beg end) (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let (...) (unless ... ...)))) (goto-char (org-element-property :end element)) (nconc acc (list (cond (... element) (... ...) (... ...) (t element))))))) acc)
  org-element-parse-elements(1 618 nil nil nil nil (section (:begin 1 :end 618 :contents-begin 1 :contents-end 618 :post-blank 0 :parent (org-data nil))))
  (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or (memq granularity (quote (element object nil))) (and (eq granularity (quote greater-element)) (eq type (quote section))) (eq type (quote headline)))) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type (headline (if (org-element-property :quotedp element) (quote quote-section) (quote section))) (plain-list (quote item)) (table (quote table-row))) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity (quote (object nil)))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element))
  (list (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or (memq granularity (quote (element object nil))) (and (eq granularity (quote greater-element)) (eq type (quote section))) (eq type (quote headline)))) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type (headline (if (org-element-property :quotedp element) (quote quote-section) (quote section))) (plain-list (quote item)) (table (quote table-row))) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity (quote (object nil)))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element)))
  (nconc acc (list (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or (memq granularity (quote ...)) (and (eq granularity ...) (eq type ...)) (eq type (quote headline)))) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type (headline (if ... ... ...)) (plain-list (quote item)) (table (quote table-row))) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity (quote (object nil)))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element))))
  (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value (org-element-property (cdr sec-loc) element))) (unless (stringp sec-value) (mapc (lambda (obj) (unless ... ...)) sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or (memq granularity ...) (and ... ...) (eq type ...))) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type (headline ...) (plain-list ...) (table ...)) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity (quote ...))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element)))))
  (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value (org-element-property ... element))) (unless (stringp sec-value) (mapc (lambda ... ...) sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or (and visible-only ...) (not cbeg)) element) ((and (memq type org-element-greater-elements) (or ... ... ...)) (org-element-parse-elements cbeg (org-element-property :contents-end element) (case type ... ... ...) (org-element-property :structure element) granularity visible-only element)) ((and cbeg (memq granularity ...)) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))) (t element))))))
  (save-restriction (narrow-to-region beg end) (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let ((sec-value ...)) (unless (stringp sec-value) (mapc ... sec-value))))) (goto-char (org-element-property :end element)) (nconc acc (list (cond ((or ... ...) element) ((and ... ...) (org-element-parse-elements cbeg ... ... ... granularity visible-only element)) ((and cbeg ...) (org-element-parse-objects cbeg ... element ...)) (t element)))))))
  (save-excursion (save-restriction (narrow-to-region beg end) (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (not (eobp)) (let* ((element (org-element-current-element granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (plist-put (nth 1 element) :parent acc) (let ((sec-loc (assq type org-element-secondary-value-alist))) (when sec-loc (let (...) (unless ... ...)))) (goto-char (org-element-property :end element)) (nconc acc (list (cond (... element) (... ...) (... ...) (t element))))))) acc)
  org-element-parse-elements(1 618 section nil nil nil (org-data nil))
  (save-excursion (goto-char (point-min)) (org-skip-whitespace) (org-element-parse-elements (point-at-bol) (point-max) (quote section) nil granularity visible-only (list (quote org-data) nil)))
  org-element-parse-buffer(nil nil)
  (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))
  (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))
  (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))
  (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov ... ... ...)) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) (run-hooks ...)) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))
  (let ((--original-buffer #<buffer iorg/lisp>) (--offset 0) (--buffer-string #("  /home/tj/git/bugpile/iorg/lisp:\n  insgesamt 84\n  drwxr-xr-x 2 tj users  4096  1. Jul 03:07 .\n  drwxr-xr-x 6 tj users  4096 20. Jun 15:09 ..\n  -rw-r--r-- 1 tj users 10495  1. Jul 03:07 iorg-controller.el\n  -rw-r--r-- 1 tj users 20688 20. Jun 14:28 iorg-html.el\n  -rw-r--r-- 1 tj users  3113 20. Jun 14:28 iorg-js.el\n  -rw-r--r-- 1 tj users  2984 29. Jun 21:02 iorg-library-header.el\n  -rw-r--r-- 1 tj users    84 29. Jun 21:01 iorg-model.el\n  -rw-r--r-- 1 tj users 18737  1. Jul 00:10 iorg-projects.el\n  -rw-r--r-- 1 tj users  1622 20. Jun 14:28 iorg-util.el\n  -rw-r--r-- 1 tj users    88 20. Jun 14:28 iorg-view.el\n" 0 2 (fontified t) 2 32 (fontified t face dired-header) 32 34 (fontified t) 34 93 (fontified t) 93 94 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t face dired-directory) 94 139 (fontified t) 139 141 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t face dired-directory) 141 142 (fontified t) 142 143 (fontified t) 143 186 (fontified t) 186 204 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 204 205 (fontified t) 205 206 (fontified t) 206 249 (fontified t) 249 261 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 261 262 (fontified t) 262 306 (fontified t) 306 316 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 316 361 (fontified t) 361 383 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 383 428 (fontified t) 428 441 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 441 442 (fontified t) 442 443 (fontified t) 443 486 (fontified t) 486 502 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 502 503 (fontified t) 503 504 (fontified t) 504 547 (fontified t) 547 559 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 559 560 (fontified t) 560 561 (fontified t) 561 604 (fontified t) 604 616 (dired-filename t mouse-face highlight help-echo "mouse-2: visit this file in other window" fontified t) 616 617 (fontified t))) (--overlays (mapcar (quote copy-overlay) (overlays-in (point-min) (point-max))))) (with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))))
  (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))
  (let ((buf (or (buffer-file-name (buffer-base-buffer)) (current-buffer)))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))
  (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or (buffer-file-name ...) (current-buffer)))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))) (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 (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))
  (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 ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or ... ...))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) (run-hooks ...)) (org-element-parse-buffer nil visible-only))))) (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 (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output)))
  (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 ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf ...)) (org-export-with-current-buffer-copy (unless noexpand ... ...) (goto-char ...) (let ... ...) (org-element-parse-buffer nil visible-only))))) (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 (org-export-data tree info))) (template (cdr (assq ... ...))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... body ...) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))))
  org-export-as(e-html nil nil nil nil nil)
  (let ((out (org-export-as backend subtreep visible-only body-only ext-plist noexpand))) (with-temp-buffer (insert out) (let ((coding-system-for-write org-export-coding-system)) (write-file file))))
  org-export-to-file(e-html "/home/tj/git/bugpile/docroot/bugpile-static-bugreport-guidelines.org")
  (if (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) nil (org-export-to-file (quote e-html) absolute-file-name))
  (unless (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) (org-export-to-file (quote e-html) absolute-file-name))
  (let ((absolute-file-name (expand-file-name file docroot-dir))) (unless (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) (org-export-to-file (quote e-html) absolute-file-name)))
  (and (string= (file-name-extension file) "org") (let ((absolute-file-name (expand-file-name file docroot-dir))) (unless (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) (org-export-to-file (quote e-html) absolute-file-name))))
  (lambda (file) (and (string= (file-name-extension file) "org") (let ((absolute-file-name (expand-file-name file docroot-dir))) (unless (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) (org-export-to-file (quote e-html) absolute-file-name)))))("bugpile-static-bugreport-guidelines.org")
  mapc((lambda (file) (and (string= (file-name-extension file) "org") (let ((absolute-file-name (expand-file-name file docroot-dir))) (unless (and (member (concat (file-name-sans-extension file) ".html") docroot-files) (file-newer-than-file-p (concat (file-name-sans-extension file) ".html") (concat (file-name-sans-extension file) ".org"))) (org-export-to-file (quote e-html) absolute-file-name))))) ("." ".." "bugpile-static-bugreport-guidelines.org"))
  (let* ((docroot-dir (iorg-projects--get-project-info project :docroot)) (docroot-files (directory-files docroot-dir))) (mapc (lambda (file) (and (string= (file-name-extension file) "org") (let ((absolute-file-name (expand-file-name file docroot-dir))) (unless (and (member ... docroot-files) (file-newer-than-file-p ... ...)) (org-export-to-file (quote e-html) absolute-file-name))))) docroot-files))
  iorg-controller--serve-docroot("bugpile" ("bugpile" (:dir . "~/git/bugpile/") (:host . "localhost") (:port . "8008") (:docroot . "docroot") (:docroot-port . "8009") (:docroot-handler . "bugpile-controller-docroot-handler") (:logic . "logic") (:view . "view") (:controller . "controller") (:objects . "objects") (:test . "test") (:doc . "doc")))
  (if args (iorg-controller--serve-docroot project proj-config args) (iorg-controller--serve-docroot project proj-config))
  (let* ((proj-config (assoc project iorg-projects-config))) (if (not (and (non-empty-string-p project) (assoc project iorg-projects-config))) (message "%s" (concat "Project not registered in customizable " "variable 'iorg-projects-config'")) (elnode-start (quote iorg-controller-dispatcher-handler) :host (or host (cdr (assoc :host proj-config))) :port (or port (cdr (assoc :port proj-config))))) (if args (iorg-controller--serve-docroot project proj-config args) (iorg-controller--serve-docroot project proj-config)))
  iorg-controller-launch-project("bugpile")
  eval((iorg-controller-launch-project "bugpile") nil)
  eval-expression((iorg-controller-launch-project "bugpile") nil)
  call-interactively(eval-expression nil nil)

[-- Attachment #3: Type: text/plain, Size: 24 bytes --]



-- 
cheers,
Thorsten


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

* Re: Bug in new exporter?
  2012-07-01 13:43 Bug in new exporter? Thorsten Jolitz
@ 2012-07-01 14:46 ` Achim Gratz
  2012-07-01 15:40   ` Thorsten Jolitz
  0 siblings, 1 reply; 3+ messages in thread
From: Achim Gratz @ 2012-07-01 14:46 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz writes:
> when I try to use the new exporter outside of an Org buffer, e.g. from a
> function or with M-:, it seems that there is a problem with the current
> buffer that is used for exporting - it is not the buffer of the Org file
> given as argument. 

You should read the docstring again: the file name you give to that
function is the name of the file that will be exported _into_ from the
current buffer.  So the current buffer should contain the org document
to be exported.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: Bug in new exporter?
  2012-07-01 14:46 ` Achim Gratz
@ 2012-07-01 15:40   ` Thorsten Jolitz
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Jolitz @ 2012-07-01 15:40 UTC (permalink / raw)
  To: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Thorsten Jolitz writes:
>> when I try to use the new exporter outside of an Org buffer, e.g. from a
>> function or with M-:, it seems that there is a problem with the current
>> buffer that is used for exporting - it is not the buffer of the Org file
>> given as argument. 
>
> You should read the docstring again: the file name you give to that
> function is the name of the file that will be exported _into_ from the
> current buffer.  So the current buffer should contain the org document
> to be exported.

Right, that got me confused. Sorry for the noise, and thanks for the
tip. 

-- 
cheers,
Thorsten

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

end of thread, other threads:[~2012-07-01 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-01 13:43 Bug in new exporter? Thorsten Jolitz
2012-07-01 14:46 ` Achim Gratz
2012-07-01 15:40   ` Thorsten Jolitz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).