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?

Nick
  • 4,473
  • 4
  • 26
  • 44

1 Answers1

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))
            ))
Nsukami _
  • 6,521
  • 2
  • 23
  • 35
  • 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 '14 at 06:35
  • You can set the value that will trigger the warning. Here, 500MB (setq large-file-warning-threshold 500000000) – Nsukami _ Dec 29 '14 at 06:39
  • Wow, it works like a charm. Thank you! – Nick Dec 29 '14 at 06:45