emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Fwd: New exporter (org-e-odt) not creating content.xml
Date: Tue, 27 Nov 2012 21:51:03 +0530	[thread overview]
Message-ID: <CAOjozVKnbjNMrwP78cBA=1r1uKCZRohf21cx51QH3ydcZaByAQ@mail.gmail.com> (raw)
In-Reply-To: <87624rowx5.fsf@gmail.com>

---------- Forwarded message ----------
From: Jambunathan K <kjambunathan@gmail.com>
Date: Tue, 27 Nov 2012 21:33:34 +0530
Subject: Re: New exporter (org-e-odt) not creating content.xml
To: Ista Zahn <istazahn@gmail.com>

Ista Zahn <istazahn@gmail.com> 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
             ^^^^^^^^^^^^^^^^^^^^^^^
--

  parent reply	other threads:[~2012-11-27 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 22:44 New exporter (org-e-odt) not creating content.xml Ista Zahn
2012-11-27  3:27 ` Jambunathan K
2012-11-27  8:26   ` Rainer Stengele
2012-11-27  8:40 ` Giovanni Ridolfi
2012-11-27 14:55   ` Ista Zahn
     [not found]     ` <87624rowx5.fsf@gmail.com>
2012-11-27 16:21       ` Jambunathan K [this message]
     [not found]       ` <CA+vqiLFWEkHWEGs7z=AvJjDOFy7HrHSqGNjj+9mgjfnQzyzYJg@mail.gmail.com>
2012-11-27 17:39         ` Jambunathan K
2012-11-27 17:46           ` Jambunathan K
2012-11-27 19:25             ` Ista Zahn
2012-11-28 15:15     ` Giovanni Ridolfi
2012-11-28 16:17       ` Ista Zahn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOjozVKnbjNMrwP78cBA=1r1uKCZRohf21cx51QH3ydcZaByAQ@mail.gmail.com' \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).