Gnus development mailing list
 help / color / mirror / Atom feed
From: "JJ" <ding_gnus.org@sumou.com>
To: ding@gnus.org
Subject: Display OpenOffice Writer files inline with odt2txt]
Date: Thu, 15 Jul 2010 03:42:25 -0400 (EDT)	[thread overview]
Message-ID: <60011.83.149.8.170.1279179745.squirrel@mail.hcoop.net> (raw)

Hi everybody:

In line with my experiments with antiword, I'd like to use odt2txt to
display OpenOffice Writer files inline in an Article buffer.

Using the setup:

(add-to-list 'mm-inlined-types "application/vnd.oasis.opendocument.text")
(add-to-list 'mm-inline-media-tests
	     '("application/vnd.oasis.opendocument.text"
	       (lambda (handle)
		   (mm-inline-render-with-stdin handle nil "odt2txt"))
	       identity))

doesn't work, as odt2txt doesn't work with standard input, i.e. `odt2txt
file.odt' works, but `cat file.odt | odt2txt' just displays odt2txt's
help which is what gets displayed inline when using the above setup.

I'm not sure how to pass the mime attachment directly to odt2txt and not
through standard input as mm-inline-render-with-stdin seems to be doing.

Further, using this:

(add-to-list 'mm-inlined-types "application/pdf")
(add-to-list 'mm-inline-media-tests '("application/pdf"
				      (lambda (handle)
					(let ((f (make-temp-file "mime-part" nil ".pdf")))
					  (mm-save-part-to-file data f)
					  (find-file f)))
				      identity))

I can display pdf files inline, in a new buffer, using doc-view, so was
thinking along the lines of having also a temp buffer/file for this and
passing it on to odt2txt, but don't know how to do this with an external
program, in this case odt2txt, instead of, as above, with an elisp
function.

Can anyone advise on a workable setup?
-- 
JJ





             reply	other threads:[~2010-07-15  7:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15  7:42 JJ [this message]
2010-07-15 14:25 ` Andreas Schwab
2010-07-15 18:29   ` JJ
2010-07-20  5:24     ` Leo
2010-07-20 10:57       ` JJ
2010-07-20 15:06         ` Dan Christensen
2010-07-23  8:32 JJ
2010-07-23  8:43 JJ

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

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

  git send-email \
    --in-reply-to=60011.83.149.8.170.1279179745.squirrel@mail.hcoop.net \
    --to=ding_gnus.org@sumou.com \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).