From: "Abdó Roig-Maranges" <abdo.roig@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Eric Schulte <eric.schulte@gmx.com>
Subject: [PATCH] Caching latex preview images
Date: Tue, 25 Dec 2012 12:21:08 +0100 [thread overview]
Message-ID: <87fw2us7h7.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1074 bytes --]
From cd284a858a653c28e42b09fa07f172172ceba510 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= <abdo.roig@gmail.com>
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
next reply other threads:[~2012-12-25 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-25 11:21 Abdó Roig-Maranges [this message]
2012-12-28 12:24 ` [PATCH] Caching latex preview images Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw2us7h7.fsf@gmail.com \
--to=abdo.roig@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=eric.schulte@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).