From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Fwd: New exporter (org-e-odt) not creating content.xml Date: Tue, 27 Nov 2012 21:51:03 +0530 Message-ID: References: <1354005623.49791.YahooMailNeo@web29805.mail.ird.yahoo.com> <87624rowx5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdNuL-0002ma-0E for emacs-orgmode@gnu.org; Tue, 27 Nov 2012 11:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdNuD-0004eD-47 for emacs-orgmode@gnu.org; Tue, 27 Nov 2012 11:21:12 -0500 Received: from mail-ia0-f169.google.com ([209.85.210.169]:42497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdNuC-0004e9-Ua for emacs-orgmode@gnu.org; Tue, 27 Nov 2012 11:21:05 -0500 Received: by mail-ia0-f169.google.com with SMTP id r4so11053019iaj.0 for ; Tue, 27 Nov 2012 08:21:04 -0800 (PST) In-Reply-To: <87624rowx5.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org ---------- Forwarded message ---------- From: Jambunathan K Date: Tue, 27 Nov 2012 21:33:34 +0530 Subject: Re: New exporter (org-e-odt) not creating content.xml To: Ista Zahn Ista Zahn writes: > Also, I just noticed that a content.xml buffer is created, with what > looks like the correct content. It's just not making it into the .odt > archive! I think I have some idea of what might be going wrong. Create a ielm buffer with M-x ielm RET and type out the following 4 lisp forms ONE-by-ONE. (setq org-e-odt-zip-dir (file-name-as-directory (make-temp-file "odt-" t))) (with-current-buffer (find-file-noselect (concat org-e-odt-zip-dir "content.xml") t) (buffer-file-name)) (with-current-buffer (get-file-buffer (concat org-e-odt-zip-dir "content.xml")) (save-buffer 0)) (get-file-buffer (concat org-e-odt-zip-dir "content.xml")) In my case, the session looks like this. Note that `ELISP>' you see below is the command prompt. ,---- | *** Welcome to IELM *** Type (describe-mode) for help. | ELISP> (setq org-e-odt-zip-dir (file-name-as-directory (make-temp-file "odt-" t))) | "/tmp/odt-4998J4g/" | ELISP> (with-current-buffer (find-file-noselect (concat org-e-odt-zip-dir "content.xml") t) (buffer-file-name)) | "/tmp/odt-4998J4g/content.xml" | ELISP> (with-current-buffer (get-file-buffer (concat org-e-odt-zip-dir "content.xml")) (save-buffer 0)) | nil | ELISP> (get-file-buffer (concat org-e-odt-zip-dir "content.xml")) | #> | ELISP> `---- In my case, the 3rd line also prints the following in messages buffer ,---- | Wrote /tmp/odt-4998J4g/content.xml `---- In your case, I suspect that the 3rd line will report an error and the 4th line will report a nil. If this is true, then either my understanding of `get-file-buffer' is incorrect or that `get-file-buffer' is buggy. Additional Note: 1. org-odt.el succeeds possibly because it doesn't use `get-file-buffer' at all. 2. Emacs is (confusingly) mangling filenames Wrote c:/Documents and Settings/IZAHN/Local Settings/Temp/odt-3688Mws/styles.xml ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Wrote c:/DOCUME~1/IZAHN/LOCALS~1/Temp/odt-3688Mws/mimetype ^^^^^^^^^^^^^^^^^^^^^^^ --