[Top][All Lists]

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

Re: DocView now supports OpenDocument & MS Office formats

From: Tassilo Horn
Subject: Re: DocView now supports OpenDocument & MS Office formats
Date: Thu, 30 Dec 2010 16:48:35 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

Hi Stefan,

>> Hm, I don't know.  It mostly depends on unoconv, which in turn
>> depends on OO.org.  I have version 0.4 installed here, but at least
>> 0.3 should be fine as well.
> I see.  On my Debian machines (6 year-old Debian testing installation
> which has accumulated pretty much all packages I've ever needed during
> those years), I don't have unoconv installed, so I think there's a
> good chance that many people don't have it installed.  This fact I
> think gives a first answer to "should we add .doc and .odt to
> auto-mode-alist": only if unoconv is available.

So something along the lines of:

--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/files.el'
--- lisp/files.el       2010-12-13 15:27:36 +0000
+++ lisp/files.el       2010-12-30 15:47:14 +0000
@@ -2372,7 +2372,9 @@
      ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
      ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG
      ("\\.[eE]?[pP][sS]\\'" . ps-mode)
-     ("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
+     ,(if (executable-find "unoconv")
 . doc-view-mode)
+       '("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode))
      ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
      ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode)
      ("BROWSE\\'" . ebrowse-tree-mode)
--8<---------------cut here---------------end--------------->8---


reply via email to

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