emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [new exporter] fails on double backslashes
@ 2012-07-17  9:05 Thomas Holst
  2012-07-17 10:12 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Holst @ 2012-07-17  9:05 UTC (permalink / raw)
  To: emacs-orgmode Mode

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

Hello,

right now I am testing the new exporter. It works very well except on
backslashes. Here is a minimal example which shows the problem:

#+BEGIN_SRC org
  #+TITLE:     new-exporter.org
  #+AUTHOR:    Thomas Holst
  #+EMAIL:     thomas.holst@de.bosch.com
  #+DATE:      2012-07-16 Mo
  #+DESCRIPTION:
  #+KEYWORDS:
  #+LANGUAGE:  en
  #+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t
  #+OPTIONS:   TeX:t LaTeX:t skip:nil d:t todo:t pri:nil tags:t
  #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
  #+EXPORT_SELECT_TAGS: export
  #+EXPORT_EXCLUDE_TAGS: noexport
  #+LINK_UP:   
  #+LINK_HOME: 
  #+XSLT:

  * headline
  some text \\

  more text
#+END_SRC

When I try to export to LaTeX (M-x org-export-dispatch <RET> L) there is
an error:

  and: Invalid search bound (wrong side of point)

No LaTeX code is produced.

This is with emacs -Q and only the relevant org files loaded:

emacs-vesion:
GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-09-19 on 3249CTO

org-version:
Org-mode version 7.8.11
(release_7.8.11-196-g5dbd13 @
c:/daten/users/de_hts2fe/git/org-mode/lisp/)

OS: WinXP (also tested with emacs 23.2)

I know that it does not make sense to have an empty line after the
backslashes, but I think there should be no error. It only happens when
there is an empty line after the backslashes. Without the empty line
there is no error.

Backtrace:

[-- Attachment #2: backtrace of error --]
[-- Type: text/plain, Size: 43764 bytes --]

Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)")
  re-search-forward("[^\\\\]\\(\\\\\\\\\\)[ 	]*$" 518 t)
  (and (re-search-forward "[^\\\\]\\(\\\\\\\\\\)[ 	]*$" limit t) (goto-char (match-beginning 1)))
  (let ((beg (and (re-search-forward "[^\\\\]\\(\\\\\\\\\\)[ 	]*$" limit t) (goto-char (match-beginning 1))))) (when (and beg (re-search-backward "\\S-" (point-at-bol) t)) (cons (quote line-break) beg)))
  (save-excursion (let ((beg (and (re-search-forward "[^\\\\]\\(\\\\\\\\\\)[ 	]*$" limit t) (goto-char (match-beginning 1))))) (when (and beg (re-search-backward "\\S-" (point-at-bol) t)) (cons (quote line-break) beg))))
  org-element-line-break-successor(518)
  funcall(org-element-line-break-successor 518)
  (let* ((successor-fun (intern (format "org-element-%s-successor" (or (cdr (assq type org-element-object-successor-alist)) type)))) (obj (funcall successor-fun limit))) (and obj (push obj next-candidates)))
  (lambda (type) (let* ((successor-fun (intern (format "org-element-%s-successor" (or (cdr ...) type)))) (obj (funcall successor-fun limit))) (and obj (push obj next-candidates))))(line-break)
  mapc((lambda (type) (let* ((successor-fun (intern (format "org-element-%s-successor" (or (cdr ...) type)))) (obj (funcall successor-fun limit))) (and obj (push obj next-candidates)))) (line-break))
  (let (next-candidates types-to-search) (if (not objects) (setq types-to-search restriction) (mapc (lambda (obj) (if (< (cdr obj) (point)) (push (car obj) types-to-search) (push obj next-candidates))) objects)) (mapc (lambda (type) (let* ((successor-fun (intern (format "org-element-%s-successor" ...))) (obj (funcall successor-fun limit))) (and obj (push obj next-candidates)))) types-to-search) next-candidates)
  org-element-get-next-object-candidates(518 (export-snippet footnote-reference inline-babel-call inline-src-block latex-or-entity line-break link macro radio-target statistics-cookie sub/superscript target text-markup timestamp) ((line-break . 516)))
  (setq candidates (org-element-get-next-object-candidates end restriction candidates))
  (while (setq candidates (org-element-get-next-object-candidates end restriction candidates)) (let ((next-object (let ((pos (apply ... ...))) (save-excursion (goto-char pos) (funcall (intern ...)))))) (let ((obj-beg (org-element-property :begin next-object))) (unless (= (point) obj-beg) (setq acc (org-element-adopt-element acc (replace-regexp-in-string "	" (make-string tab-width 32) (buffer-substring-no-properties ... obj-beg)) t)))) (let ((obj-end (org-element-property :end next-object)) (cont-beg (org-element-property :contents-begin next-object))) (when (and (memq (car next-object) org-element-recursive-objects) cont-beg) (save-restriction (narrow-to-region cont-beg (org-element-property :contents-end next-object)) (org-element-parse-objects (point-min) (point-max) next-object (org-element-restriction next-object)))) (setq acc (org-element-adopt-element acc next-object t)) (goto-char obj-end))))
  (save-excursion (goto-char beg) (while (setq candidates (org-element-get-next-object-candidates end restriction candidates)) (let ((next-object (let ((pos ...)) (save-excursion (goto-char pos) (funcall ...))))) (let ((obj-beg (org-element-property :begin next-object))) (unless (= (point) obj-beg) (setq acc (org-element-adopt-element acc (replace-regexp-in-string "	" ... ...) t)))) (let ((obj-end (org-element-property :end next-object)) (cont-beg (org-element-property :contents-begin next-object))) (when (and (memq (car next-object) org-element-recursive-objects) cont-beg) (save-restriction (narrow-to-region cont-beg (org-element-property :contents-end next-object)) (org-element-parse-objects (point-min) (point-max) next-object (org-element-restriction next-object)))) (setq acc (org-element-adopt-element acc next-object t)) (goto-char obj-end)))) (unless (= (point) end) (setq acc (org-element-adopt-element acc (replace-regexp-in-string "	" (make-string tab-width 32) (buffer-substring-no-properties (point) end)) t))) acc)
  (let (candidates) (save-excursion (goto-char beg) (while (setq candidates (org-element-get-next-object-candidates end restriction candidates)) (let ((next-object (let (...) (save-excursion ... ...)))) (let ((obj-beg (org-element-property :begin next-object))) (unless (= (point) obj-beg) (setq acc (org-element-adopt-element acc ... t)))) (let ((obj-end (org-element-property :end next-object)) (cont-beg (org-element-property :contents-begin next-object))) (when (and (memq ... org-element-recursive-objects) cont-beg) (save-restriction (narrow-to-region cont-beg ...) (org-element-parse-objects ... ... next-object ...))) (setq acc (org-element-adopt-element acc next-object t)) (goto-char obj-end)))) (unless (= (point) end) (setq acc (org-element-adopt-element acc (replace-regexp-in-string "	" (make-string tab-width 32) (buffer-substring-no-properties (point) end)) t))) acc))
  org-element-parse-objects(506 518 (paragraph (:begin 506 :end 520 :contents-begin 506 :contents-end 518 :post-blank 1) "some text " (line-break (:begin 516 :end 519 :post-blank 0 :parent #0))) (export-snippet footnote-reference inline-babel-call inline-src-block latex-or-entity line-break link macro radio-target statistics-cookie sub/superscript target text-markup timestamp))
  (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))))
  (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))
  (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t)))
  (save-excursion (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))) acc)
  org-element-parse-elements(506 530 nil nil nil nil (section (:begin 506 :end 530 :contents-begin 506 :contents-end 530 :post-blank 0)))
  (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))))
  (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))
  (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t)))
  (save-excursion (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))) acc)
  org-element-parse-elements(506 530 section nil nil nil (headline (:raw-value "headline" :begin 495 :end 530 :pre-blank 0 :hiddenp outline :contents-begin 506 :contents-end 530 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :scheduled nil :deadline nil :timestamp nil :clock nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :category nil :title ("headline"))))
  (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))))
  (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))
  (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t)))
  (save-excursion (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))) acc)
  org-element-parse-elements(1 530 nil nil nil nil (section (:begin 1 :end 530 :contents-begin 1 :contents-end 530 :post-blank 0) (keyword (:key "TITLE" :value "new-exporter.org" :begin 1 :end 31 :post-blank 0 :parent #0)) (keyword (:key "AUTHOR" :value "Thomas Holst" :begin 31 :end 57 :post-blank 0 :parent #0)) (keyword (:key "EMAIL" :value "thomas.holst@de.bosch.com" :begin 57 :end 96 :post-blank 0 :parent #0)) (keyword (:key "DATE" :value "2012-07-16 Mo" :begin 96 :end 123 :post-blank 0 :parent #0)) (keyword (:key "DESCRIPTION" :value "" :begin 123 :end 138 :post-blank 0 :parent #0)) (keyword (:key "KEYWORDS" :value "" :begin 138 :end 150 :post-blank 0 :parent #0)) (keyword (:key "LANGUAGE" :value "en" :begin 150 :end 166 :post-blank 0 :parent #0)) (keyword (:key "OPTIONS" :value "H:3 num:t toc:t \\n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t" :begin 166 :end 235 :post-blank 0 :parent #0)) (keyword (:key "OPTIONS" :value "TeX:t LaTeX:t skip:nil d:t todo:t pri:nil tags:t" :begin 235 :end 297 :post-blank 0 :parent #0)) (keyword (:key "INFOJS_OPT" :value "view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js" :begin 297 :end 397 :post-blank 0 :parent #0)) (keyword (:key "EXPORT_SELECT_TAGS" :value "export" :begin 397 :end 426 :post-blank 0 :parent #0)) (keyword (:key "EXPORT_EXCLUDE_TAGS" :value "noexport" :begin 426 :end 458 :post-blank 0 :parent #0)) (keyword (:key "LINK_UP" :value "" :begin 458 :end 472 :post-blank 0 :parent #0)) (keyword (:key "LINK_HOME" :value "" :begin 472 :end 486 :post-blank 0 :parent #0)) (keyword (:key "XSLT" :value "" :begin 486 :end 495 :post-blank 1 :parent #0))))
  (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type))))
  (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))
  (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t)))
  (save-excursion (goto-char beg) (when (and (eq granularity (quote headline)) (not (org-at-heading-p))) (org-with-limited-levels (outline-next-heading))) (while (< (point) end) (let* ((element (org-element-current-element end granularity special structure)) (type (org-element-type element)) (cbeg (org-element-property :contents-begin element))) (goto-char (org-element-property :end element)) (cond ((or (and visible-only (org-element-property :hiddenp element)) (not cbeg))) ((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)) ((memq granularity (quote (object nil))) (org-element-parse-objects cbeg (org-element-property :contents-end element) element (org-element-restriction type)))) (org-element-adopt-element acc element t))) acc)
  org-element-parse-elements(1 530 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 (current-buffer)) (--offset (1- (point-min))) (--buffer-string (buffer-string)) (--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-latex nil nil nil nil nil)
  (let ((out (org-export-as backend subtreep visible-only body-only ext-plist noexpand)) (buffer (get-buffer-create buffer))) (with-current-buffer buffer (erase-buffer) (insert out) (goto-char (point-min))) buffer)
  org-export-to-buffer(e-latex "*Org E-LaTeX Export*" nil nil nil)
  (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))
  (cond ((eql --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 78 85))) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 117))) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) ((eql --cl-var-- (quote 76)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 108)) (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (nxml-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
  (let ((--cl-var-- (if (< raw-key 27) (+ raw-key 96) raw-key))) (cond ((eql --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 78 85))) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq ... optns) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 117))) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) ((eql --cl-var-- (quote 76)) (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 108)) (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (nxml-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
  (case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((97 110 117) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) (76 (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (108 (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-current-buffer outbuf (nxml-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (104 (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-publish-current-project (memq (quote force) optns))) (88 (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
  (let* ((input (org-export-dispatch-ui (if (listp org-export-initial-scope) org-export-initial-scope (list org-export-initial-scope)) org-export-dispatch-use-expert-ui)) (raw-key (car input)) (optns (cdr input))) (case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq ... optns) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-buffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) ((97 110 117) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) (76 (let ((outbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (108 (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (nxml-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-window outbuf)))) (104 (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-publish-current-project (memq (quote force) optns))) (88 (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
  org-export-dispatch()
  call-interactively(org-export-dispatch t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

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

-- 
Bis neulich ...
  Thomas

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

* Re: [new exporter] fails on double backslashes
  2012-07-17  9:05 [new exporter] fails on double backslashes Thomas Holst
@ 2012-07-17 10:12 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2012-07-17 10:12 UTC (permalink / raw)
  To: Thomas Holst; +Cc: emacs-orgmode Mode

Hello,

Thomas Holst <thomas.holst@de.bosch.com> writes:

> right now I am testing the new exporter. It works very well except on
> backslashes. Here is a minimal example which shows the problem:

Indeed. It chokes on line break. It should be fixed now.

Thank you for testing the new exporter and reporting this bug.


Regards,

-- 
Nicolas Goaziou

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17  9:05 [new exporter] fails on double backslashes Thomas Holst
2012-07-17 10:12 ` Nicolas Goaziou

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).