[O] [PATCH] Re: [babel] Relative path for dir header argument

2012-06-04 Thread Hans-Peter Deifel
On Di, Mai 29 2012, Hans-Peter Deifel wrote:
 Currently, the 'dir'-argument only understands absolute paths, because
 it simply sets default-directory.

 I think it would be quite useful to be able to specify paths relative to
 the default-directory of the buffer. What do you think?

I tried to implement exactly that by wrapping `dir' with
`expand-file-name'. So far, it works very well. Here is the patch:

---
 lisp/ob.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index d2d94b8..509bd41 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -524,7 +524,8 @@ block.
   (nth 1 info
 (dir (cdr (assoc :dir params)))
 (default-directory
-  (or (and dir (file-name-as-directory dir)) default-directory))
+  (or (and dir (file-name-as-directory (expand-file-name dir)))
+  default-directory))
 (org-babel-call-process-region-original
  (if (boundp 'org-babel-call-process-region-original)
  org-babel-call-process-region-original
-- 
1.7.8.6



[O] [babel] Relative path for dir header argument

2012-05-29 Thread Hans-Peter Deifel
Hi all,

Currently, the 'dir'-argument only understands absolute paths, because
it simply sets default-directory.

I think it would be quite useful to be able to specify paths relative to
the default-directory of the buffer. What do you think?

Thanks in advance,
Hans-Peter