From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Motz Subject: [PATCH] org-preview-latex-fragment not working with #+latex_header:\input{} Date: Fri, 20 Apr 2012 19:28:43 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLHes-0003Yi-AO for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 13:30:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLHeq-0004B4-IR for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 13:30:09 -0400 Received: from plane.gmane.org ([80.91.229.3]:39897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLHeq-0004Ab-Bx for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 13:30:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SLHem-0003qd-6q for emacs-orgmode@gnu.org; Fri, 20 Apr 2012 19:30:04 +0200 Received: from majorana.uni-muenster.de ([128.176.202.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Apr 2012 19:30:04 +0200 Received: from b.motz by majorana.uni-muenster.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Apr 2012 19:30:04 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Bug: #+latex_header:\input{commands.tex} is not considered in org-preview-latex-fragment. Reason: the fragment is generated in /tmp from where the file commands.tex can not be found. In my case, commands.tex contains essential latex-code for displaying the latex-fragment, so I consider this to be a bug. I have set the environment variable TEXINPUTS in (org-create-formula-image) to work around this bug (see patch). However, this is the first time that I have written something like a patch and furthermore I'm not at all familiar with lisp-programming. So could you please have a look at my solution and tell me if it's complete crap and how it could be done better?! If it's no crap, I presume it should be submitted. Thank you, Benjamin --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=texinputs.patch diff --git a/org.el b/org.el.orig index 4f5bef0..b1c15fb 100644 --- a/org.el +++ b/org.el.orig @@ -17040,7 +17040,6 @@ inspection." (condition-case nil (progn (cd tmpdir) - (setenv "TEXINPUTS" concat(default-directory ":.:")) (call-process "latex" nil nil nil texfile)) (error nil)) (cd dir)) --=-=-=--