From 18c68c13aa1ac5c674a2366baf4bdb2e9e2ceb90 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sat, 31 Mar 2012 11:39:13 -0400 Subject: [PATCH] Revert "add the local directory to the library search path for C/C++ block compilation" This reverts commit 4202665f5b93feb2af87c50a260d5cfc1455ca73. The buffer file name is not always available (e.g., during export), so it should not be relied upon, rather a header argument should be used. --- lisp/ob-C.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index ed9f48e27..4f33fc453 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -96,15 +96,14 @@ or `org-babel-execute:C++'." (progn (with-temp-file tmp-src-file (insert full-body)) (org-babel-eval - (format "%s -o %s %s %s -I \"%s\"" + (format "%s -o %s %s %s" (cond ((equal org-babel-c-variant 'c) org-babel-C-compiler) ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler)) (org-babel-process-file-name tmp-bin-file) (mapconcat 'identity (if (listp flags) flags (list flags)) " ") - (org-babel-process-file-name tmp-src-file) - (file-name-directory (buffer-file-name))) "")))) + (org-babel-process-file-name tmp-src-file)) "")))) ((lambda (results) (org-babel-reassemble-table (if (member "vector" (cdr (assoc :result-params params)))