org-plot: Expand file name of output image

* lisp/org-plot.el (org-plot/gnuplot-script): The gnuplot process this
generated content is sent to may be operating in a different directory,
and hence this may write to a different file than intended.  By
expanding the file name first, this is no longer a concern.
This commit is contained in:
TEC 2021-04-26 23:38:52 +08:00
parent 73a96c63a9
commit 2c22bba4a2
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 1 additions and 1 deletions

View File

@ -570,7 +570,7 @@ manner suitable for prepending to a user-specified script."
org-plot/gnuplot-term-extra
(funcall org-plot/gnuplot-term-extra type))))
(when file ; output file
(funcall ats (format "set output '%s'" file)))
(funcall ats (format "set output '%s'" (expand-file-name file))))
(when plot-pre
(funcall ats (funcall plot-pre table data-file num-cols params plot-str)))