emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] bugs in export


From: Samuel Wales
Subject: [O] bugs in export
Date: Sun, 23 Dec 2012 14:00:46 -0700

I cannot debug further, but FYI:

  1) Sometimes "# " comments get exported to ASCII or HTML.

     I am not able to provide you with an appropriate test
     case at this time but it reliably reproduces with my test case
(large file) and my
     code.

     I reproduced one or both of these bugs with Emacs -Q at one point.

     It occurs with subtree export when marking the subtree
     first.

  2) org-export on subtree with A or H produces this error:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (let (deactivate-mark) (push-mark rege t t) (goto-char regb))
  (if subtree-p (let (deactivate-mark) (push-mark rege t t) (goto-char regb)))
  (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not
(org-region-active-p))) (let ((p (start-process (concat "Exporting "
(file-name-nondirectory (buffer-file-name))) "*Org Processes*"
(expand-file-name invocation-name invocation-directory) "-batch" "-l"
user-init-file "--eval" "(require 'org-exp)" "--eval" "(setq org-wait
.2)" (buffer-file-name) "-f" (symbol-name (nth 1 ass)))))
(set-process-sentinel p (quote org-export-process-sentinel)) (message
"Background process \"%s\": started" p)) (if subtree-p (let
(deactivate-mark) (push-mark rege t t) (goto-char regb)))
(call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window
cbuf)) (let ((cw (selected-window))) (select-window (get-buffer-window
cbuf)) (goto-char cpos) (deactivate-mark) (select-window cw))))
  (let* ((bg (org-xor (equal arg (quote (16)))
org-export-run-in-background)) (subtree-p (or (org-region-active-p)
(eq org-export-initial-scope (quote subtree)))) (regb (and
(org-region-active-p) (region-beginning))) (rege (and
(org-region-active-p) (region-end))) (help "[t]   insert the export
option template\n[v]   limit export to visible part of outline
tree\n[1]   switch buffer/subtree export\n[SPC] publish enclosing
subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export
as ASCII/Latin-1/UTF-8         [A/N/U] to temporary buffer\n\n[h]
export as HTML      [H] to temporary buffer   [R] export region\n[b]
export as HTML and open in browser\n\n[l] export as LaTeX     [L] to
temporary buffer\n[p] export as LaTeX and process to PDF
[d] ... and open PDF file\n\n[D] export as DocBook   [V] export as
DocBook, process to PDF, and open\n\n[o] export as OpenDocument Text
                [O] ... and open\n\n[j] export as TaskJuggler
               [J] ... and open\n\n[m] export as Freemind mind
map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic
exporter\n\n[i] export current file as iCalendar file\n[I] export all
agenda files as iCalendar files   [c] ...as one combined file\n\n[F]
publish current file          [P] publish current project\n[X] publish
a project...          [E] publish every projects") (cmds (quote ((116
org-insert-export-options-template nil) (118 org-export-visible nil)
(97 org-export-as-ascii t) (65 org-export-as-ascii-to-buffer t) (110
org-export-as-latin1 t) (78 org-export-as-latin1-to-buffer t) (117
org-export-as-utf8 t) (85 org-export-as-utf8-to-buffer t) (104
org-export-as-html t) (98 org-export-as-html-and-open t) (72
org-export-as-html-to-buffer nil) (82 org-export-region-as-html nil)
(120 org-export-as-xoxo t) (103 org-export-generic t) (68
org-export-as-docbook t) (86 org-export-as-docbook-pdf-and-open t)
(111 org-export-as-odt t) (79 org-export-as-odt-and-open t) (106
org-export-as-taskjuggler t) (74 org-export-as-taskjuggler-and-open t)
(109 org-export-as-freemind t) (108 org-export-as-latex t) (112
org-export-as-pdf t) (100 org-export-as-pdf-and-open t) (76
org-export-as-latex-to-buffer nil) (105 org-export-icalendar-this-file
t) (73 org-export-icalendar-all-agenda-files t) (99
org-export-icalendar-combine-agenda-files t) (70
org-publish-current-file t) (80 org-publish-current-project t) (88
org-publish t) (69 org-publish-all t)))) r1 r2 ass (cpos (point))
(cbuf (current-buffer)) bpos) (save-excursion (save-window-excursion
(if subtree-p (message "Export subtree: ") (message "Export buffer:
")) (delete-other-windows) (with-output-to-temp-buffer "*Org
Export/Publishing Help*" (princ help)) (org-fit-window-to-buffer
(get-buffer-window "*Org Export/Publishing Help*")) (while (eq (setq
r1 (read-char-exclusive)) 49) (cond (subtree-p (setq subtree-p nil)
(message "Export buffer: ")) ((not subtree-p) (setq subtree-p t) (setq
bpos (point)) (org-mark-subtree) (org-activate-mark) (setq regb (and
... ...)) (setq rege (and ... ...)) (message "Export subtree: "))))
(when (eq r1 32) (let ((case-fold-search t) (end (save-excursion ...
...))) (outline-next-heading) (if (re-search-backward "^[
        ]+\\(:latex_class:\\|:export_title:\\|:export_file_name:\\)[    ]+\\S-"
end t) (progn (org-back-to-heading t) (setq subtree-p t) (setq bpos
...) (message "Select command (for subtree): ") (setq r1 ...)) (error
"No enclosing node with LaTeX_CLASS or EXPORT_TITLE or
EXPORT_FILE_NAME")))))) (if (fboundp (quote redisplay)) (redisplay))
(and bpos (goto-char bpos)) (setq r2 (if (< r1 27) (+ r1 96) r1))
(unless (setq ass (assq r2 cmds)) (error "No command associated with
key %c" r1)) (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not
(org-region-active-p))) (let ((p (start-process (concat "Exporting "
(file-name-nondirectory ...)) "*Org Processes*" (expand-file-name
invocation-name invocation-directory) "-batch" "-l" user-init-file
"--eval" "(require 'org-exp)" "--eval" "(setq org-wait .2)"
(buffer-file-name) "-f" (symbol-name (nth 1 ass)))))
(set-process-sentinel p (quote org-export-process-sentinel)) (message
"Background process \"%s\": started" p)) (if subtree-p (let
(deactivate-mark) (push-mark rege t t) (goto-char regb)))
(call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window
cbuf)) (let ((cw (selected-window))) (select-window (get-buffer-window
cbuf)) (goto-char cpos) (deactivate-mark) (select-window cw)))))
  org-export(nil)
  call-interactively(org-export nil nil)

Marking the subtree first does not do that.

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]