From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: "cannot Revert nonexistent file" on odt export Date: Mon, 2 Jan 2017 22:46:00 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c05cf9cb659370545288141 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOG31-0005zz-7F for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 22:46:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOG30-0001jP-1Z for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 22:46:03 -0500 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]:34645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cOG2z-0001j9-Rt for emacs-orgmode@gnu.org; Mon, 02 Jan 2017 22:46:01 -0500 Received: by mail-it0-x22f.google.com with SMTP id 75so73583445ite.1 for ; Mon, 02 Jan 2017 19:46:01 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --94eb2c05cf9cb659370545288141 Content-Type: text/plain; charset=UTF-8 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 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 > > > --94eb2c05cf9cb659370545288141 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Please ignore the noise. I had added the odt tem= plate to the file to be exported; it included the following line:

#+= ODT_STYLES_FILE:

Which I guess overrode my setting for odt_sty= les_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.=C2=A0

After this, odt export fails mys= teriously with the following:

------------
Wrote /tmp/odt-3348W1= J/meta.xml
Using vacuous schema
OpenDocument export failed: Cannot re= vert nonexistent file /tmp/odt-3348W1J/styles.xml
Result: "OpenDocu= ment 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
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 outfile
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let* ((org-odt-embedded-images-count 0= )
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-odt-embedded-fo= rmulas-count 0)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (= org-odt-automatic-styles nil)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (org-odt-object-counters nil)
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ;; Let `htmlfontify' know that we are interested in = collecting
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; styles.<= br>=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (hfy-user-sheet-assoc = nil))
=C2=A0=C2=A0=C2=A0 =C2=A0;; Initialize content.xml and kick-off th= e export process.
=C2=A0=C2=A0=C2=A0 =C2=A0(let ((output (org-export-as = 'odt subtreep visible-only nil ext-plist))
=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (out-buf (progn
=C2=A0=C2=A0=C2=A0 =C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 (require 'nxml-mode)
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0 (let ((nxml-auto-= insert-xml-declaration-flag nil))
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 (find-file-noselect
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= (concat org-odt-zip-dir "content.xml") t)))))
=C2=A0=C2=A0=C2= =A0 =C2=A0=C2=A0 (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
=C2=A0=C2=A0=C2=A0 ;; Cleanup wo= rk directory and work files.
=C2=A0=C2=A0=C2=A0 (funcall --cleanup-xml-b= uffers)
=C2=A0=C2=A0=C2=A0 (message "OpenDocument export failed: %s= "
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0(error-message-string= err)

This is with a pretty recent git master w/ a few ch= anges applied only to ox-html.el.=C2=A0

~git diff master~

s= hows no changes to ox-odt.el, but I restarted emacs and restarted my laptop= just in case -- the problem still persists.=C2=A0

Thank= s!

Matt



--94eb2c05cf9cb659370545288141--