[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Fwd: New exporter (org-e-odt) not creating content.xml
From: |
Jambunathan K |
Subject: |
[O] Fwd: New exporter (org-e-odt) not creating content.xml |
Date: |
Tue, 27 Nov 2012 21:51:03 +0530 |
---------- Forwarded message ----------
From: Jambunathan K <address@hidden>
Date: Tue, 27 Nov 2012 21:33:34 +0530
Subject: Re: New exporter (org-e-odt) not creating content.xml
To: Ista Zahn <address@hidden>
Ista Zahn <address@hidden> 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"))
| #<buffer content.xml<5>>
| 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
^^^^^^^^^^^^^^^^^^^^^^^
--