From adccb81d5415d0288b10b061c186c0c55dba3aa4 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 21 Apr 2022 19:59:09 +0800 Subject: [PATCH] ob-gnuplot.el: Honour `default-directory' * lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Do not force Gnuplot working dir to be `buffer-file-name'. Trust more configurable `default-directory'. --- lisp/ob-gnuplot.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)))