From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Baxter Subject: Re: org-file-apps settings? Date: Fri, 16 Sep 2016 09:16:16 +0100 Message-ID: <87twdgdzu7.fsf@yandex.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkoK8-0001rC-J2 for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 04:16:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkoK3-0004PE-I4 for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 04:16:39 -0400 Received: from forward4h.cmail.yandex.net ([87.250.230.19]:44321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkoK2-0004MK-6S for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 04:16:35 -0400 In-Reply-To: (Matt Price's message of "Thu, 15 Sep 2016 09:27:02 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matt Price Cc: Org Mode On Thu, Sep 15 2016, Matt Price wrote: > hi Everyone, > I have been through this a million times, but I never seem to remember, and have a hard time finding > the answer online or in my archives. > > On a Linux system, how should I set org-file-apps to allow org to open odt files in libreoffice, html files > in Firefox, and pdf files in evince (especially in export-and-open commands)? > > I have tried a couple of htings; this is what C-h v org-file-apps currently says: > > Its value is ((remote . emacs) (system . mailcap) (t . mailcap)) > Original value was > ((auto-mode . emacs) > ("\\.mm\\'" . default) > ("\\.x?html?\\'" . default) > ("\\.pdf\\'" . default)) > > There's no /etc/mailcap on my mahcine (?), and .mailcap reads: > > */*; xdg-open "%s" > > Running `xdg-open file.odt` from a terminal will open the file in libreoffice, but exporting to odt and > opening with C-c C-e o O opens the file in emacs. What should I try next? Thank you! > m Hi Matt, I can't stand evince so I've explicitly modified the default for pdf files to open xpdf. It could also be used to make open-office files use the application you want: (add-hook 'org-mode-hook '(lambda () (delete '("\\.pdf\\'" . default) org-file-apps) (add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s")))) Best Wishes.