How to open different types of file with one single key in Dired?

This page summarizes the projects mentioned and recommended in the original post on /r/emacs

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • mpv.el

    control mpv for easy note taking

  • I wanted libmpv in Emacs, but it ain't happening. Emacs does not have built-in music player. I think it can play ogg files, but I am not sure. I personally use mpv, but I guess vlc is fine. You could probably use moc or mpg123 if you prefer something even lighter. But mpv plays anything and works in both Windows and gnu/linux so I prefer to use it. You can also send it directories or single files, so you can just & in a filename in Dired. Otherwise EMMS is what everyone uses. I think there is also a simpler frontend to mpv but I have no idea how good it is, I have never used it, I just remember when author announced it here in this reddit.

  • peep-dired

    Discontinued A convienent way to look up file contents in other window while browsing directory in dired

  • See if peep-dired is something for you.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • .emacs.d

    My current Emacs setup. (by amno1)

  • Just kidding. Of course you can open files with a key binding. I personally use a hacked version of openwith package. I wanted exactly same thing as you, to be able to open a file in external application with a key shortcut, so I have hacked original openwith.el to achieve this. My setup is like this: I press S- to open a file in external application. If I press just it will open a file in Emacs itself. So S- on a pdf file opens it in Okular in gnu/linux and just opens a pdf in Emacs with pdf-tools. You can see my setup on github if you are interested. Scroll down to * Pacakges/Dired.

  • openwith

    Open files with external programs (by garberw)

  • Just kidding. Of course you can open files with a key binding. I personally use a hacked version of openwith package. I wanted exactly same thing as you, to be able to open a file in external application with a key shortcut, so I have hacked original openwith.el to achieve this. My setup is like this: I press S- to open a file in external application. If I press just it will open a file in Emacs itself. So S- on a pdf file opens it in Okular in gnu/linux and just opens a pdf in Emacs with pdf-tools. You can see my setup on github if you are interested. Scroll down to * Pacakges/Dired.

  • consult

    :mag: consult.el - Consulting completing-read

  • There is a consult-file-externally command in Consult that opens a file in the default application for that file type on your system. On Linux it uses xdg-open, on Windows it uses (w32-shell-execute "open" file), on macos it uses open and on Cygwin it uses cygstart. I highly recommend Consult, but if you don't want to install it, the function is small and simple and has no dependencies:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts