From e14a7248b0bc12ec19d6bc4754f8562ce9f69ecf Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 22 Aug 2021 09:32:05 +0200 Subject: [PATCH] Directly complain when not file are available in custom dired view Otherwise, a rather confusing error message is displayed about not being able to find a file called "Command output" in the current directory. --- site-lisp/db-utils.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index c6d6957..dd4178a 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -358,7 +358,9 @@ output, separated by \\n, when called with (file-symlink-p entry)))) (split-string (shell-command-to-string command) "\n")))) - (dired (cons "Command output" list-of-files)))) + (if (null list-of-files) + (message "No files return by command ā€œ%sā€" command) + (dired (cons "Command output" list-of-files))))) (defun db/system-open (path) "Open PATH with default program as defined by the underlying system."