Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Display OpenOffice Writer files inline with odt2txt]
@ 2010-07-23  8:43 JJ
  0 siblings, 0 replies; 8+ messages in thread
From: JJ @ 2010-07-23  8:43 UTC (permalink / raw)
  To: ding

JJ writes:

> Would anyone know how I can modify maybe mm-inline-renden-with-stdin or
> what-have-you, so
>that multibyte text in the word files would be displayed properly?

So this was easier than I thought indeed, just replacing
mm-with-unibyte-buffer with mm-with-multibyte-buffer works fine... Duh...
-- 
JJ




^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Display OpenOffice Writer files inline with odt2txt]
@ 2010-07-23  8:32 JJ
  0 siblings, 0 replies; 8+ messages in thread
From: JJ @ 2010-07-23  8:32 UTC (permalink / raw)
  To: ding

Dan Christensen <jdc@uwo.ca> writes:

> Save these four lines to a file called odt2txt-stdin in your path, make
> it executable, and use it instead:

This works great, thanks a lot, now the odt document displays inline
fine.

The only problems I have remaining are with the fact that  when the file
has multibyte text, it winds up weirdly
malformed. I.e. for UTF-8 characters, they end up looking like:

\303\210\303\241

I've inspected mm-inline-render-with-stdin and yes,
it uses unibyte buffer processing to display the file. I've noticed that
mm-inline-render-with-function  enables multibyte stuff.

Would anyone know how I can modify maybe mm-inline-renden-with-stdin or
what-have-you, so
that multibyte text in the word files would be displayed properly?
-- 
JJ




^ permalink raw reply	[flat|nested] 8+ messages in thread
* Display OpenOffice Writer files inline with odt2txt]
@ 2010-07-15  7:42 JJ
  2010-07-15 14:25 ` Andreas Schwab
  0 siblings, 1 reply; 8+ messages in thread
From: JJ @ 2010-07-15  7:42 UTC (permalink / raw)
  To: ding

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-23  8:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  8:43 Display OpenOffice Writer files inline with odt2txt] JJ
  -- strict thread matches above, loose matches on Subject: below --
2010-07-23  8:32 JJ
2010-07-15  7:42 JJ
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

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).