Skip to content

Commit

Permalink
ob-gnuplot: Fix stable file collision when converting data
Browse files Browse the repository at this point in the history
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): Use cons cell
of all the code block parameters and the actual assigned variable
value to generate filename for storing the data.  This fixes a
scenario when code block has two or more variable assignments that
were wrongly saved into the same file.  Before the commit, only the
last assigned variable value has been used by gnuplot for _all_ the
variables.
  • Loading branch information
Ihor Radchenko committed Jul 19, 2022
1 parent 03543e1 commit 3b7523a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/ob-gnuplot.el
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ code."
(if tablep val (mapcar 'list val)))
;; Make temporary file name stable with respect to data.
;; If we do not do it, :cache argument becomes useless.
(org-babel-temp-stable-file params "gnuplot-")
(org-babel-temp-stable-file (cons val params) "gnuplot-")
params)
(if (and (stringp val)
(file-remote-p val) ;; check if val is a remote file
Expand Down

0 comments on commit 3b7523a

Please sign in to comment.