org-latex-preview: Change preview hashing parameters

* lisp/org-latex-preview.el (org-latex-preview--hash): Use only the
`:scale' parameter from `org-latex-preview-options' when hashing
fragments.  Other parameters like `:zoom' do not affect the content of
the image, so this helps avoid building up garbage in the org-persist
cache.  `org-latex-preview' is also faster since re-rendering images
is required less often.
This commit is contained in:
Karthik Chikmagalur 2023-05-14 17:18:57 -07:00 committed by TEC
parent b7a789dbd8
commit 513b4a1b12
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 4 additions and 2 deletions

View File

@ -1151,10 +1151,12 @@ NUMBER is the equation number that should be used, if applicable."
(sha1 (prin1-to-string
(list processing-type
preamble
org-latex-preview-options
string
(if (equal imagetype "svg")
'svg fg)
'svg
(list (plist-get
org-latex-preview-options :scale)
fg))
bg
number))))