diff options
Diffstat (limited to 'lisp/org/ol-docview.el')
-rw-r--r-- | lisp/org/ol-docview.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/org/ol-docview.el b/lisp/org/ol-docview.el index 6ea224c76c8..7dbeb0ada5c 100644 --- a/lisp/org/ol-docview.el +++ b/lisp/org/ol-docview.el @@ -4,7 +4,7 @@ ;; Author: Jan Böcker <jan.boecker at jboecker dot de> ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: https://orgmode.org +;; URL: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -42,6 +42,8 @@ ;;; Code: +(require 'org-macs) +(org-assert-version) (require 'doc-view) (require 'ol) @@ -75,7 +77,9 @@ (string-to-number (match-string 2 link))))) ;; Let Org mode open the file (in-emacs = 1) to ensure ;; org-link-frame-setup is respected. - (org-open-file path 1) + (if (file-exists-p path) + (org-open-file path 1) + (error "No such file: %s" path)) (when page (doc-view-goto-page page)))) (defun org-docview-store-link () |