>From fd2182dd3edfb4887cb272a5c93c72660eac0efe Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 30 Apr 2016 12:59:41 +0200 Subject: [PATCH] ob-core: check argument to `goto-char' The argument to `goto-char' must not be nil, which occurs if `org-element-property' is called with nil element argument. --- lisp/ob-core.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 71c7aea..088f744 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2210,8 +2210,10 @@ INFO may provide the values of these header arguments (in the (progn (when outside-scope (widen)) (if existing-result (goto-char existing-result) - (goto-char (org-element-property :end inline)) - (skip-chars-backward " \t")) + (let ((end (org-element-property :end inline))) + (when end + (goto-char end) + (skip-chars-backward " \t")))) (unless inline (setq indent (org-get-indentation)) (forward-line 1)) -- 2.7.4