emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* "cannot Revert nonexistent file" on odt export
@ 2017-01-03  1:59 Matt Price
  2017-01-03  3:46 ` Matt Price
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2017-01-03  1:59 UTC (permalink / raw)
  To: Org Mode

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

I tried and then reverted a very simple change ot ox-odt.el -- I wanted to
export a unicode symbol instead of [ ] for an empty checkbox.

After this, odt export fails mysteriously with the following:

------------
Wrote /tmp/odt-3348W1J/meta.xml
Using vacuous schema
OpenDocument export failed: Cannot revert nonexistent file
/tmp/odt-3348W1J/styles.xml
Result: "OpenDocument export failed: Cannot revert nonexistent file
/tmp/odt-3348W1J/styles.xml"
------------

I tried instrumenting org-odt-export-to-odt but was not able to narrow the
error down further than:

(org-odt--export-wrap
       outfile
       (let* ((org-odt-embedded-images-count 0)
          (org-odt-embedded-formulas-count 0)
          (org-odt-automatic-styles nil)
          (org-odt-object-counters nil)
          ;; Let `htmlfontify' know that we are interested in collecting
          ;; styles.
          (hfy-user-sheet-assoc nil))
     ;; Initialize content.xml and kick-off the export process.
     (let ((output (org-export-as 'odt subtreep visible-only nil ext-plist))
           (out-buf (progn
              (require 'nxml-mode)
              (let ((nxml-auto-insert-xml-declaration-flag nil))
                (find-file-noselect
                 (concat org-odt-zip-dir "content.xml") t)))))
       (with-current-buffer out-buf (erase-buffer) (insert output)))))


i don't seem to be able to instrument the org-odt--export-wrap macro, but
maybe the error report comes from this section around line 4067:

(error
    ;; Cleanup work directory and work files.
    (funcall --cleanup-xml-buffers)
    (message "OpenDocument export failed: %s"
         (error-message-string err)

This is with a pretty recent git master w/ a few changes applied only to
ox-html.el.

~git diff master~

shows no changes to ox-odt.el, but I restarted emacs and restarted my
laptop just in case -- the problem still persists.

Thanks!

Matt

[-- Attachment #2: Type: text/html, Size: 2369 bytes --]

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

* Re: "cannot Revert nonexistent file" on odt export
  2017-01-03  1:59 "cannot Revert nonexistent file" on odt export Matt Price
@ 2017-01-03  3:46 ` Matt Price
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Price @ 2017-01-03  3:46 UTC (permalink / raw)
  To: Org Mode

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

Please ignore the noise. I had added the odt template to the file to be
exported; it included the following line:

#+ODT_STYLES_FILE:

Which I guess overrode my setting for odt_styles_dir.

solved.


On Mon, Jan 2, 2017 at 8:59 PM, Matt Price <moptop99@gmail.com> wrote:

> I tried and then reverted a very simple change ot ox-odt.el -- I wanted to
> export a unicode symbol instead of [ ] for an empty checkbox.
>
> After this, odt export fails mysteriously with the following:
>
> ------------
> Wrote /tmp/odt-3348W1J/meta.xml
> Using vacuous schema
> OpenDocument export failed: Cannot revert nonexistent file
> /tmp/odt-3348W1J/styles.xml
> Result: "OpenDocument export failed: Cannot revert nonexistent file
> /tmp/odt-3348W1J/styles.xml"
> ------------
>
> I tried instrumenting org-odt-export-to-odt but was not able to narrow the
> error down further than:
>
> (org-odt--export-wrap
>        outfile
>        (let* ((org-odt-embedded-images-count 0)
>           (org-odt-embedded-formulas-count 0)
>           (org-odt-automatic-styles nil)
>           (org-odt-object-counters nil)
>           ;; Let `htmlfontify' know that we are interested in collecting
>           ;; styles.
>           (hfy-user-sheet-assoc nil))
>      ;; Initialize content.xml and kick-off the export process.
>      (let ((output (org-export-as 'odt subtreep visible-only nil
> ext-plist))
>            (out-buf (progn
>               (require 'nxml-mode)
>               (let ((nxml-auto-insert-xml-declaration-flag nil))
>                 (find-file-noselect
>                  (concat org-odt-zip-dir "content.xml") t)))))
>        (with-current-buffer out-buf (erase-buffer) (insert output)))))
>
>
> i don't seem to be able to instrument the org-odt--export-wrap macro, but
> maybe the error report comes from this section around line 4067:
>
> (error
>     ;; Cleanup work directory and work files.
>     (funcall --cleanup-xml-buffers)
>     (message "OpenDocument export failed: %s"
>          (error-message-string err)
>
> This is with a pretty recent git master w/ a few changes applied only to
> ox-html.el.
>
> ~git diff master~
>
> shows no changes to ox-odt.el, but I restarted emacs and restarted my
> laptop just in case -- the problem still persists.
>
> Thanks!
>
> Matt
>
>
>

[-- Attachment #2: Type: text/html, Size: 3122 bytes --]

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

end of thread, other threads:[~2017-01-03  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03  1:59 "cannot Revert nonexistent file" on odt export Matt Price
2017-01-03  3:46 ` Matt Price

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