From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Abd=C3=B3?= Roig-Maranges Subject: [PATCH] Caching latex preview images Date: Tue, 25 Dec 2012 12:21:08 +0100 Message-ID: <87fw2us7h7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnSZP-0007Ix-9k for emacs-orgmode@gnu.org; Tue, 25 Dec 2012 06:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TnSZO-0006xC-8h for emacs-orgmode@gnu.org; Tue, 25 Dec 2012 06:21:15 -0500 Received: from mail-we0-f177.google.com ([74.125.82.177]:56830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnSZO-0006wn-1C for emacs-orgmode@gnu.org; Tue, 25 Dec 2012 06:21:14 -0500 Received: by mail-we0-f177.google.com with SMTP id x48so3567357wey.36 for ; Tue, 25 Dec 2012 03:21:12 -0800 (PST) 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 Cc: Eric Schulte --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, Org mode lost the ability to reuse already generated latex preview images in commit 27101a3e0ee7. Now it just regenerates all of them every time. I don't see a reason for removing this feature (am I missing something?), so here is a little patch reintroducing that feature. I'm also mailing the author of that commit. Abdó Roig-Maranges. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=latex-preview-caching.patch Content-Description: patch >From cd284a858a653c28e42b09fa07f172172ceba510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= Date: Tue, 23 Oct 2012 18:44:24 +0200 Subject: [PATCH] org.el: Don't re-generate latex previews if already present * org.el (org-format-latex): Do not re-generate a latex preview if the image already exists. This feature was lost in commit 27101a3e0ee7 --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ee4c70e..3ba1ab8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17636,8 +17636,9 @@ Some of the options can be changed using the variable (unless checkdir ; make sure the directory exists (setq checkdir t) (or (file-directory-p todir) (make-directory todir t))) - (org-create-formula-image - txt movefile optnew forbuffer processing-type) + (unless (file-exists-p movefile) + (org-create-formula-image + txt movefile optnew forbuffer processing-type)) (if overlays (progn (mapc (lambda (o) -- 1.8.0.2 --=-=-=--