Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add basic instructions to README. Other minor revisions.

  • Loading branch information...
commit 7c0530af57e71f9dfda81d92c34f1dd67aefa18b 1 parent 5418ac1
@thomp authored
Showing with 16 additions and 14 deletions.
  1. +5 −0 .gitignore
  2. +6 −0 README
  3. +5 −14 dired-launch.el
View
5 .gitignore
@@ -0,0 +1,5 @@
+/dired-launch.el~
+/dired-launch.org
+/dired-launch.org~
+/xdg-notes.txt
+/xdg-notes.txt~
View
6 README
@@ -0,0 +1,6 @@
+Put dired-launch.el in ~/.emacs.d or equivalent thereof.
+
+Launch files from dired with the 'l' key.
+
+Change the preferred (default) application for a given file type by invoking mimeopen with the '-d' flag:
+ mimeopen -d myfile
View
19 dired-launch.el
@@ -1,28 +1,20 @@
;;
-;; dired-launch.el: a dired tweak -> use dired as a launcher
+;; dired-launch.el: use dired as a launcher
;;
;;
;; use:
-;; - launch files with 'l' key
-;; - change preferred application with 'mimeopen -a myfile'
+;; - launch file with the 'l' key
+;; - change a preferred application with 'mimeopen -d myfile'
;;
;; DL-MAILCAP-FRIEND defines program and associated argument(s)
(defvar dl-mailcap-friend
- ;; "exo-open"
- ;; GNOME-OPEN
- ;; KDE-OPEN
- '("mimeopen" "-n")
- ;; XDG-OPEN
- ;; - issues w/filenames with spaces (see https://bugs.archlinux.org/task/19305, https://bugs.launchpad.net/xdg-utils/+bug/220750)
- )
+ '("mimeopen" "-n"))
-;; using this is problematic since only one process can run at a time (issue: inability to specify distinct async output buffers for each process...)
(defun dired-launch-builtin
- ;; dired-do-async-shell-command has issues... but plays nicely with xdg-open
- ;; dired-do-shell-command is a drag since emacs locks until launched app terminates
+ ;; using this is problematic since only one process can run at a time (issue: inability to specify distinct async output buffers for each process...)
(dired-do-async-shell-command
(case system-type
(gnu/linux dl-mailcap-friend)
@@ -58,7 +50,6 @@
(if (eq system-type 'windows)
(dired-map-over-marks
(w32-shell-execute "open" (dired-get-filename) nil 1))
- ;; forego persistent *Async Shell Command* buffer
(save-window-excursion
(dired-launch-homebrew))))
Please sign in to comment.
Something went wrong with that request. Please try again.