4

Here is my openwith settings:

(require 'openwith)
(setq openwith-associations '(("\\.mov\\'" "smplayer" (file))))
(openwith-mode t)

When I press enter in dired mode on a .mov file, it still open it in a text buffer.

Any more settings required here?

1 Answer 1

8

This is the way I've set openwith

; Openwith
(openwith-mode t)
(setq openwith-associations
      (list (list (openwith-make-extension-regexp '("pdf"))
                  "evince" '(file))
            (list (openwith-make-extension-regexp '("flac" "mp3" "wav"))
                  "vlc" '(file))
            (list (openwith-make-extension-regexp '("avi" "flv" "mov" "mp4"
                                                    "mpeg" "mpg" "ogg" "wmv"))
                  "vlc" '(file))
            (list (openwith-make-extension-regexp '("bmp" "jpeg" "jpg" "png"))
                  "ristretto" '(file))
            (list (openwith-make-extension-regexp '("doc" "docx" "odt"))
                  "libreoffice" '("--writer" file))
            (list (openwith-make-extension-regexp '("ods" "xls" "xlsx"))
                  "libreoffice" '("--calc" file))
            (list (openwith-make-extension-regexp '("odp" "pps" "ppt" "pptx"))
                  "libreoffice" '("--impress" file))
            ))
3
  • Thank you very much! It works. BTW, when I open a mp4 file, emacs always ask me to confirm: File abc.mp4 is large (330.2M), really open? (y or n) y Can we get ride of this?
    – Nick
    Dec 29, 2014 at 6:35
  • You can set the value that will trigger the warning. Here, 500MB (setq large-file-warning-threshold 500000000)
    – Nsukami _
    Dec 29, 2014 at 6:39
  • Wow, it works like a charm. Thank you!
    – Nick
    Dec 29, 2014 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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