emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87fvl4m6ik.fsf@bzg.ath.cx> (raw)
In-Reply-To: <CAOnWdohzrBQu-V=PsM+FzqgFkwugr6X7UNtvHB41vvDY_X=anA@mail.gmail.com> (Reuben Thomas's message of "Wed, 23 Apr 2014 14:29:44 +0100")

Hi Reuben,

Reuben Thomas <rrt@sc3d.org> 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

  reply	other threads:[~2014-04-23 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 23:21 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/)] Reuben Thomas
2014-03-17  2:11 ` Bastien
2014-03-17 12:18   ` Reuben Thomas
2014-03-17 12:37     ` Bastien
2014-03-17 13:17       ` Reuben Thomas
2014-04-21 19:00         ` Bastien
2014-04-23 13:29           ` Reuben Thomas
2014-04-23 15:04             ` Bastien [this message]
2014-04-27 13:54               ` Reuben Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvl4m6ik.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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