From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69809 Path: news.gmane.org!not-for-mail From: "JJ" Newsgroups: gmane.emacs.gnus.general Subject: Display OpenOffice Writer files inline with odt2txt] Date: Thu, 15 Jul 2010 03:42:25 -0400 (EDT) Message-ID: <60011.83.149.8.170.1279179745.squirrel@mail.hcoop.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1279179759 8645 80.91.229.12 (15 Jul 2010 07:42:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 07:42:39 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M18200=ding+2Daccount=gmane.org@lists.math.uh.edu Thu Jul 15 09:42:37 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OZJ5V-0000cV-TT for ding-account@gmane.org; Thu, 15 Jul 2010 09:42:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1OZJ5S-0006xj-IN for ding-account@gmane.org; Thu, 15 Jul 2010 02:42:30 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OZJ5R-0006xe-Pi for ding@lists.math.uh.edu; Thu, 15 Jul 2010 02:42:29 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OZJ5Q-0005pZ-Pz for ding@lists.math.uh.edu; Thu, 15 Jul 2010 02:42:29 -0500 Original-Received: from deleuze.hcoop.net ([69.90.123.67] ident=Debian-exim) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OZJ5O-0004Z4-00 for ; Thu, 15 Jul 2010 09:42:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=mail.hcoop.net ident=hcoop) by deleuze.hcoop.net with esmtp (Exim 4.63) (envelope-from ) id 1OZJ5N-0004yG-IS for ding@gnus.org; Thu, 15 Jul 2010 03:42:25 -0400 Original-Received: from 83.149.8.170 (SquirrelMail authenticated user jj) by mail.hcoop.net with HTTP; Thu, 15 Jul 2010 03:42:25 -0400 (EDT) User-Agent: SquirrelMail/1.4.9a X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69809 Archived-At: 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