From 3647b622b57244e470df045ea31f1a6c6fcb0c82 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.brand@alumni.ethz.ch>
Date: Thu, 4 Feb 2016 12:42:08 +0100
Subject: [PATCH] `org-file-apps' add migration hint

* lisp/org.el (org-file-apps): Add an error when still a sexp is in
use.
---
 lisp/org.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index c93e4e1..9c6f5d0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11326,6 +11326,14 @@ If the file does not exist, an error is thrown."
       (save-match-data
 	(set-match-data link-match-data)
 	(funcall cmd file link)))
+     ((consp cmd)
+      ;; FIXME: Remove this check when most default installations of
+      ;; Emacs have at least Org 9.0.
+      ;; Heads-up instead of silently fall back to
+      ;; `org-link-frame-setup' for an old usage of `org-file-apps'
+      ;; with sexp instead of a function for `cmd'.
+      (user-error
+       "Please see Org News for version 9.0 about `org-file-apps'"))
      (t (funcall (cdr (assq 'file org-link-frame-setup)) file)))
     (and (derived-mode-p 'org-mode)
 	 (eq old-mode 'org-mode)
-- 
2.4.9 (Apple Git-60)

