# HG changeset patch # User Oleksandr Gavenko # Date 1297257441 -7200 # Node ID 53f62308c963c31cbd69982fd697ec995f0ccfe5 # Parent 7d7bb0a92f2a23c798a310bffc47c5539372557f Report error if file not found. diff -r 7d7bb0a92f2a -r 53f62308c963 my-log-mode.el --- a/my-log-mode.el Wed Feb 09 15:02:41 2011 +0200 +++ b/my-log-mode.el Wed Feb 09 15:17:21 2011 +0200 @@ -32,10 +32,15 @@ (setq fline (string-to-int (match-string 2 line))) ) ) - (when (and fname (file-exists-p fname)) - (find-file-other-window fname) - (goto-line fline) + (cond + ( (and fname (file-exists-p fname)) + (find-file-other-window fname) + (goto-line fline) ) + ( t + (message "File '%s' is not found (default directory is '%s')." fname default-directory) + ) + ) )) (setq my-log-mode-map (make-sparse-keymap))