From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug: Setting system command org-file-apps does not allow other settings to refer to it [8.2.5h (release_8.2.5h-620-g7fd183 @ /home/rrt/.emacs.d/el-get/package/elpa/org-20140210/)] Date: Wed, 23 Apr 2014 17:04:35 +0200 Message-ID: <87fvl4m6ik.fsf@bzg.ath.cx> References: <87d2hos6xc.fsf@sc3d.org> <87mwgpk214.fsf@bzg.ath.cx> <87mwgpgfvu.fsf@bzg.ath.cx> <87zjjeo6cf.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcyjA-0006cy-So for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 11:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wcyj5-0008Ch-6t for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 11:04:48 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:59793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wcyj4-0008Cb-UZ for emacs-orgmode@gnu.org; Wed, 23 Apr 2014 11:04:43 -0400 Received: by mail-we0-f171.google.com with SMTP id t61so977219wes.2 for ; Wed, 23 Apr 2014 08:04:42 -0700 (PDT) In-Reply-To: (Reuben Thomas's message of "Wed, 23 Apr 2014 14:29:44 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Reuben Thomas Cc: emacs-orgmode@gnu.org Hi Reuben, Reuben Thomas writes: > Value: ((auto-mode . emacs) > ("\\.mm\\'" . default) > ("\\.x?html?\\'" . default) > ("\\.pdf\\'" . default) > (t . "xdg-open %s") > (system . "xdg-open %s")) > > > What I've found is that, since .pdf documents can be opened in > Emacs > and since org-file-apps contains (auto-mode . emacs) as its first > element, then changing the system's value to xdg-open after that > will > fail because (auto-mode . emacs) is applied first. > > > That's interesting, but I'm no less confused. With the value above, > PDF files *are* opened with xdg-open. Okay, see those two bits of `org-file-apps' docstring: `auto-mode' Matches files that are matched by any entry in `auto-mode-alist', so all files Emacs knows how to handle. Using this with command `emacs' will open most files in Emacs. Beware that this will also open html files inside Emacs, unless you add ("html" . default) to the list as well. So (auto-mode . emacs) says to open .pdf files in emacs... but ("\\.pdf\\'" . default) says to open .pdf files using the "default" application: `default' Use the default application for this file type, which is the association for t in the list Since you have (t . "xdg-open %s"), xdg-open is used. Yep, it's all a bit tricky... -- Bastien