diff options
| author | Paul Eggert | 2018-01-22 08:43:54 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-01-22 08:43:54 -0800 |
| commit | 35675bb93f4620c43ca766e8a2d8708fd323c684 (patch) | |
| tree | d52b1a6b58c517f53689a4f2fe513d7c78b02b1d /lisp/org/ob-gnuplot.el | |
| parent | c42959cc206bcb52baffd45f892da1b767f0f8c1 (diff) | |
| parent | 1fc98ed073a2d26ad941748ecb13aa6f47dd7b01 (diff) | |
| download | emacs-35675bb93f4620c43ca766e8a2d8708fd323c684.tar.gz emacs-35675bb93f4620c43ca766e8a2d8708fd323c684.zip | |
Merge from origin/emacs-26
1fc98ed073 ; Spelling fix
bb396a369c Update Org to v9.1.6
fa582153f7 Use text-pixels values only when saving framesets (Bug#30141)
6b01b9475d Minor improvement in section "Pages" of the usere manual
e8c8bd3de2 Minor improvements in user manual
26b8b92e63 Improve the "Mark" chapter of the user manual
759569fe40 Improve the "Buffers" chapter of the user manual
c2e6d121ff * lisp/term.el (term-send-input): Fix text duplication in ...
854a1c0a61 Improve "Buffers" in the user manual
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp/org/ob-gnuplot.el')
| -rw-r--r-- | lisp/org/ob-gnuplot.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 1acce502475..674627b8fa0 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el | |||
| @@ -116,6 +116,8 @@ code." | |||
| 116 | (timefmt (cdr (assq :timefmt params))) | 116 | (timefmt (cdr (assq :timefmt params))) |
| 117 | (time-ind (or (cdr (assq :timeind params)) | 117 | (time-ind (or (cdr (assq :timeind params)) |
| 118 | (when timefmt 1))) | 118 | (when timefmt 1))) |
| 119 | (directory (and (buffer-file-name) | ||
| 120 | (file-name-directory (buffer-file-name)))) | ||
| 119 | (add-to-body (lambda (text) (setq body (concat text "\n" body))))) | 121 | (add-to-body (lambda (text) (setq body (concat text "\n" body))))) |
| 120 | ;; append header argument settings to body | 122 | ;; append header argument settings to body |
| 121 | (when title (funcall add-to-body (format "set title '%s'" title))) | 123 | (when title (funcall add-to-body (format "set title '%s'" title))) |
| @@ -161,7 +163,10 @@ code." | |||
| 161 | (format "\\$%s" (car pair)) (cdr pair) body))) | 163 | (format "\\$%s" (car pair)) (cdr pair) body))) |
| 162 | vars) | 164 | vars) |
| 163 | (when prologue (funcall add-to-body prologue)) | 165 | (when prologue (funcall add-to-body prologue)) |
| 164 | (when epilogue (setq body (concat body "\n" epilogue)))) | 166 | (when epilogue (setq body (concat body "\n" epilogue))) |
| 167 | ;; Setting the directory needs to be done first so that | ||
| 168 | ;; subsequent 'output' directive goes to the right place. | ||
| 169 | (when directory (funcall add-to-body (format "cd '%s'" directory)))) | ||
| 165 | body)) | 170 | body)) |
| 166 | 171 | ||
| 167 | (defun org-babel-execute:gnuplot (body params) | 172 | (defun org-babel-execute:gnuplot (body params) |