1

I work with attachments (C-c C-a) in Emacs Org Mode.

I configured the variable org-file-apps to open pdf with the default PDF Viewer of my OS (in my case evince in Ubuntu 18.04), when I use the key binding C-c C-a o (instead of C-c C-a **O** to force emacs to open it in emacs).

I want the same for directories, but I don't know how to configure the variable org-file-apps to start nautilus with the desired directory.

1

According to the documentation string of org-file-apps (partially quoted in the following text) and the uri-description for the nautilus command line the Elisp code at the bottom should work.

Relevant part of the documentation string of org-file-apps:

Org mode uses system defaults for different file types, but you can use this variable to set the application for a given file extension. The entries in this list are cons cells where the car identifies files and the cdr the corresponding command.

Possible values for the file identifier are:
...
`directory' Matches a directory

(setq org-file-apps (cons '(directory . "nautilus file://%s") org-file-apps))

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.