ob-lisp: setting *default-pathname-defaults* to the directory of the Org-mode file
Thanks to Mark Cox for suggesting this change. * lisp/ob-lisp.el (org-babel-execute:lisp): Setting the value of *default-pathname-defaults* to either the value of the :dir header argument or the directory of the containing Org-mode file.
This commit is contained in:
parent
cbd4a5b764
commit
459cbd4fd8
|
@ -73,7 +73,12 @@
|
|||
(with-temp-buffer
|
||||
(insert (org-babel-expand-body:lisp body params))
|
||||
(slime-eval `(swank:eval-and-grab-output
|
||||
,(format "(progn %s)" (buffer-substring-no-properties
|
||||
,(format "(let ((*default-pathname-defaults* %S)) %s)"
|
||||
(let ((dir (if (assoc :dir params)
|
||||
(cdr (assoc :dir params))
|
||||
default-directory)))
|
||||
(when dir (concat "#P" dir)))
|
||||
(buffer-substring-no-properties
|
||||
(point-min) (point-max))))
|
||||
(cdr (assoc :package params)))))
|
||||
(org-babel-pick-name (cdr (assoc :colname-names params))
|
||||
|
|
Loading…
Reference in New Issue