unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* antipowerpoint
@ 2009-07-09  9:36 Sébastien Vauban
  0 siblings, 0 replies; only message in thread
From: Sébastien Vauban @ 2009-07-09  9:36 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hello,

I would like to read PowerPoint in Emacs as text documents, the same way we
can do it with antiword for Word documents.

So far, the following chunk of code works, but the output is not that good.

--8<---------------cut here---------------start------------->8---
(defun no-ppt (&optional filename)
  "Run ppthtml and w3m -dump on the entire buffer."
  (interactive "fPowerPoint File: ")
  (when (and filename
             (not (buffer-file-name)))
    (write-file (make-temp-file filename)))
  (erase-buffer)
  (shell-command
   (format "ppthtml %s | w3m -dump -T text/html" (buffer-file-name))
   (current-buffer))
  (setq buffer-file-name nil)
  (set-buffer-modified-p nil))
(add-to-list 'auto-mode-alist '("\\.ppt\\'" . no-ppt))
--8<---------------cut here---------------end--------------->8---

Would you have better alternatives?  Maybe converting first to HTML and then
reading that thru a text browser is not the best way to do?

Best regards,
  Seb

-- 
Sébastien Vauban


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-09  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09  9:36 antipowerpoint Sébastien Vauban

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