emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: bugs in export
Date: Sun, 23 Dec 2012 14:00:46 -0700	[thread overview]
Message-ID: <CAJcAo8v8f1rR7smvXBVSkVxBd8R=Z-E-ComQ3OTPbnnMwsgafw@mail.gmail.com> (raw)

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	other threads:[~2012-12-23 21:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-23 21:00 Samuel Wales [this message]
2012-12-23 23:18 ` bugs in export Samuel Wales
2012-12-23 23:19   ` Samuel Wales
2012-12-24  0:05   ` Bastien
2012-12-26 18:25     ` Samuel Wales
2012-12-29  9:56       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJcAo8v8f1rR7smvXBVSkVxBd8R=Z-E-ComQ3OTPbnnMwsgafw@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).