Karthik Chikmagalur <[email protected]> writes:

> I'm working on org-latex-preview actively this week, so even incremental
> feedback will be helpful as I can get started on it.

Continuing code review.

One general comment - all the changes are to be marked as Org 10.0, not
9.7/9.8

Also, please address all the compiler warnings.

In org-compat, we obsolete the old functions that create latex
previews. However, due to changes in the customization
(`org-format-latex-options') that no longer contain :html-background,
the obsolete commands will be broken. You need to adjust these obsolete
functions to keep working until we remove them.

> (define-obsolete-variable-alias
>   'org-format-latex-header 'org-latex-preview-preamble "9.7")

This is not just obsoletion. The value have been changed.
We need to keep the old value, singling out the old variable.
Otherwise, the obsolete `org-create-formula-image' will stop working.

What will happen if someone uses the old default value with the new 
`org-latex-preview-preamble'?

> (define-obsolete-variable-alias
>   'org-preview-latex-default-process 'org-latex-preview-process-default "9.7")

Will the entries from org-latex-preview-process-alist work with
`org-create-formula-image'? I think they will not. In particular
old ("dvipng -D %D -T tight -o %O %f") is not compatible with
("dvipng --follow -D %D -T tight -bg Transparent --depth --height -o 
%B-%%09d.png %f")
I think we should use %O placeholder to pass the correct file name
rather than forcing "%B-%%09d.png".

> (define-obsolete-function-alias
>   'org-clear-latex-preview 'org-latex-preview-clear-overlays "9.7")

We should then also get rid of
(define-obsolete-function-alias 'org-remove-latex-fragment-image-overlays
  'org-clear-latex-preview "9.3")
That's now super-obsolete.

> (define-obsolete-function-alias
>   'org--get-display-dpi 'org-latex-preview--get-display-dpi "9.7")

This is redundant. There is no need to obsolete internal functions.

> (define-obsolete-variable-alias
>   'org-latex-to-mathml-jar-file 'org-mathml-converter-jar-file "9.7")
> (define-obsolete-variable-alias
>   'org-latex-to-mathml-convert-command 'org-mathml-convert-command "9.7")
> (define-obsolete-function-alias
>   'org-create-math-formula 'org-mathml-convert-latex "9.7")

There are still mentions to the obsolete names in the code and in the
manual.

> (define-obsolete-function-alias
>   'org-latex-mathml-directory 'org-mathml-export-directory "9.8")

Obsoletion not announced in the news.
Also, org-mathml-export-directory is ignored in the new code.

> ;; (eval-after-load 'ox-odt '(ad-deactivate 'org-format-latex-as-mathml))

There is a mention of now-obsolete `org-format-latex-as-mathml'. We can
probably remove that comment. We may also review why that comment is
there and possibly fix the issue (optional).

> (make-obsolete-variable
>  'org-preview-latex-image-directory 'org-latex-preview-cache "9.7")

The new default value is 'persist, which will break obsolete functions.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to