help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

antipowerpoint


From: Sébastien Vauban
Subject: antipowerpoint
Date: Thu, 09 Jul 2009 11:36:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]