Browse Source

Improve message when file to include is missing

* org.el (org-file-contents): Improve message when linked file does not exist.
Sebastien Vauban 7 years ago
parent
commit
8ad7b3888f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lisp/org.el

+ 4 - 2
lisp/org.el

@@ -5235,8 +5235,10 @@ Support for group tags is controlled by the option
   (if (or (not file)
 	  (not (file-readable-p file)))
       (if noerror
-	  (message "Cannot read file \"%s\"" file)
-	(error "Cannot read file \"%s\"" file))
+	  (message "Cannot read file \"%s\" referenced in file \"%s\""
+		   file (buffer-file-name))
+	(error "Cannot read file \"%s\" referenced in file \"%s\""
+	       file (buffer-file-name)))
     (with-temp-buffer
       (insert-file-contents file)
       (buffer-string))))