Hi Al,

Al Haji-Ali <[email protected]> writes:

> This is another follow-up bug-report/patch from:
> https://lists.gnu.org/archive/html/auctex-devel/2025-08/msg00026.html
>
> When caching the preamble while previewing files, an ini file is
> created..  The attached places this ini file inside TeX-output-dir when
> that is non-nil.  A change to the format of the variable
> `preview-dumped-alist` was required to save the name of the output file.
>
> Best regards,
> -- Al
>
> From 61d952df797957dc66e2f065a24bd691a832b855 Mon Sep 17 00:00:00 2001
> From: Al Haji-Ali <[email protected]>
> Date: Wed, 3 Sep 2025 21:56:08 +0100
> Subject: [PATCH] Save ini preview files inside TeX-output-dir
>
> * preview.el (preview-dumped-alist): Change format to include output
> file.
> (preview-watch-preamble): Accept output file as argument to save in
> format-cons.
> (preview-unwatch-preamble, preview-mode-setup): Accommodate changes of 
> format-cons above.
> (preview-format-kill): Delete output file.
> (preview-cache-preamble): Use TeX-master-output-file instead of
> TeX-master-output for ini file.
> ---
>  preview.el | 71 ++++++++++++++++++++++++++++++------------------------
>  1 file changed, 39 insertions(+), 32 deletions(-)
>
> diff --git a/preview.el b/preview.el
> index bb0f8ee9..e86b0035 100644
> --- a/preview.el
> +++ b/preview.el
> @@ -1898,7 +1898,7 @@ definition of OV, AFTER-CHANGE, BEG, END and LENGTH."
>      (preview-format-kill format-cons)
>      (setcdr format-cons t)))
>
> -(defun preview-watch-preamble (file command format-cons)
> +(defun preview-watch-preamble (file out-file command format-cons)

Many thanks for the patch.

Before looking further, is it possible to change the signature in a
backward compatible way?  The usual practice is append new args to the
arg-list as optional ones, i.e.:

  (defun preview-watch-preamble (file command format-cons
                                 &optional out-file)

I don't think this function is widely used elsewhere, but still.

@Keita: WDYT?

Best, Arash



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to