From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Re: bug: invalid export key in export visible region Date: Sun, 13 Mar 2011 20:11:03 -0700 Message-ID: References: <87d3m4m88i.wl%dmaus@ictsoc.de> <87oc5onlmk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=35784 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PyyBW-0003Vz-Rt for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 23:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyyBU-0005pH-8v for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 23:11:06 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:61521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyyBU-0005p5-4K for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 23:11:04 -0400 Received: by yws5 with SMTP id 5so2488591yws.0 for ; Sun, 13 Mar 2011 20:11:03 -0700 (PDT) In-Reply-To: <87oc5onlmk.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: David Maus , emacs-orgmode@gnu.org On 2011-03-06, Bastien wrote: > David Maus writes: >> Samuel Wales wrote: >>> c-c c-e v H >>> c-c c-e v R >>> >>> Emacs 22, latest org git master. >> >> Thanks for the report, should be fixed by now. Thanks, David. Doesn't work for me. Also, the region gets set to only one visible line for some reason. Error is long: funcall: Wrong number of arguments: (lambda (beg end &optional body-only buffer) "Convert region from BEG to END in org-mode buffer to HTML. If prefix arg BODY-ONLY is set, omit file header, footer, and table of contents, and only produce the region of converted text, useful for cut-and-paste operations. If BUFFER is a buffer or a string, use/create that buffer as a target of the converted HTML. If BUFFER is the symbol `string', return the produced HTML as a string and leave not buffer behind. For example, a Lisp program could call this function in the following way: (setq html (org-export-region-as-html beg end t 'string)) When called interactively, the output buffer is selected, and shown in a window. A non-interactive call will only return the buffer." (interactive "r P") (when (interactive-p) (setq buffer "*Org HTML Export*")) (let ((transient-mark-mode t) (zmacs-regions t) ext-plist rtn) (setq ext-plist (plist-put ext-plist :ignore-subtree-p t)) (goto-char end) (set-mark (point)) (goto-char beg) (setq rtn (org-export-as-html nil nil ext-plist buffer body-only)) (if (fboundp (quote deactivate-mark)) (deactivate-mark)) (if (and (interactive-p) (bufferp rtn)) (switch-to-buffer-other-window rtn) rtn))), 1 Backtrace (how come Emacs doesn't include the error in the backtrace?): org-export-region-as-html(nil) funcall(org-export-region-as-html nil) (if keepp nil (funcall binding arg)) (unless keepp (funcall binding arg)) (let ((buffer-file-name file) (org-inhibit-startup t)) (org-mode) (show-all) (unless keepp (funcall binding arg))) (save-excursion (setq s (goto-char ...)) (while (not ...) (goto-char ...) (append-to-buffer buffer s ...) (setq s ...)) (org-cycle-hide-drawers (quote all)) (goto-char (point-min)) (unless keepp (if ... ...) (when ... ...)) (set-buffer buffer) (let (... ...) (org-mode) (show-all) (unless keepp ...))) (let* ((binding ...) (keepp ...) (file buffer-file-name) (buffer ...) s e) (save-excursion (goto-char ...) (while ... ... ...)) (with-current-buffer buffer (erase-buffer)) (save-excursion (setq s ...) (while ... ... ... ...) (org-cycle-hide-drawers ...) (goto-char ...) (unless keepp ... ...) (set-buffer buffer) (let ... ... ... ...)) (if (not keepp) (kill-buffer buffer) (switch-to-buffer-other-window buffer) (goto-char ...))) org-export-visible(82 nil) call-interactively(org-export-visible) (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...))) (let* ((bg ...) (subtree-p ...) (help "[t] insert the export option template [v] limit export to visible part of outline tree [1] switch buffer/subtree export [SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop) [a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer [h] export as HTML [H] to temporary buffer [R] export region [b] export as HTML and open in browser [l] export as LaTeX [L] to temporary buffer [p] export as LaTeX and process to PDF [d] ... and open PDF file [D] export as DocBook [V] export as DocBook, process to PDF, and open [j] export as TaskJuggler [J] ... and open [m] export as Freemind mind map [x] export as XOXO [g] export using Wes Hardaker's generic exporter [i] export current file as iCalendar file [I] export all agenda files as iCalendar files [c] ...as one combined file [F] publish current file [P] publish current project [X] publish a project... [E] publish every projects") (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ...)) (redisplay) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...))) ad-Orig-org-export(nil) org-export(nil) call-interactively(org-export)