Our great sponsors
-
peep-dired
Discontinued A convienent way to look up file contents in other window while browsing directory in dired
-
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.
-
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.
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.
See if peep-dired is something for you.
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.
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.
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: