Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
ob-gnuplot does not use the local filename for remote :dir headers. To
reproduce, evaluate
#+BEGIN_SRC gnuplot :dir /ssh:USER@HOST:~/some/dir
p sin(x)
#+END_SRC
and look at the *gnuplot* buffer for the cd line. It should say
cd "/ssh:USER@HOST:~/some/dir"
instead of
cd "~/some/dir"
Following patch fixes the issue on my end:
diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el
index 1fe99dd16..330a9a1f0 100644
--- a/lisp/ob-gnuplot.el
+++ b/lisp/ob-gnuplot.el
@@ -193,7 +193,7 @@ (defun org-babel-expand-body:gnuplot (body params)
(when epilogue (setq body (concat body "\n" epilogue)))
;; Setting the directory needs to be done first so that
;; subsequent 'output' directive goes to the right place.
- (when directory (funcall add-to-body (format "cd '%s'" directory))))
+ (when directory (funcall add-to-body (format "cd '%s'" (file-local-name
directory)))))
body))
(defun org-babel-execute:gnuplot (body params)
Emacs : GNU Emacs 32.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.4, Xaw scroll bars)
of 2026-06-25
Package: Org mode version 9.8-pre (release_9.7.8-713-g62cbac @
/home/viz/lib/emacs/straight/build/org/)