From mboxrd@z Thu Jan 1 00:00:00 1970 From: Feng Shu Subject: [patch] Using 'call-process to launch latex program Date: Tue, 01 May 2012 18:56:55 +0800 Message-ID: <87ipggb24o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPAke-0007Os-Cc for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPAkc-00088Q-JF for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:56:11 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:39132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPAkc-00087t-Aa for emacs-orgmode@gnu.org; Tue, 01 May 2012 06:56:10 -0400 Received: by pbbrp2 with SMTP id rp2so2155782pbb.0 for ; Tue, 01 May 2012 03:56:08 -0700 (PDT) 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/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-spelling-fixes.patch Content-Transfer-Encoding: quoted-printable >From 4b577b6909c57a74adf75925ea9f26e17f9ad946 Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Tue, 1 May 2012 18:48:50 +0800 Subject: [PATCH 1/2] spelling fixes * org.el (org-create-formula-image-with-imagemagick): "converte" --> "conve= rt". --- lisp/org.el | 2 +- 1 =E4=B8=AA=E6=96=87=E4=BB=B6=E8=A2=AB=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=8F=92= =E5=85=A5 1 =E8=A1=8C(+)=EF=BC=8C=E5=88=A0=E9=99=A4 1 =E8=A1=8C(-) diff --git a/lisp/org.el b/lisp/org.el index f54026c..c3f37f9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17037,7 +17037,7 @@ Some of the options can be changed using the variab= le ((eq processing-type 'imagemagick) (unless executables-checked (org-check-external-command - "converte" "you need to install imagemagick") + "convert" "you need to install imagemagick") (setq executables-checked t)) (unless (file-exists-p movefile) (org-create-formula-image-with-imagemagick --=20 1.7.10 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0002-Using-call-process-to-launch-latex-program.patch Content-Transfer-Encoding: quoted-printable >From db879ef257b28ba852e3db612205d0e259eabd9f Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Tue, 1 May 2012 18:51:17 +0800 Subject: [PATCH 2/2] Using 'call-process to launch latex program * org.el (org-create-formula-image-with-imagemagick): using function 'call-process to launch latex program instead of function 'shell-command, and when we preview formula,it will not show *shell output buffer* --- lisp/org.el | 3 ++- 1 =E4=B8=AA=E6=96=87=E4=BB=B6=E8=A2=AB=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=8F=92= =E5=85=A5 2 =E8=A1=8C(+)=EF=BC=8C=E5=88=A0=E9=99=A4 1 =E8=A1=8C(-) diff --git a/lisp/org.el b/lisp/org.el index c3f37f9..63fc5ab 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17312,7 +17312,8 @@ inspection." (save-match-data (shell-quote-argument (file-name-directory texfile))) t t cmd))) - (shell-command cmd))) + (setq cmd (split-string cmd)) + (eval (append (list 'call-process (pop cmd) nil nil nil) cmd)))) (error nil)) (cd dir)) (if (not (file-exists-p pdffile)) --=20 1.7.10 --=-=-=--