diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index 895738822..83d0a011c 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -135,8 +135,7 @@ code." (timefmt (cdr (assq :timefmt params))) (time-ind (or (cdr (assq :timeind params)) (when timefmt 1))) - (directory (and (buffer-file-name) - (file-name-directory (buffer-file-name)))) + (directory default-directory) (add-to-body (lambda (text) (setq body (concat text "\n" body))))) ;; append header argument settings to body (when missing (funcall add-to-body (format "set datafile missing '%s'" missing)))