Subject: Re: bug#12972: 24.3.50; Move `org-open-file' and associated code out of Org mode

From: Jambunathan K <[email-masked]>
Date: Sat, 24 Nov 2012 02:00:02 +0530

"Drew Adams" <[email-masked]> writes:

> IIUC, `org-open-file' and its associated code, such as `org-file-apps',
> `org-default-apps', and `org-apps-regexp-alist', have nothing
> particularly to do with Org mode.  They constitute general-purpose code
> for opening files using associated programs.  Code that uses them
> should not need to load the Org code, and this code should be
> maintained separately for general use.

+10.

There should also be key binding within dired for opening files
"blindly". For a long time, within dired, I had `C-u RET' open file in a
system-registered app.

    (defun my-dired-find-file (&optional prefix)
      (interactive "P")
      (if prefix
          (org-open-file (dired-get-file-for-visit) 'system)
        (dired-find-file)))

    (define-key dired-mode-map "\r" 'my-dired-find-file)

When I don't have above snippet installed, I do the following.

On Windows, 

    & open

or 

    ! open

On Linux, I can do,

    C-c C-m C-l

It would be wonderful if I can just rely on Emacs to abstract out the OS
I am working on.
--