From ddf4ff41d08e909e9e41a368d0dcd9a7d4234871 Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Mon, 27 Aug 2018 17:40:44 -0400 Subject: [PATCH] added nice message for open-with --- conf.org | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/conf.org b/conf.org index b719a05..07ea49a 100644 --- a/conf.org +++ b/conf.org @@ -512,12 +512,17 @@ according to mime types as listed in all available desktop files." (setq mime-alist (intersection mime-alist (nd/get-apps-from-mime mime) :test #'equal))))) - - (helm - :sources (helm-build-sync-source "Apps" - :candidates mime-alist - :action '(("Open" . (lambda (f) (nd/execute-desktop-command f file-list))))) - :buffer "*helm open with*"))))) + (if (= (length mime-alist) 0) + (let* ((ml (delete-dups (mapcan #'cdr file-mime-list))) + (mls (string-join ml ", "))) + (if (= (length ml) 1) + (message (concat "No apps found for mime type: " mls)) + (message (concat "No common apps found for mime types: " mls)))) + (helm + :sources (helm-build-sync-source "Apps" + :candidates mime-alist + :action '(("Open" . (lambda (f) (nd/execute-desktop-command f file-list))))) + :buffer "*helm open with*")))))) #+END_SRC ** compression Only supports tar.gz, tar.bz2, tar.xz, and .zip by default. Add support for more fun algos such as lzo and zpaq