From 8ad7b3888fae00ca003f8bac299da6bfbff78005 Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Fri, 24 Jan 2014 11:43:52 +0100 Subject: [PATCH] Improve message when file to include is missing * org.el (org-file-contents): Improve message when linked file does not exist. --- lisp/org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a225bae00..787a09f2a 100644 --- a/lisp/org.el +++ b/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))))