From 77b721fc82e29bf3a6870669ac49f0df3b76d8d4 Mon Sep 17 00:00:00 2001
From: Philippe Dosch <Philippe.Dosch@loria.fr>
Date: Thu, 14 May 2020 15:52:10 +0200
Subject: [PATCH] Ajout de openwith

---
 .emacs | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/.emacs b/.emacs
index e919577..4064c0e 100644
--- a/.emacs
+++ b/.emacs
@@ -628,6 +628,36 @@
   :config
   (edit-server-start))
 
+;; Openwith : utilsation de programmes externe lors de
+;; l'ouverture pour certains types de fichiers
+(use-package openwith
+  :ensure t
+  :config
+  (when (require 'openwith nil 'noerror)
+      (setq openwith-associations
+            (list
+             (list (openwith-make-extension-regexp
+                    '("mpg" "mpeg" "mp3" "mp4"
+                      "avi" "wmv" "wav" "mov" "flv"
+                      "ogm" "ogg" "mkv"))
+                   "vlc"
+                   '(file))
+             (list (openwith-make-extension-regexp
+                    '("xbm" "pbm" "pgm" "ppm" "pnm"
+                      "png" "gif" "bmp" "tif" "jpeg" "jpg"))
+                   "gwenview"
+                   '(file))
+             (list (openwith-make-extension-regexp
+                    '("doc" "xls" "ppt" "odt" "ods" "odg" "odp" "docx" "xlsx"))
+                   "libreoffice"
+                   '(file))
+             (list (openwith-make-extension-regexp
+                    '("pdf" "ps" "ps.gz" "dvi"))
+                   "okular"
+                   '(file))
+             ))
+      (openwith-mode 1)))
+
 ;; ===============================
 ;; Configurations variables/styles 
 ;; ===============================
-- 
GitLab