GNU bug report logs - #79473
14.1.0; [PATCH] Save ini preview files inside TeX-output-dir

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: auctex; Reported by: Al Haji-Ali <abdo.haji.ali@HIDDEN>; Keywords: patch; Done: Ikumi Keita <ikumi@HIDDEN>; Maintainer for auctex is bug-auctex@HIDDEN.
bug closed, send any further explanations to 79473 <at> debbugs.gnu.org and Al Haji-Ali <abdo.haji.ali@HIDDEN> Request was from Ikumi Keita <ikumi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 12 Oct 2025 09:13:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 12 05:13:54 2025
Received: from localhost ([127.0.0.1]:47746 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7s9K-0006XJ-HO
	for submit <at> debbugs.gnu.org; Sun, 12 Oct 2025 05:13:54 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11]:45712)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ikumi@HIDDEN>)
 id 1v7s9H-0006X7-Tt
 for 79473 <at> debbugs.gnu.org; Sun, 12 Oct 2025 05:13:52 -0400
Received: from localhost (42-144-37-8.rev.home.ne.jp [42.144.37.8])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 03D1F5C;
 Sun, 12 Oct 2025 18:13:47 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#79473: 14.1.0;
 [PATCH] Save ini preview files inside TeX-output-dir
In-reply-to: <m0cy6sr5ns.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
 <38329.1759076957@localhost> <m0jz1h6c1a.fsf@HIDDEN>
 <m0zfad4umd.fsf@HIDDEN> <m0cy6sr5ns.fsf@HIDDEN>
Comments: In-reply-to Al Haji-Ali <abdo.haji.ali@HIDDEN>
 message dated "Sun, 12 Oct 2025 08:32:55 +0200."
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <50117.1760260427.1@localhost>
Date: Sun, 12 Oct 2025 18:13:47 +0900
Message-ID: <50120.1760260427@localhost>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
> On 29/09/2025, Al Haji-Ali wrote:
>> Here's another patch that allows running the test in batch-mode.
> @Ikumi, is this what you had in mind regarding the test?

Yes, it looks good to me. Sorry, I was lazy to look over your proposal.
I'll install this fix and close this bug. Thank you so much for your
cooperation.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopGenocide #CeasefireNOW




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 12 Oct 2025 06:38:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 12 02:38:00 2025
Received: from localhost ([127.0.0.1]:47577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7piS-0005wl-HZ
	for submit <at> debbugs.gnu.org; Sun, 12 Oct 2025 02:38:00 -0400
Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:60683)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v7piP-0005wL-UC
 for 79473 <at> debbugs.gnu.org; Sun, 12 Oct 2025 02:37:58 -0400
Received: by mail-ej1-x630.google.com with SMTP id
 a640c23a62f3a-b457d93c155so524184866b.1
 for <79473 <at> debbugs.gnu.org>; Sat, 11 Oct 2025 23:37:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760251072; x=1760855872; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=/wG42yHsWWVdC6R2m5C2Mtlqi6PJXWHnZDP/Vzl4/1Y=;
 b=bpi2qVUYm6H9PFK+ODhIeqS8IxLQXaMYgm7UoBQxRn3fmL6LXMrANMjOwUBqFlu6Q0
 adzDWTvETDqs2XFkvm8ed5yRcrnyBpE9AWJKMmlO5N8gP6oLyHR7jVIk/PqVsVVGxf/Z
 HlCjUiyW2foaCK75sFnR2ihE+aXIpC65DQp7blaibSyQgXwGZsijTryeRy7tf8Zb8MXd
 O4gAvEaR7HPZ7tEQOFGQibLE3KRE7P5LxHD1Ck+OguV3SpHH/Dpf9PZfwWYjEXE1V0hD
 LJ2GfbrQ8JeRMyoBl7XJe6Z2KU/jxhfzlDJYb/veBaAkZtb59R+kMKzJ48dHOIvipVRI
 BpoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760251072; x=1760855872;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=/wG42yHsWWVdC6R2m5C2Mtlqi6PJXWHnZDP/Vzl4/1Y=;
 b=YMuan5J/LR8Sg1Xx4emnoJ9DPPrU9sENOzF/XxAMIBh0ohFxazDNxmKfMDc9kAUPhf
 KozQP0PclfM0N88SzgRyOO4AAsU0v/VHmOXGSah1/MPrXtYgbGbZQvWOIRiogHvg3HsP
 TGwXkb87/3frcw6gjbclH7jiJp/wPpPNZsCnxbIwvSOSXA4TKr1YbunMBMecOzsqu9Hg
 wg07qcYkSHSx0RDUIxhdhjAXF9hWEsYD5DkKa7IkMgpkDNUZV5pVMZaV1itpe0tV9oan
 xQi8x5OElq9FxoJyYaA4oXYEOeyw+ya7vW63t7Mei3pyMz/sU+eFag9ZCztPLvMJAUBc
 PpyA==
X-Forwarded-Encrypted: i=1;
 AJvYcCWOnmNj6BcPs3DJPEeXhPNr+ur0owUoeHWK6wNko9OYSZ9wNNiXjKRUjI9dlql8Ue72+HcVtQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwXkrhRDKMwIBNo5xrQb/Rfav8I8pzMZT74MMgw8nzmF/R0dMp1
 F+7vJkYVa6qshbLQalu5oHvky6mXUY5ZFdy17ZFC1qDgnDEyWQMnJ3OX7lh2l80q9jc=
X-Gm-Gg: ASbGncsl4hZoDBYI3dBYLZhJRTBQe3c+YvJduGR4SPLQEJ/gs3I3pTY+dejeluenx/e
 U5OpRGDXftsZWhgXgKr5ouvTyoDjPfJYH4yIoQs66jVPHEJT+KjtBAe0/fAT/aZ6/t6WZymJrfI
 OlUMO0TlngKXEIi6gKrtWWRDwJzEMiwganxT9gJ+oaTuQW9WZZKJSgITEtfNOfam48qdEL1xhLq
 ABEKCi/iyszASAmsvym+iNU568w9wcJcKCDw6zMmIkhEOe4//BM4m1CJCV5G24RucdKHCBiw8WN
 GSd7gOIJJ0TqsZmJSdT7VwQ/0WiPsdWhRmuBU/HIUcBfPUUCKWifYgvEzedKqwAAnUfYx5ru35W
 YoLF/n8PpnwZDu6LNuABMGZxbgj8qJM6sbrm/y1GG5QCQVY2xdllGAjosjI0PNDdLgM+J+AoUEw
 ==
X-Google-Smtp-Source: AGHT+IF6T3rZWbt9/GulHQx/gmRI4cxLn1WFk0ahbwL2snz9YsuqKzkHce3Z+q9Uh1bPcO2i0C9IUw==
X-Received: by 2002:a17:907:807:b0:b41:f729:77b0 with SMTP id
 a640c23a62f3a-b50aa1869bfmr1794321366b.21.1760251071483; 
 Sat, 11 Oct 2025 23:37:51 -0700 (PDT)
Received: from localhost ([2a02:908:1087:8480:d07c:3b4d:eea0:bb34])
 by smtp.gmail.com with UTF8SMTPSA id
 a640c23a62f3a-b55d9525bdesm655701366b.78.2025.10.11.23.37.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 11 Oct 2025 23:37:51 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <m0zfad4umd.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
 <38329.1759076957@localhost> <m0jz1h6c1a.fsf@HIDDEN>
 <m0zfad4umd.fsf@HIDDEN>
Date: Sun, 12 Oct 2025 08:32:55 +0200
Message-ID: <m0cy6sr5ns.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


On 29/09/2025, Al Haji-Ali wrote:
> Here's another patch that allows running the test in batch-mode.
@Ikumi, is this what you had in mind regarding the test?

Best regards,
-- Al




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 29 Sep 2025 07:10:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 29 03:10:39 2025
Received: from localhost ([127.0.0.1]:50901 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v381t-0005B5-M6
	for submit <at> debbugs.gnu.org; Mon, 29 Sep 2025 03:10:39 -0400
Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:46507)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v381f-00056y-JW
 for 79473 <at> debbugs.gnu.org; Mon, 29 Sep 2025 03:10:28 -0400
Received: by mail-ej1-x629.google.com with SMTP id
 a640c23a62f3a-afcb78ead12so732946866b.1
 for <79473 <at> debbugs.gnu.org>; Mon, 29 Sep 2025 00:10:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759129817; x=1759734617; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=J2IxIpFfgFnDP0zuhO/51UTwfuUTfaebjnA18Ud9FCY=;
 b=MUkKNmuu8vjVF6vQeeOZnJwPNYBH4XxCAP4cSbbwj4PSSqX+qa+9Oh5xYkHTx+bq97
 +tJJ9ou5AiPn9BXDzPH3pvQvNTeWEdvrNESvbKs2abXyVa1uvtHJlu6mVD5cMqm74TFe
 rioMExMA38nAGbCsCyP1kkD1fhE9YhcOydVt5ydVZ9+X2TPkNtl7B0OL3YuXT7GXVmn8
 V2gfDlEFZN7dAtRsMUO3RdRsdE+IKK8E5KPg+a08ON6P8s/qzj3Nu51xC7HKaGbXCBDp
 wmltT8p+SEwg4TZy/qsrbARFjsKwx3AlsuIQsQ78+60vZaeZRSJJdO6rFpdDYxjSjRSo
 Z1JA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759129817; x=1759734617;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=J2IxIpFfgFnDP0zuhO/51UTwfuUTfaebjnA18Ud9FCY=;
 b=RIfhfNrmiPmGHMUys8EG8yCWcaLbVW4EPi+6OCqNtTGmWHwNmYnAELjo135VHR62KZ
 l6iH1a/x+kVf4qoD3d6jfH4rJpxwVK9CXH8gKhy3N8AUN6HWJN3/o0P8yZYgqSQxqkO2
 QXsiNCiaM4GCqm9TdxjOXdELyQ8aHpBgYkoVrs5NxjSlifMr6W9J4awW85cEpgg6faLz
 6lkm2jFEvyd9Le8UU/1JxorB7BhvaY6Uf3qGjlfVM6Kq+hc/77MTac9p9LLaQOOfQupz
 +dYk2AVybz+MGYt4V88MS6wXi1ABLmCvO6kegM+LJT4mNUWf31m8TryHxDsvi/C7vvmN
 kcdg==
X-Forwarded-Encrypted: i=1;
 AJvYcCX72Lw3NlgnpDQdhGqI4r0n/2teJLfpvc7HdKIvr/6Vk44GstyRL5iuhSt9De/KyK9kAPTWwQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwoeHr6HbvnCJzUymwtr5Bp/eN6ryvuGYP/sz/i/j+31Z8/gtnr
 VJ8SKCHj6AdcBiv0Xog24m8WUCoJl0+SUWxedp7FlcNAGA8gBGlc7IMr
X-Gm-Gg: ASbGncv/BpJq9uOZvrYg9WFNqEWYh6VZ57zG7Xa0oDFfKnvWm0HTLw7XC3EbbjWq4xk
 Y3iOi+fXY//gUgmzhyxHsvNpsj7O2xyzQ1iIk0uKf6lxNmsSyF/s0M2N2c0suZVWi4nf2Dpxdpr
 fVkMJcv0l9hcOJ99lKnw4BlAxvzd1MtS4yOxIRbwVaVo9+WAdUQtnaqWmDh2KbrSbkczsq8azRs
 AW03wNptJvvNAmHlsRWNOvNlMw01YJTdgU8+F++4K7uXPjEKYX2OhieED6Olru9I8UrZm24Sky4
 KAQcMrRcOhoTrH4sT61BiwsVSR90eroW9VlnY6t0i9ktFNsOGhkwUIGhXAMlPcSWsWaq9mPBqJP
 muiMKV/4/MOOrN6Rk34nxEpCKssQUHrW3oFg=
X-Google-Smtp-Source: AGHT+IES3mJ5EpfEnd79OofeUddAj13Yp1poUdS4PCAu5erZsoUsyojWL0OUJaVko8G4DjiwLIvshg==
X-Received: by 2002:a17:907:6ea3:b0:b3b:110c:d343 with SMTP id
 a640c23a62f3a-b3b110ceb7dmr660114366b.8.1759129816741; 
 Mon, 29 Sep 2025 00:10:16 -0700 (PDT)
Received: from localhost ([185.238.219.35]) by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-b3bf9924b33sm330190866b.110.2025.09.29.00.10.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 29 Sep 2025 00:10:16 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <m0jz1h6c1a.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
 <38329.1759076957@localhost> <m0jz1h6c1a.fsf@HIDDEN>
Date: Mon, 29 Sep 2025 08:53:46 +0200
Message-ID: <m0zfad4umd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Hello again,

On 29/09/2025, Al Haji-Ali wrote:
> That was what I tried first. Unfortunately, running in batch mode would require further investigations and changes.

Here's another patch that allows running the test in batch-mode.

As you can see, I had to modify `preview-get-dpi` to handle nil
dimensions which are returned in batch-mode, but I don't know if this
could possibly have other consequences if run interactively (it would
have thrown an error before).

-- Al

--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment;
 filename=Add-missing-documentation-and-test-v2.patch
Content-Transfer-Encoding: quoted-printable

From a034a594e7f5940a5f353b9278e38b53c2bc56db Mon Sep 17 00:00:00 2001
From: Al Haji-Ali <a.hajiali@HIDDEN>
Date: Sat, 27 Sep 2025 21:56:01 +0200
Subject: [PATCH] Add missing documentation and test related to
 `preview-watch-preamble'.

* NEWS.org: Record changes related to `preview-dumped-alist' and
`preview-watch-preamble'.
* preview.el (preview-watch-preamble): Add missing documentation for
optional argument.
(preview-get-dpi): Handle nil dimensions for batch mode.
* tests/latex/preview-latex-test.el (preview-cache-preamble): Add test
for `preview-cache-preamble' with non-nil `TeX-output-dir'.
---
 NEWS.org                          |  4 ++
 preview.el                        | 12 +++---
 tests/latex/preview-latex-test.el | 68 +++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index d17064e0..2df87479 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -17,6 +17,10 @@
=20
 - Add new support file =3Dstyle/fontawesome7.el=3D.
=20
+** Changed
+- Change the format of ~preview-dumped-alist~ and add new optional
+  argument to ~preview-watch-preamble~.
+
 * [14.1.0] - 2025-07-11
=20
 ** Added
diff --git a/preview.el b/preview.el
index fc0b7566..0b1d1207 100644
--- a/preview.el
+++ b/preview.el
@@ -1900,10 +1900,10 @@ definition of OV, AFTER-CHANGE, BEG, END and LENGTH=
."
=20
 (defun preview-watch-preamble (file command format-cons &optional out-file)
   "Set up a watch on master file FILE.
-FILE can be an associated buffer instead of a filename.
-COMMAND is the command that generated the format.
-FORMAT-CONS contains the format info for the main
-format dump handler."
+FILE can be an associated buffer instead of a filename.  COMMAND is the
+command that generated the format.  FORMAT-CONS contains the format info
+for the main format dump handler. If OUT-FILE is non-nil it is used
+instead of FILE to determine the dump-files."
   (let ((buffer (if (bufferp file)
                     file
                   (find-buffer-visiting file)))
@@ -3778,8 +3778,8 @@ name(\\([^)]+\\))\\)\\|\
 (defun preview-get-dpi ()
   (let* ((monitor-attrs (frame-monitor-attributes))
          (mm-dims (cdr (assoc 'mm-size monitor-attrs)))
-         (mm-width (nth 0 mm-dims))
-         (mm-height (nth 1 mm-dims))
+         (mm-width (or (nth 0 mm-dims) 1))
+         (mm-height (or (nth 1 mm-dims) 1))
          (pixel-dims (cl-cdddr (assoc 'geometry monitor-attrs)))
          (pixel-width (nth 0 pixel-dims))
          (pixel-height (nth 1 pixel-dims)))
diff --git a/tests/latex/preview-latex-test.el b/tests/latex/preview-latex-=
test.el
index 8c7d8314..8b69bb2e 100644
--- a/tests/latex/preview-latex-test.el
+++ b/tests/latex/preview-latex-test.el
@@ -23,6 +23,11 @@
=20
 (require 'ert)
 (require 'preview)
+(require 'font-latex)
+
+(AUCTeX-set-ert-path
+ 'preview-test-file
+ "../../circ.tex")
=20
 (ert-deftest preview-error-quote-utf-8 ()
   "`preview-error-quote' is robust against partial ^^-quoting or not.
@@ -42,6 +47,69 @@ emacs' coding system later."
   (dolist (str '("prim\xC3\xA1rias" "prim^^c3\xA1rias" "prim^^c3^^a1rias"))
     (should (string=3D (preview--decode-^^ab str 'utf-8) "prim=C3=A1rias")=
)))
=20
+(ert-deftest preview-cache-preamble ()
+  "Test caching of preamble with non-nil `TeX-output-dir'."
+  (let ((TeX-clean-confirm nil)
+        (preview-auto-cache-preamble nil)
+        (process-environment (copy-sequence process-environment))
+        (TeX-output-dir "auctex-output")
+        buffer1 buffer2
+        (pt-msg (with-current-buffer (messages-buffer) (point))))
+    (unwind-protect
+        (save-window-excursion
+          (setq buffer1 (find-file preview-test-file))
+          (delete-other-windows)
+          (preview-cache-preamble)
+          (setq buffer2 (TeX-active-buffer))
+          (message "Please wait for asynchronous process to finish...")
+          (while (get-buffer-process buffer2)
+            (sleep-for 1))
+          (should-error
+           (with-current-buffer (messages-buffer)
+             (goto-char pt-msg)
+             (search-forward "error in process sentinel:")))
+          (message "Please wait for asynchronous process to finish...done")
+
+          (with-current-buffer buffer1
+            ;; ini file should be deleted
+            (should-not
+             (or
+              (file-exists-p
+               (expand-file-name
+                (TeX-master-output-file "ini")))
+              (file-exists-p
+               (expand-file-name
+                (TeX-master-file "ini")))))
+            ;; fmt file should be in output-directory
+            (should
+             (file-exists-p
+              (expand-file-name
+               (preview-dump-file-name
+                (TeX-master-output-file "fmt")))))
+            ;; and not be in master directory
+            (should-not
+             (file-exists-p
+              (expand-file-name
+               (preview-dump-file-name
+                (TeX-master-file "fmt")))))))
+      ;; Cleanup.
+      (if (buffer-live-p buffer2)
+          (kill-buffer buffer2))
+      (when (buffer-live-p buffer1)
+        (set-buffer buffer1)
+        (TeX-clean t) ;; delete the log files
+        (preview-cache-preamble-off)
+
+        ;; Check clean-up
+        (should-not
+         (file-exists-p
+          (expand-file-name
+           (preview-dump-file-name
+            (TeX-master-output-file "fmt")))))
+
+        (delete-directory (expand-file-name TeX-output-dir))
+        (kill-buffer buffer1)))))
+
 ;;; preview-latex-test.el ends here
=20
 ;; Local Variables:
--=20
2.50.1 (Apple Git-155)


--=-=-=--




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 29 Sep 2025 07:00:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 29 03:00:42 2025
Received: from localhost ([127.0.0.1]:50847 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v37sH-0004EO-Gv
	for submit <at> debbugs.gnu.org; Mon, 29 Sep 2025 03:00:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49708)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1v37s7-0004CW-D8
 for 79473 <at> debbugs.gnu.org; Mon, 29 Sep 2025 03:00:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1v37rt-00055H-3W; Mon, 29 Sep 2025 03:00:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=4xsFDMkGYQhNQ12gZ/GEaMnvIXHOJBA0Q9sifkyRw5c=; b=aloMdeSJU2gc7FQ/fPIl
 ZUY85roRdcnyaCbS/vxuEC7fNV35xnDcVHbKikhTwd/ENuAAzXKYuWYmCO5Ju4PN+u7EsoKjeJuHC
 KnfonLzO53fMNv4qRBtUs+Dt7yWivlv/6b1iQe6zvfAH3+7xY03WkfOdQneN93p2ngefkpYBOy+Ob
 g6MNbKAjn8j/Tg74e6nXcslUya6XPH0WLImYxy1EAeQ5Poi74EiVt7zkKm/bS1fLGihTUEmz5kAPp
 L2V92hdFCDzzMBSQFPLbLcV9NBNnVTJVI41czqUt8iV1Bb0/LDeJgfwRJ7BDgKnd4LoLrVVq9v9uL
 iZFxL11MRAiCDg==;
From: Arash Esbati <arash@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <m04isn7gks.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
Date: Mon, 29 Sep 2025 09:00:06 +0200
Message-ID: <m2qzvpvj49.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79473
Cc: Ikumi Keita <ikumi@HIDDEN>, 79473 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Al,

Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:

> Please find the attached patch which should do all three. I based my
> test off `tests/japanese/preview-latex.el`, but I haven't written a
> auctex test before, so let me know if I am missing anything.
>
> The test should fail an old version of auctex (without the commit
> d151b5c9), but should succeed in the new one.

thanks, I installed the (slightly changed) hunks for NEWS.org and
preview.el under your name.  We now only have to sort out the test part.

Best, Arash




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 29 Sep 2025 06:00:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 29 02:00:19 2025
Received: from localhost ([127.0.0.1]:50674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v36vq-0006gt-2K
	for submit <at> debbugs.gnu.org; Mon, 29 Sep 2025 02:00:19 -0400
Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:58758)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v36vi-0006Yr-Fe
 for 79473 <at> debbugs.gnu.org; Mon, 29 Sep 2025 02:00:12 -0400
Received: by mail-ej1-x634.google.com with SMTP id
 a640c23a62f3a-b3727611c1bso745795366b.1
 for <79473 <at> debbugs.gnu.org>; Sun, 28 Sep 2025 23:00:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759125603; x=1759730403; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=ELErF+t84a9bVWf8ZPR6LAhQTOJpvgxQULA5KhrJnZo=;
 b=Gu/lKxgqyIRmh8UYDkQzNta7pg1VMX0WUy5Z22aUSU6agtaFFQKmlY70Na8N6XMp2P
 2zEGiJwdxPcVsTosZ4TcVhZZidcK1OfpkPhpC7nMjBjtPqHvevA7u9oCUpJdjaf6Tpsr
 QBd+Em/m4wSBp7U8mPz4T/ApUwWxYPkuMn2m3qTtfOkCkyS+pjXrKgpxgf0x1eF9TET8
 ZiUCSuTwl2Z0UwPcGEzXW1rbRp/32aU+lrhoKx9BA9/npKu+N/XkUadnMXFLI4aHx8az
 HAvMziQH8pAdyJrzJP5GdZbzPBGvhVrNsUPlq5qxNLd1IrULS4M8xi4g/HJ/EdgWf0Ot
 IFsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759125603; x=1759730403;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=ELErF+t84a9bVWf8ZPR6LAhQTOJpvgxQULA5KhrJnZo=;
 b=dHBSYDcyYLrvGPSMW1k+xhDICTzQ6qEkOiK03ijNuRP6+WZ2JepoAUDsLc4B1aATsc
 CTPtS/zVrX1pry4usDxqliQPns0iOJgSPnSD6m0RMDZSFx98ODhF6L2T5Dh3F1LOZLSA
 vhFrgMo0C78JTuYUSOhSggpJoIKon+Fe9OFz1WnXs4PqonmixjsfWCYQJ+XREUPngdgI
 jpuyJ+GJhFLMHiK+YqO2hVrqNYeZxRObMMscay8fXH4wAIbsW5VfX10TuSyioNZx5UOC
 UnbiJMnrCrnjSrSHbPBxGbgk11aXBIZYFY34mP+HTzRrf+dYrAF13r5m1ulD2ehdSQv9
 qXMQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCWLvrwf0es86H2iUqnW6xKdBRa38uKolw9fZgDsvEkvPeke/5HSQfJVshE1G/SEJU1fPOv88w==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxL2OsnULjfxvA1fAbICso49Itok9F5h8xNud64/c5pnHLJlAMc
 xlbXCMdtSH7qvJiC2dzfkzU1LwmiRLLQxexo7UlZyLUNeoCQZ9RVKVLx
X-Gm-Gg: ASbGncvbToN0fjSOSdxoJYPN6NnSE2uQKPf19+wBUhkrrMGe/+exZrd/LlxRckppRRG
 WWcUs78uCAsvGGDxUciX6H2PZWaQwqtQ6uKFfXdVjgRqaG8vtDyVSIc9595eAZUL7JF2HTwOAnA
 4ohZzT8rj6PNg1dYajmrrefAW7DaOJyWkh2BQPkC+9O9egt/5zbLpcUydXfoYS1jgCDyyvRzo99
 7Ts9QsMdIQ9B4sUyrlzY2iB2EDD8RecM+GhsQ2h+tIxfq03eAdWwuombBUmEf7XR+olV0URAbC7
 brClxFRKRDBnNbRy5w6weAuuHSuv58RyVchTPnznvp3BEISODDC7CMXflXyIzElvgF9EtVW24Qi
 lofrfOAdUAHIxojaEG6Rl+DLZ2Sm09RpbD8Y=
X-Google-Smtp-Source: AGHT+IHGqC/jBQjLmAvrTuB/0vbR7vPpCW439WpPKrJ8QHDV1Kj5gQCMa7Cg2AmYNw5V32NvcBUG1w==
X-Received: by 2002:a17:907:7f25:b0:b3f:f207:b755 with SMTP id
 a640c23a62f3a-b3ff207b90cmr91206666b.6.1759125603371; 
 Sun, 28 Sep 2025 23:00:03 -0700 (PDT)
Received: from localhost ([185.238.219.41]) by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-b35446f7506sm849281666b.52.2025.09.28.23.00.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 28 Sep 2025 23:00:02 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <38329.1759076957@localhost>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
 <38329.1759076957@localhost>
Date: Mon, 29 Sep 2025 07:52:17 +0200
Message-ID: <m0jz1h6c1a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Ikumi,

On 29/09/2025, Ikumi Keita wrote:
> You are following the test codes in tests/japanese directory. Is that
> really necessary? I wrote three tests `japanese-preview-shift-jis',
> `japanese-preview-different-coding-system' and
> `japanese-preview-preserve-kanji-option' to be skipped in batch mode
> because their issues involve misplacement of the preview images and thus
> require confirmation by human eyes.

That was what I tried first. Unfortunately, running in batch mode would require further investigations and changes. The first issue I ran into is that
preview-cache-preamble -> preview-generate-preview -> preview-get-geometry -> preview-get-dpi

fails in batch mode with an error:
Wrong type argument: number-or-marker-p, nil

because `frame-monitor-attributes` returns an alist with `mm-size` set to nil, when run in batch mode (but not in interactive mode).

Most likely this geometry is not needed when caching the preamble, but some further modification would be required to handle this case.

-- Al




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 28 Sep 2025 16:29:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 28 12:29:29 2025
Received: from localhost ([127.0.0.1]:47872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v2uHB-0003Rw-3H
	for submit <at> debbugs.gnu.org; Sun, 28 Sep 2025 12:29:29 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11]:37886)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ikumi@HIDDEN>)
 id 1v2uH5-0003Q2-SG
 for 79473 <at> debbugs.gnu.org; Sun, 28 Sep 2025 12:29:25 -0400
Received: from localhost (42-144-37-8.rev.home.ne.jp [42.144.37.8])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id A90E75C;
 Mon, 29 Sep 2025 01:29:18 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#79473: 14.1.0;
 [PATCH] Save ini preview files inside TeX-output-dir
In-reply-to: <m04isn7gks.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN> <m04isn7gks.fsf@HIDDEN>
Comments: In-reply-to Al Haji-Ali <abdo.haji.ali@HIDDEN>
 message dated "Sat, 27 Sep 2025 23:04:19 +0200."
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <38328.1759076957.1@localhost>
Date: Mon, 29 Sep 2025 01:29:17 +0900
Message-ID: <38329.1759076957@localhost>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Al,

>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
> Please find the attached patch which should do all three. I based my
> test off `tests/japanese/preview-latex.el`, but I haven't written a
> auctex test before, so let me know if I am missing anything.

You are following the test codes in tests/japanese directory. Is that
really necessary? I wrote three tests `japanese-preview-shift-jis',
`japanese-preview-different-coding-system' and
`japanese-preview-preserve-kanji-option' to be skipped in batch mode
because their issues involve misplacement of the preview images and thus
require confirmation by human eyes.
I expect that confirmation of the erasure of .ini file and the location
of .fmt file can be automated and don't require such human interaction.
If I'm not missing something, I'd like you to rewrite your tests to run
in batch sessions (i.e., "make" in tests/ directory).

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopGenocide #CeasefireNOW




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 27 Sep 2025 21:10:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 27 17:10:19 2025
Received: from localhost ([127.0.0.1]:42709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v2cBO-0003Yu-7v
	for submit <at> debbugs.gnu.org; Sat, 27 Sep 2025 17:10:19 -0400
Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:42269)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v2cBG-0003TS-QO
 for 79473 <at> debbugs.gnu.org; Sat, 27 Sep 2025 17:10:12 -0400
Received: by mail-ej1-x62b.google.com with SMTP id
 a640c23a62f3a-b2b4096539fso582648766b.1
 for <79473 <at> debbugs.gnu.org>; Sat, 27 Sep 2025 14:10:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759007403; x=1759612203; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=wCy58VJL038RfxWKGvB0OY7+6eUZo1Ne1IkRSH6Xfno=;
 b=f+qtiyZNRg2T2m/J1rdaXpizNCxYfkwvINPdWFQlCZszEbfI7f2avzpdF9eiXp6fyy
 WRswncNdobVLHKGNJoeWadT8kjgtkkdH+bl5XkmIGkV1qDw3jAD8Q40hPdWN5R6I6yCq
 koRMOR0Oz1gTAM2M8BovCqgV11NiyT3KcFPvT+Ybk++8NZNeAdisOz0P5NVCq9COt1Hg
 lAa/fgweFPHNamuqhIe4+s4I5jkfZaF8JgTe37I7VhLRhNNo+gQTa2ykzOzvCZF4bl/B
 nZjfQGqrAtV1oDv0vVRjplFQ8rqhLDOqO/ut2cdl8Br+V6g5UTujB0ZIDseBKXZOZc9W
 394Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759007403; x=1759612203;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=wCy58VJL038RfxWKGvB0OY7+6eUZo1Ne1IkRSH6Xfno=;
 b=TVPG6wGZpIrkJgIRwSlho932m+qBzZHL024RexY5oCPsXE2RMijo9sl3NWaKvVP5JJ
 pNNNOhXtQn+ipRRSj4Ft2QCzGRXndVMZcmKRpsxktLe6Ty10LJyjm4o5+IOPjnpMVJ9Z
 panj6xeikmQMDuDOVNvgFLFIQ+vFynfv27ViPfOjmisQAtnkaFKmfa/XqMrh0WaNJYju
 ewf/3U5/6dW3g5+ynxY8Se1dF6hAAi04C+IefJTaUvGFOPbtcNmofGqyMDzt/X/LIE+Y
 doHcZ937UYgHFBEcYwWIyJOWa0Xk62rZUsOuTLi2Yhjmsw5DgDTAFnEoneV7mbC09A4o
 olPw==
X-Gm-Message-State: AOJu0YwWAjzDUVKrPt+nGYX2RE7UmH5HXRj3bRECAA+RIVfOuFuSBJq2
 6euZgK64UazoAmtFGmB6VHSv6UzvbU6bPTRuR6FoMC8qtjfPBdlU/BD7
X-Gm-Gg: ASbGncspjNnpOzoY3DBjO71hywci7CouP/SimA4iFLAmsFcArr8T6QKGGTIY8zr/zLW
 +5mJdqBk8EvFFhiMFxazEdhhH06/19SL7AyJP8HC+b3TQxXVVGFwMzh/RvAlHNoTSMdPpsjTcv6
 NGtfa1VtejTVj5lFAESYvIY6s3GdNVUyIQh7/Kf2AJzQBb5UhesI+P+oh9IAos2fo7fPgkKd1BS
 m+umYoQ4m43phCmVfrixYz/mfQ8DkDMDkJ3h6m3FYktG3KvWj7mLAgIA3/jxDx0Cx6HHmGy9YOv
 3MRv4fDaR/g5kxWU1sQRrZuWqXu8Kg67/Em8Mg3V2IbkUPS7qU+N/W7e/lLV/rRTTblWRTl0L72
 80Zesl6YrHJ9VtNFkl17Y8X66+xF8+TX16cDm2e2GdrJwH/Su/k6o9LFz
X-Google-Smtp-Source: AGHT+IF/nlzySf9XW9vOckb3lLS4jjpcaDuQRdU53MZq1kqVdwjMeos1qhY3H/3GQ2BA2s+tXAKDzg==
X-Received: by 2002:a17:907:7fa7:b0:afe:159:14b1 with SMTP id
 a640c23a62f3a-b354a2b1cd5mr1129320966b.9.1759007402572; 
 Sat, 27 Sep 2025 14:10:02 -0700 (PDT)
Received: from localhost ([2a02:8071:6111:8ce0:a5ba:ed37:2af:73c5])
 by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-b35446f79besm621187866b.69.2025.09.27.14.10.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 27 Sep 2025 14:10:01 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Arash Esbati <arash@HIDDEN>, Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <m2plbc58oq.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
 <m2plbc58oq.fsf@HIDDEN>
Date: Sat, 27 Sep 2025 23:04:19 +0200
Message-ID: <m04isn7gks.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Disposition: inline

Hello both,

On 27/09/2025, Arash Esbati wrote:
> I think we have 3 points to address and then we can close this report:
>
> - Add a new test
> - Announce the changes in NEWS.org
> - Touch the docstring of `preview-watch-preamble' and describe the
>   optional out-file.

Please find the attached patch which should do all three. I based my
test off `tests/japanese/preview-latex.el`, but I haven't written a
auctex test before, so let me know if I am missing anything.

The test should fail an old version of auctex (without the commit
d151b5c9), but should succeed in the new one.

Best regards,
-- Al


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=Add-missing-documentation-and-test.patch
Content-Transfer-Encoding: quoted-printable

From 90242bad8a0f0ccdcfc1e408bd286d13f2f12f77 Mon Sep 17 00:00:00 2001
From: Al Haji-Ali <a.hajiali@HIDDEN>
Date: Sat, 27 Sep 2025 21:56:01 +0200
Subject: [PATCH] Add missing documentation and test related to
 `preview-watch-preamble'.

* NEWS.org: Record changes related to `preview-dumped-alist' and
`preview-watch-preamble'.
* preview.el (preview-watch-preamble): Add missing documentation for
optional argument.
* tests/latex/preview-latex-test.el (preview-cache-preamble): Add test
for `preview-cache-preamble' with non-nil `TeX-output-dir'.
---
 NEWS.org                          |  4 ++
 preview.el                        |  8 ++--
 tests/latex/preview-latex-test.el | 69 +++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 4 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index d17064e0..2df87479 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -17,6 +17,10 @@
=20
 - Add new support file =3Dstyle/fontawesome7.el=3D.
=20
+** Changed
+- Change the format of ~preview-dumped-alist~ and add new optional
+  argument to ~preview-watch-preamble~.
+
 * [14.1.0] - 2025-07-11
=20
 ** Added
diff --git a/preview.el b/preview.el
index fc0b7566..6ab43ed7 100644
--- a/preview.el
+++ b/preview.el
@@ -1900,10 +1900,10 @@ definition of OV, AFTER-CHANGE, BEG, END and LENGTH=
."
=20
 (defun preview-watch-preamble (file command format-cons &optional out-file)
   "Set up a watch on master file FILE.
-FILE can be an associated buffer instead of a filename.
-COMMAND is the command that generated the format.
-FORMAT-CONS contains the format info for the main
-format dump handler."
+FILE can be an associated buffer instead of a filename.  COMMAND is the
+command that generated the format.  FORMAT-CONS contains the format info
+for the main format dump handler. If OUT-FILE is non-nil it is used
+instead of FILE to determine the dump-files."
   (let ((buffer (if (bufferp file)
                     file
                   (find-buffer-visiting file)))
diff --git a/tests/latex/preview-latex-test.el b/tests/latex/preview-latex-=
test.el
index 8c7d8314..0fd00cd3 100644
--- a/tests/latex/preview-latex-test.el
+++ b/tests/latex/preview-latex-test.el
@@ -24,6 +24,10 @@
 (require 'ert)
 (require 'preview)
=20
+(AUCTeX-set-ert-path
+ 'preview-test-file
+ "../../circ.tex")
+
 (ert-deftest preview-error-quote-utf-8 ()
   "`preview-error-quote' is robust against partial ^^-quoting or not.
 If a utf-8 byte sequence is partially ^^-quoted in latex output, we have
@@ -42,6 +46,71 @@ emacs' coding system later."
   (dolist (str '("prim\xC3\xA1rias" "prim^^c3\xA1rias" "prim^^c3^^a1rias"))
     (should (string=3D (preview--decode-^^ab str 'utf-8) "prim=C3=A1rias")=
)))
=20
+(ert-deftest preview-cache-preamble ()
+  "Test caching of preamble with non-nil `TeX-output-dir'."
+  (skip-unless (not noninteractive))
+  (let ((TeX-clean-confirm nil)
+        (preview-auto-cache-preamble nil)
+        (process-environment (copy-sequence process-environment))
+        (TeX-output-dir "auctex-output")
+        buffer1 buffer2)
+    (unwind-protect
+        (save-window-excursion
+          (setq buffer1 (find-file preview-test-file))
+          (delete-other-windows)
+          (preview-cache-preamble)
+          (setq buffer2 (TeX-active-buffer))
+          (message "Please wait for asynchronous process to finish...")
+          (with-current-buffer buffer1
+            (while (get-buffer-process (TeX-process-buffer-name
+                                        (TeX-master-file)))
+              (sleep-for 1)))
+          ;; Actually, this type of trouble seems to be captured early by
+          ;; ert mechanism as error and not to reach here.
+          (should-not (string-match "error in process sentinel:"
+                                    (current-message)))
+          (message "Please wait for asynchronous process to finish...done")
+
+          (with-current-buffer buffer1
+            ;; ini file should be deleted
+            (should-not
+             (or
+              (file-exists-p
+               (expand-file-name
+                (TeX-master-output-file "ini")))
+              (file-exists-p
+               (expand-file-name
+                (TeX-master-file "ini")))))
+            ;; fmt file should be in output-directory
+            (should
+             (file-exists-p
+              (expand-file-name
+               (preview-dump-file-name
+                (TeX-master-output-file "fmt")))))
+            ;; and not be in master directory
+            (should-not
+             (file-exists-p
+              (expand-file-name
+               (preview-dump-file-name
+                (TeX-master-file "fmt")))))))
+      ;; Cleanup.
+      (if (buffer-live-p buffer2)
+          (kill-buffer buffer2))
+      (when (buffer-live-p buffer1)
+        (set-buffer buffer1)
+        (TeX-clean t) ;; delete the log files
+        (preview-cache-preamble-off)
+
+        ;; Check clean-up
+        (should-not
+         (file-exists-p
+          (expand-file-name
+           (preview-dump-file-name
+            (TeX-master-output-file "fmt")))))
+
+        (delete-directory (expand-file-name TeX-output-dir))
+        (kill-buffer buffer1)))))
+
 ;;; preview-latex-test.el ends here
=20
 ;; Local Variables:
--=20
2.50.1 (Apple Git-155)


--=-=-=--




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 27 Sep 2025 13:25:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 27 09:25:57 2025
Received: from localhost ([127.0.0.1]:39943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v2Uvy-0005tA-9N
	for submit <at> debbugs.gnu.org; Sat, 27 Sep 2025 09:25:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52626)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1v2Uvo-0005q8-0U
 for 79473 <at> debbugs.gnu.org; Sat, 27 Sep 2025 09:25:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1v2Uvc-0004bc-21; Sat, 27 Sep 2025 09:25:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=8e6JyUoXEfDpzALF8mzLTdFchDI2f5uT510DHYoMqAQ=; b=SOUFxtSJpQJOR6F/hDvf
 BjX7A2ZXQU2LO2ocU+lvYkNE+KKqgf1EHc5m8ckajmNFJ34eJRATRR0TqjwxCY2r2gG3H5TGiZYPd
 JSkh0QLe2OvqC8Cu9RJadO+1mfjozYoF/zIVuZ/xapu9yqGWAsiY5mbbtty7KIcrm+7jiBidqGjgd
 4uapFZg9dC3qor24X/52OJd9Mzsud2nqCFN9eX9uxogA9VkvJqV/hYqBgMJoDIc1f+QP4/gwcP7hW
 gs3w9pjqbvb+SJ5IcOyaiv/+cg22/GPalMkVcrSiKeWObZeNjwrzqZAH8Ydun8UqGhfV165U9SmmZ
 3uCj5/cIsVFbLA==;
From: Arash Esbati <arash@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <37475.1758864863@localhost>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN> <37475.1758864863@localhost>
Date: Sat, 27 Sep 2025 15:25:25 +0200
Message-ID: <m2plbc58oq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Al Haji-Ali <abdo.haji.ali@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi all,

Ikumi Keita <ikumi@HIDDEN> writes:

> OK, it seems good to me. It also passes the regression test, so I
> think we can install it.

Thanks for providing and reviewing the patch.  I installed it now
(d151b5c9).

> And I'd like to ask Al to add a new test for this fix.

I think we have 3 points to address and then we can close this report:

- Add a new test
- Announce the changes in NEWS.org
- Touch the docstring of `preview-watch-preamble' and describe the
  optional out-file.

Best, Arash




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 26 Sep 2025 05:34:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 26 01:34:40 2025
Received: from localhost ([127.0.0.1]:33846 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v216M-0005LF-GV
	for submit <at> debbugs.gnu.org; Fri, 26 Sep 2025 01:34:40 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11]:33492)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ikumi@HIDDEN>)
 id 1v216C-0005Ig-Mo
 for 79473 <at> debbugs.gnu.org; Fri, 26 Sep 2025 01:34:31 -0400
Received: from localhost (42-144-37-8.rev.home.ne.jp [42.144.37.8])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id DD18E5C;
 Fri, 26 Sep 2025 14:34:23 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Arash Esbati <arash@HIDDEN>, Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: bug#79473: 14.1.0;
 [PATCH] Save ini preview files inside TeX-output-dir
In-reply-to: <m08qi25nsc.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
 <m08qi25nsc.fsf@HIDDEN>
Comments: In-reply-to Al Haji-Ali <abdo.haji.ali@HIDDEN>
 message dated "Thu, 25 Sep 2025 21:34:43 +0200."
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <37474.1758864863.1@localhost>
Date: Fri, 26 Sep 2025 14:34:23 +0900
Message-ID: <37475.1758864863@localhost>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Al and Arash,

>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
> I am not sure if you still want the change so that at least the
> function `preview-watch-preamble` is backward compatible. I am
> attaching that version here in any case. Otherwise, this patch still
> saves the output-file as the cadr of elements of
> `preview-dumped-alist`.

OK, it seems good to me. It also passes the regression test, so I think
we can install it.
And I'd like to ask Al to add a new test for this fix.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopGenocide #CeasefireNOW




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 25 Sep 2025 19:40:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 25 15:40:16 2025
Received: from localhost ([127.0.0.1]:58888 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1rp9-0005RA-Jn
	for submit <at> debbugs.gnu.org; Thu, 25 Sep 2025 15:40:16 -0400
Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:42324)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v1rp4-0005Kf-7e
 for 79473 <at> debbugs.gnu.org; Thu, 25 Sep 2025 15:40:12 -0400
Received: by mail-ed1-x536.google.com with SMTP id
 4fb4d7f45d1cf-631df7b2dffso2885743a12.1
 for <79473 <at> debbugs.gnu.org>; Thu, 25 Sep 2025 12:40:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1758829204; x=1759434004; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=6cTXNL51IJr9N1lB3HlYtGi6548LcyGoPnEJZD58/b8=;
 b=MjgjrhFRspOfPECFiyNmek22JJlEVoTm0igXHv+/2WTylJP7p3T5rfjKh1NA68QF2J
 r0hWnIBYV69c09zJUoDlpyDFWq2m+AsQEu2nI6LIriwqaezlEI5kvb49RykdARH4ftUi
 yWDlP2OKUxUN3JVdRyvs5FsDn+n8FAMfTx/cHRxtRDQFtN4S5QjxUsapM2o77SELIKHD
 85W3bYE1bb9LVc5+S8PtqWDpMy0t1lUkJGnzq8N9MS6h8dlyMZA1/WeReQTWB0JDH/YX
 a/df72syNib+/aPBcaPXI/sKFZmXENht+NLjOUant1Q5QEK15zg7sVRmrctdbp1ZuZZT
 T3cw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1758829204; x=1759434004;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=6cTXNL51IJr9N1lB3HlYtGi6548LcyGoPnEJZD58/b8=;
 b=eo3OmWeBp+cAPNJ5Y6WGX+XK/WjDNZvb28a8qvC7yb5QYiKkiO4e0osZW9vFJV+dgc
 fehMpK+ntkyaKfRKmFsH2TF8HQxamdDX6RXfY37sIXJNfm/pG4jJv9PsMNLl8liWJ6Ck
 sCj/x6qHLPG8+qaowBsMOPDRddMSg2AOvtSjQkt9Kow3cMaxSPcnM2zaDjYxkvXxj3RH
 ivIyR4r7E3OnFxXf0xJYZd4xcmFk+suvengFYm2F0TyKHl93SzD8e0pKYVjox2xNC6CO
 Ex856ZYJf+29Ow5z0AvCCoLRKmWTBpk2i5sB5ZYa66DeZDcl+H7xmFcltXowNvoEvCHB
 zggA==
X-Gm-Message-State: AOJu0YwAaBLvHx65jywmLrxMy3SWg/r0Y8wBA21omi45jlxAV4Sm7nWT
 1JvaLHlVMbFVhWAbv42QzlTgQYPQ2C5l8f+MlMchpiJFIYrmdAaifgtA
X-Gm-Gg: ASbGnctaGQ/RT1i/ljw/bAWVB7ehO8aY+U4/YwOCHixD5CP4B/dDwtR67mjLTklIJw7
 jD7gLwjst7dri1ajfB7bIPMPzXcdzfXg9+PUIc5d38ZzJ+rDTx8k09qOaHyWOaDfvgE8SkASweq
 pCS1MOEUS6jgbjJio2MrZOUq+Ai6Hc3xIXdtGfTxXqaFAqnFE77fnfbSFY61q+hPq7obbfzP7gk
 fzjnBTpkUFlpFLCKPc1mgcRrs4i7hp1iXM3GlA2Cr/If02B3QNOTCxxQl8lt1tUZA0QkqUWqMky
 RH9eYIaQJ7m+U1G6UvA4GRPahDVh1kXObN7ZuawFBxteNyBiD4rnpZ6XUDmz1c9D5EWLPbhbG/t
 Dolbg1g5Wd40uK0v9ezTHTiEp4GnAaAEE86xJaGPigKQq
X-Google-Smtp-Source: AGHT+IH8pJOHOh9kr0PRa4+AaEXPJ1b/Q6TXU2DNtDnJNT7h5E7Ottc3swl2USTWI32FyVelnWOE4w==
X-Received: by 2002:a05:6402:5bc3:b0:62f:4d23:2e2b with SMTP id
 4fb4d7f45d1cf-634a29213e9mr2739562a12.6.1758829203582; 
 Thu, 25 Sep 2025 12:40:03 -0700 (PDT)
Received: from localhost ([2a02:908:1087:8480:b5bf:d7b8:d9d3:bfd6])
 by smtp.gmail.com with ESMTPSA id
 4fb4d7f45d1cf-634a36295a3sm1714123a12.10.2025.09.25.12.40.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 Sep 2025 12:40:02 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Arash Esbati <arash@HIDDEN>, Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <m2v7l7ovrk.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost> <m2v7l7ovrk.fsf@HIDDEN>
Date: Thu, 25 Sep 2025 21:34:43 +0200
Message-ID: <m08qi25nsc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

Hello Arash & Ikumi,


On 25/09/2025, Arash Esbati wrote:
>> Hmm. If I understand correctly, it is no longer possible to keep the
>> compatibility of the structure of (each element of)
>> `preview-dumped-alist' anyway, right?
Yes exactly. Any user code that accessed these elements using CD*R
functions would break no matter where the output-file is placed.

> Thanks for looking at this.  So, we have to bite the bullet.  Should I
> install the patch provided upthread?  We can then add something about it
> to NEWS.org.

I am not sure if you still want the change so that at least the
function `preview-watch-preamble` is backward compatible. I am
attaching that version here in any case. Otherwise, this patch still
saves the output-file as the cadr of elements of
`preview-dumped-alist`.

Best regards,
-- Al


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=preview-Save-ini-files-inside-TeX-output-dir-v2.patch

From 66aeac66585adff29e5060e0eb8f8a60a20f2962 Mon Sep 17 00:00:00 2001
From: Al Haji-Ali <a.hajiali@HIDDEN>
Date: Wed, 3 Sep 2025 21:56:08 +0100
Subject: [PATCH] preview: Save ini 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 | 77 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 42 insertions(+), 35 deletions(-)

diff --git a/preview.el b/preview.el
index bb0f8ee9..cbad6b97 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 command format-cons &optional out-file)
   "Set up a watch on master file FILE.
 FILE can be an associated buffer instead of a filename.
 COMMAND is the command that generated the format.
@@ -1906,32 +1906,35 @@ FORMAT-CONS contains the format info for the main
 format dump handler."
   (let ((buffer (if (bufferp file)
                     file
-                  (find-buffer-visiting file))) ov)
+                  (find-buffer-visiting file)))
+        ov)
     (setcdr
      format-cons
-     (cons command
-           (when buffer
-             (with-current-buffer buffer
-               (save-excursion
-                 (save-restriction
-                   (widen)
-                   (goto-char (point-min))
-                   (unless (re-search-forward preview-dump-threshold nil t)
-                     (error "Can't find preamble of `%s'" file))
-                   (setq ov (make-overlay (point-min) (point)))
-                   (overlay-put ov 'format-cons format-cons)
-                   (overlay-put ov 'insert-in-front-hooks
-                                '(preview-preamble-changed-function))
-                   (overlay-put ov 'modification-hooks
-                                '(preview-preamble-changed-function))
-                   ov))))))))
+     (cl-list*
+      (or out-file file)
+      command
+      (when buffer
+        (with-current-buffer buffer
+          (save-excursion
+            (save-restriction
+              (widen)
+              (goto-char (point-min))
+              (unless (re-search-forward preview-dump-threshold nil t)
+                (error "Can't find preamble of `%s'" file))
+              (setq ov (make-overlay (point-min) (point)))
+              (overlay-put ov 'format-cons format-cons)
+              (overlay-put ov 'insert-in-front-hooks
+                           '(preview-preamble-changed-function))
+              (overlay-put ov 'modification-hooks
+                           '(preview-preamble-changed-function))
+              ov))))))))
 
 (defun preview-unwatch-preamble (format-cons)
   "Stop watching a format on FORMAT-CONS.
 The watch has been set up by `preview-watch-preamble'."
   (when (consp (cdr format-cons))
-    (when (cddr format-cons)
-      (delete-overlay (cddr format-cons)))
+    (when (cdddr format-cons)
+      (delete-overlay (cdddr format-cons)))
     (setcdr (cdr format-cons) nil)))
 
 (defun preview-register-change (ov)
@@ -2498,10 +2501,10 @@ The elements are (NAME . ASSOC).  NAME is the master file name
 format.  Possible values: nil means no format is available
 and none should be generated.  t means no format is available,
 it should be generated on demand.  If the value is a cons cell,
-the CAR of the cons cell is the command with which the format
-has been generated, and the CDR is some Emacs-flavor specific
-value used for maintaining a watch on possible changes of the
-preamble.")
+the CAR of the cons cell is the name of output master file, the CADR of
+the cons cell is the command with which the format has been generated,
+and the CDDR is some Emacs-flavor specific value used for maintaining a
+watch on possible changes of the preamble.")
 
 (defun preview-cleanout-tempfiles ()
   "Clean out all directories and files with non-persistent data.
@@ -3156,8 +3159,9 @@ pp")
       (when (consp (cdr format-cons))
         (preview-unwatch-preamble format-cons)
         (preview-watch-preamble (current-buffer)
-                                (cadr format-cons)
-                                format-cons)))))
+                                (caddr format-cons)
+                                format-cons
+                                (cadr format-cons))))))
 
 ;;;###autoload
 (defun LaTeX-preview-setup ()
@@ -3996,10 +4000,11 @@ Those are just needed for cleanup."
   "Kill a cached format.
 FORMAT-CONS is intended to be an element of `preview-dumped-alist'.
 Tries through `preview-format-extensions'."
-  (dolist (ext preview-format-extensions)
-    (condition-case nil
-        (delete-file (preview-dump-file-name (concat (car format-cons) ext)))
-      (file-error nil))))
+  (when (consp (cdr format-cons))
+    (dolist (ext preview-format-extensions)
+      (condition-case nil
+          (delete-file (preview-dump-file-name (concat (cadr format-cons) ext)))
+        (file-error nil)))))
 
 (defun preview-dump-file-name (file)
   "Make a file name suitable for dumping from FILE."
@@ -4101,20 +4106,21 @@ If FORMAT-CONS is non-nil, a previous format may get reused."
   (interactive)
   (setq TeX-current-process-region-p nil)
   (let* ((dump-file
-          (expand-file-name (preview-dump-file-name (TeX-master-file "ini"))))
+          (expand-file-name (preview-dump-file-name (TeX-master-output-file "ini"))))
          (master (TeX-master-file))
          (format-name (expand-file-name master))
          (preview-format-name (shell-quote-argument
-                               (preview-dump-file-name (file-name-nondirectory
-                                                        master))))
+                               (preview-dump-file-name
+                                (TeX-master-output-file nil))))
          (master-file (expand-file-name (TeX-master-file t)))
+         (master-output-file (expand-file-name (TeX-master-output-file nil)))
          (command (preview-do-replacements
                    (TeX-command-expand
                     (preview-string-expand preview-LaTeX-command))
                    preview-dump-replacements))
          (preview-auto-cache-preamble nil))
     (unless (and (consp (cdr format-cons))
-                 (string= command (cadr format-cons)))
+                 (string= command (caddr format-cons)))
       (unless format-cons
         (setq format-cons (assoc format-name preview-dumped-alist)))
       (if format-cons
@@ -4162,7 +4168,8 @@ If FORMAT-CONS is non-nil, a previous format may get reused."
                           (preview-watch-preamble
                            master-file
                            command
-                           format-cons)
+                           format-cons
+                           master-output-file)
                         (preview-format-kill format-cons))
                       (delete-file dump-file))
                   (error (preview-log-error err "Dumping" process)))
-- 
2.39.5 (Apple Git-154)


--=-=-=--




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at 79473 <at> debbugs.gnu.org:


Received: (at 79473) by debbugs.gnu.org; 25 Sep 2025 07:08:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 25 03:08:31 2025
Received: from localhost ([127.0.0.1]:55169 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1g5e-0005S7-CV
	for submit <at> debbugs.gnu.org; Thu, 25 Sep 2025 03:08:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38438)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1v1g5a-0005Qn-KL
 for 79473 <at> debbugs.gnu.org; Thu, 25 Sep 2025 03:08:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1v1g5M-00054H-9S; Thu, 25 Sep 2025 03:08:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=hw27RJXqO9xunCmlfcEOo8Kc8GrZ64eLAQjUJ/WxDDc=; b=lnxbmUbCJmtVklSm221c
 eoyoV08KrGdv5SBzrl2Wcbjd8EimjkealApV7k6Am9uefEtRRDoBxyAxKPTUxjOGIW7y3kQIstR/R
 6XJ+WWrlqfkDquJCTEzGE4yw0uxelbKFU/hYLTwiNztJgRTj4MaBU6g4JYt1SkKLzl565Y2WV1GoA
 Dp7nU79vylNl0sNqbpm0CGhJQeo5X4Ui8gHurk8nUp6A1q5tkBKo6avHbKvOUT9DO3nVzE6y+tKwG
 g7sTwnTn+IXrFkRdwnQBclH/vJleZLotgV/3u8MZI7/08Uwkz1W8wyQ3BBa8y5yhf1dWkvQcI5kE1
 MWEK4fPUf5MN3A==;
From: Arash Esbati <arash@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>
Subject: Re: bug#79473: 14.1.0; [PATCH] Save ini preview files inside
 TeX-output-dir
In-Reply-To: <35122.1758735892@localhost>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
 <35122.1758735892@localhost>
Date: Thu, 25 Sep 2025 09:07:27 +0200
Message-ID: <m2v7l7ovrk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79473
Cc: 79473 <at> debbugs.gnu.org, Al Haji-Ali <abdo.haji.ali@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi all,

Ikumi Keita <ikumi@HIDDEN> writes:

>>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
>> so even adding a new element to the tail would mean that CDDDR is no
>> longer the Emacs-flavor specific value mentioned above (it would be a
>> cons of such a value with the output file).
>
> Hmm. If I understand correctly, it is no longer possible to keep the
> compatibility of the structure of (each element of)
> `preview-dumped-alist' anyway, right?
> Then I don't object strongly to have your proposal as-is, provided that
> you add explicit statement of the format change and spell out how it
> changed in NEWS.org.
> Arash, what do you think about it?

Thanks for looking at this.  So, we have to bite the bullet.  Should I
install the patch provided upthread?  We can then add something about it
to NEWS.org.

Best, Arash




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Sep 2025 17:45:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 24 13:45:48 2025
Received: from localhost ([127.0.0.1]:50720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1TYq-0003RM-1f
	for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 13:45:48 -0400
Received: from lists.gnu.org ([2001:470:142::17]:35370)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ikumi@HIDDEN>)
 id 1v1TYl-0002f3-UX
 for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 13:45:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ikumi@HIDDEN>)
 id 1v1TYU-0004mG-Iz
 for bug-auctex@HIDDEN; Wed, 24 Sep 2025 13:45:26 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ikumi@HIDDEN>)
 id 1v1TY8-00028v-5W; Wed, 24 Sep 2025 13:45:26 -0400
Received: from localhost (42-144-37-8.rev.home.ne.jp [42.144.37.8])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 232B876;
 Thu, 25 Sep 2025 02:44:52 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
In-reply-to: <m0o6r05ofd.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost> <m0o6r05ofd.fsf@HIDDEN>
Comments: In-reply-to Al Haji-Ali <abdo.haji.ali@HIDDEN>
 message dated "Wed, 24 Sep 2025 07:56:22 +0100."
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <35121.1758735892.1@localhost>
Date: Thu, 25 Sep 2025 02:44:52 +0900
Message-ID: <35122.1758735892@localhost>
Received-SPF: pass client-ip=210.129.88.11; envelope-from=ikumi@HIDDEN;
 helo=smtp1a.inetd.co.jp
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: bug-auctex@HIDDEN, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Al,

>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
> so even adding a new element to the tail would mean that CDDDR is no
> longer the Emacs-flavor specific value mentioned above (it would be a
> cons of such a value with the output file).

Hmm. If I understand correctly, it is no longer possible to keep the
compatibility of the structure of (each element of)
`preview-dumped-alist' anyway, right?
Then I don't object strongly to have your proposal as-is, provided that
you add explicit statement of the format change and spell out how it
changed in NEWS.org.
Arash, what do you think about it?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopGenocide #CeasefireNOW




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Sep 2025 07:00:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 24 03:00:27 2025
Received: from localhost ([127.0.0.1]:45909 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1JUI-0006qI-JJ
	for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 03:00:26 -0400
Received: from lists.gnu.org ([2001:470:142::17]:39390)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v1JUB-0006lB-V1
 for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 03:00:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v1JU6-0005K5-3r
 for bug-auctex@HIDDEN; Wed, 24 Sep 2025 03:00:14 -0400
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v1JU1-00013Y-2I
 for bug-auctex@HIDDEN; Wed, 24 Sep 2025 03:00:13 -0400
Received: by mail-wm1-x330.google.com with SMTP id
 5b1f17b1804b1-45b9a856dc2so43330035e9.0
 for <bug-auctex@HIDDEN>; Wed, 24 Sep 2025 00:00:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1758697204; x=1759302004; darn=gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=/940yx/Vp1U9Gj2+e4/v6yfMj5vwjXxd51WKAMHjOmk=;
 b=m7V8wTr5Y/dAxOpDDjSiKMMFr7OqeowpP4yGYykGYN7wbfaBwEUYJ9g0pPBGcjWyBa
 ISXjety7vhMayV6N2D8oZuW4rU4VEEqrM1vz286GuPZYvRY/Z3yXJ2rbmJqLbHpx5HEi
 GrzeSYC+zSHCiXqaF72jM1W25trmlq5NaHlNoIK9TBbGrnUY9bOiTVop/Yl6rO0Z4/W8
 s2WHJE3ahCtz5/ZY58TotbT/In8Q6u43eu5GZAeBJL59nWIXTmLRDYJXt1jtfoRDqc56
 +xqHQA/oyDi9u7vjMMHgc6r48wSyoGmyyTyKWq0uvnaBeKvkGLpilWrnSHfJiWzv7YhE
 brNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1758697204; x=1759302004;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=/940yx/Vp1U9Gj2+e4/v6yfMj5vwjXxd51WKAMHjOmk=;
 b=C/RkOnh2m/YElQKnJTH4ARtFeJ/Z7VruA5RJG5ZYo6A8K/LP1SP9gyvuJEd4R2RSsk
 NCVKJdT8iOI6J3ZHcD7j9L+E1UsEyeso848cvNmkSZ1+qIt6j39UqRNxVx65USGmgkpa
 f1QzkllTyWMdLU/OSRu67qYbPCreBARk0IVdUYyvZc7py/KmdDOmax5wr6Yo8n18qGfB
 EFQsxZvZUkJy+tVrggLliTesK1bepNag0YWwGPVx3TS8HDPuuwsWEnePJxIv3bz7fsdi
 MXGmxWH1d9Hs0e8jW137uV7eBdF661BC1nzUTIE4n14WOEDsliBCy+XEsF4txDDLMtEj
 ybqA==
X-Gm-Message-State: AOJu0YxGqY6u82EPwve9hodq3UtXIH4vDj17+sSM3+tMmsT68/NXOsQW
 1clkn+lmTygL5OcjHQjJsJDjTrerIAVLMMi+tGnOzyf+6pE3Jm2fAV1C
X-Gm-Gg: ASbGncs4biI0IBVdYsenR2wmUIJKcg30SIH9o3eOgz5h7EbULnutcEhFZuI4+y2X2Sf
 YLB8+Q9BX/nIo0WKTvwOwK03QRLBmWtKJa7g+FyOa7Bcgz3JvEVfhhzG0uUZAnC0Ewp3fM5cDAw
 41lV8mwewgXcYKJFz/AJfMP26unIomco/Hlka0vfvvlJrYwI/cck6XGOpxafLttfBX3DO89Ycro
 wq+/le1GlhChS0zTt6zWvDSKOKOPQM9gFfi0PXaDoO5EZle2WzEzrZPtqXary+z4TWs+mmeFg0a
 LWLamqHZd7rKWe2d3jc6u27nJD8n7LTlblzEfN7eQJFOm8vrBEMU9zI+JiRNHdY1JVlkDIRvabG
 vKrNb7jB2IvsKhMgv6mltWlOIXB4JoM6clySWPaqyQFZMHeGgtUpY9huTYVb2O/9fVKMXxAQa6R
 5WpVxrgC8zwtjnnl1KbkDEPufSShNEIUb0
X-Google-Smtp-Source: AGHT+IFIayLuOzEEbbO7Gkj9pTUigjpx/vwlBsg2c5AjLXtELpUE01AHX56maz2Wq+0yMiBDX3aAHg==
X-Received: by 2002:a05:6000:2304:b0:3fe:4fa2:8cd5 with SMTP id
 ffacd0b85a97d-405c47b8235mr4098686f8f.9.1758697204035; 
 Wed, 24 Sep 2025 00:00:04 -0700 (PDT)
Received: from localhost
 (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3f61703b206sm16596815f8f.6.2025.09.24.00.00.03
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 24 Sep 2025 00:00:03 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Ikumi Keita <ikumi@HIDDEN>, Arash Esbati <arash@HIDDEN>
Subject: Re: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
In-Reply-To: <34463.1758691372@localhost>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
 <34463.1758691372@localhost>
Date: Wed, 24 Sep 2025 07:56:22 +0100
Message-ID: <m0o6r05ofd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::330;
 envelope-from=abdo.haji.ali@HIDDEN; helo=mail-wm1-x330.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: bug-auctex@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hello Ikumi,

On 24/09/2025, Ikumi Keita wrote:
> I'm reluctant to the idea to change the structure (order) of the
> format-cons. If some third party package assumes the current structure,
> it would break with this change.
> On the other hand, I don't mind adding a new element to the tail of the
> list. So I'd like to ask Al to have output master file as the last
> element of the list.

I am happy to do this. Just wanted to mention that the previous
documentation of `preview-dumped-alist` was explicit in stating which
elements meant what.

--8<---------------cut here---------------start------------->8---
The elements are (NAME . ASSOC).  NAME is the master file name
\(without extension), ASSOC is what to do with regard to this
format.  Possible values: nil means no format is available
and none should be generated.  t means no format is available,
it should be generated on demand.  If the value is a cons cell,
the CAR of the cons cell is the name of output master file, the CADR of
the cons cell is the command with which the format has been generated,
and the CDDR is some Emacs-flavor specific value used for maintaining a
watch on possible changes of the preamble.
--8<---------------cut here---------------end--------------->8---

so even adding a new element to the tail would mean that CDDDR is no
longer the Emacs-flavor specific value mentioned above (it would be a
cons of such a value with the output file).

-- Al




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Sep 2025 05:23:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 24 01:23:23 2025
Received: from localhost ([127.0.0.1]:45155 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1HyN-0006Qo-CG
	for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 01:23:23 -0400
Received: from lists.gnu.org ([2001:470:142::17]:32966)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ikumi@HIDDEN>)
 id 1v1HyJ-0006QH-7c
 for submit <at> debbugs.gnu.org; Wed, 24 Sep 2025 01:23:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ikumi@HIDDEN>)
 id 1v1HyB-0008V4-DA
 for bug-auctex@HIDDEN; Wed, 24 Sep 2025 01:23:11 -0400
Received: from smtp1a.inetd.co.jp ([210.129.88.11])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ikumi@HIDDEN>)
 id 1v1Hy5-0003jU-9y; Wed, 24 Sep 2025 01:23:09 -0400
Received: from localhost (42-144-37-8.rev.home.ne.jp [42.144.37.8])
 by smtp1a.inetd.co.jp (Postfix) with ESMTPSA id 53B6A60;
 Wed, 24 Sep 2025 14:22:53 +0900 (JST)
From: Ikumi Keita <ikumi@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>, Arash Esbati <arash@HIDDEN>
Subject: Re: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
In-reply-to: <m21pnx8v5o.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
Comments: In-reply-to Arash Esbati <arash@HIDDEN>
 message dated "Tue, 23 Sep 2025 09:50:27 +0200."
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.2
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <34460.1758691372.1@localhost>
Date: Wed, 24 Sep 2025 14:22:52 +0900
Message-ID: <34463.1758691372@localhost>
Received-SPF: pass client-ip=210.129.88.11; envelope-from=ikumi@HIDDEN;
 helo=smtp1a.inetd.co.jp
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: bug-auctex@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Arash and Al,

>>>>> Arash Esbati <arash@HIDDEN> writes:
> 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?

>>>>> Al Haji-Ali <abdo.haji.ali@HIDDEN> writes:
> Yes of course. I thought it would be better to have it mirror the
> structure of `format-cons`, documented in `preview-dumped-alist` where
> these are taken from.

> --8<---------------cut here---------------start------------->8---
> If the value is a cons cell, the CAR of the cons cell is the name of
> output master file, the CADR of the cons cell is the command with
> which the format has been generated, and the CDDR is some Emacs-flavor
> specific value used for maintaining a watch on possible changes of the
> preamble.
> --8<---------------cut here---------------end--------------->8---

> I added the output file as the CAR rather than tack it on at the end
> since that seemed more logical to me. But let me know if this should
> be modified in a backward compatible way as well.

I'm reluctant to the idea to change the structure (order) of the
format-cons. If some third party package assumes the current structure,
it would break with this change.
On the other hand, I don't mind adding a new element to the tail of the
list. So I'd like to ask Al to have output master file as the last
element of the list.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopGenocide #CeasefireNOW




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Sep 2025 11:18:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 23 07:18:01 2025
Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v1120-0003y9-BT
	for submit <at> debbugs.gnu.org; Tue, 23 Sep 2025 07:18:01 -0400
Received: from lists.gnu.org ([2001:470:142::17]:57738)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v111w-0003xe-4d
 for submit <at> debbugs.gnu.org; Tue, 23 Sep 2025 07:17:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v111q-0004KI-AJ
 for bug-auctex@HIDDEN; Tue, 23 Sep 2025 07:17:50 -0400
Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1v111m-0004M3-H2
 for bug-auctex@HIDDEN; Tue, 23 Sep 2025 07:17:50 -0400
Received: by mail-wr1-x433.google.com with SMTP id
 ffacd0b85a97d-3f2cf786abeso2388834f8f.3
 for <bug-auctex@HIDDEN>; Tue, 23 Sep 2025 04:17:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1758626255; x=1759231055; darn=gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=F7aBF01XGGKf9UMK2ulchDpm/tCRoy79mdkyEpF+Gh8=;
 b=hZHSsdTTEIXpdh8gJEdEXBG2ymUHpd2VI4LEP2Vw9jAXVLUUOeI3MFSOjC3kcHhmk1
 nALYE1TU7dO613U58Cj31jMDkJyc7VQio488sBZRGv/Xh+6dtq2Fg4wA0xyuxSyi2Gsw
 2JhWhXYfyrC/D4R8m4cQeK4G+OaelS+zbWcWTSkNmxNPvEJDOYRjpYn+cRNVCmxsB6u2
 iGEmuG/c+oo0MZkWnuhc+tAKlASVu1tVD6Opb2OXl3+emzAUXpN/Za9zk5l1XAmhWCqx
 2LySgDGDVxcjx0lQkSN5ETPvGEQFsVXidnv7qt+PRJsnk1rDQhA6etaZyurUZcpQfsp/
 G4hQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1758626255; x=1759231055;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=F7aBF01XGGKf9UMK2ulchDpm/tCRoy79mdkyEpF+Gh8=;
 b=ZkWbgb/aAEKsbyvofJLZOqGHjhkYy0wzzSWGXuRrA7d6RPG+BYvYbDmYsc8a2F6VCp
 Vc9P4jowf2hvCllrJjnCr9KNs4nCRWkmN2Gkj6iZNcKGUDtpOfAA8mj8BrbmTLn9VHuT
 H4TkMZ2gvWINM5Ob4TiTZKqjVk98ShGKyYUVMgmuRdVP/NltUfuor0yFIW1/LI/oFMu2
 kKwFomuQlcwUNz/BiMRq40RIV+QZo6NFyxpifn2spOh0OOXZCIQ/hvqwNvsmkilTKQXl
 LBIm/wUd9AOsWgjd9SXChPy9lGn1o4Aia2bwzFOhT+R229wDvqxQ0PRqbQAFicYufb6e
 hhuQ==
X-Gm-Message-State: AOJu0YzTjplMe5+P61TAE3UhJFdM7FJYa+zOk/DYM2gwZ32JBK8XPdxZ
 efDQjumXESrGfRXzTfVqS+Gb/Smp2RiaCAHUdaOKVZdRq0uqgzEPitLJWQQGgA==
X-Gm-Gg: ASbGncskuBLUJvW9PxEdXSt2lfaZKv54cIUL1Og15EJatQufzGbfSejxfGI+4vb68SC
 ToTIMZJfwhtA6n4pIgPv1WjScb0ngwh44PaEd8WVKVovXDCXISfKzqMT9KytweRiUP5OkBnIJZP
 a4CmiQNEXJ/LsCyI+zd7vggNtmMJ2WO3lT+HybUaCgRZm72bqRRabIpg9ym1vkFdVeiBhSg1PZr
 G9T9WPkcZBaCtWFCh/fGDjkMJBOE5fMPJ6BahABOyBleieLm6xWS1PXTmtc/UdxfdFc9vPhNOdY
 EOLMJ/CTglA20oPO0lvxPmkDJD7ZXdOcatwzcQ4zkUSTI1LUu1wNPKkuaDz5sEt3RgwtY6N5uTh
 syOj63oIUyZdgVqOtIQIaMDkeCi3VJX3DGvLNAQynhAu6
X-Google-Smtp-Source: AGHT+IGbGp6uGBwSNtSvsqzWOIvsoZPBVld7+OFACj/n7nTV4umjk7sVyvi+98v/pVOB41EGYi8dQA==
X-Received: by 2002:a05:6000:2884:b0:3ee:15c6:9a60 with SMTP id
 ffacd0b85a97d-405c33a33f0mr1746876f8f.6.1758626254910; 
 Tue, 23 Sep 2025 04:17:34 -0700 (PDT)
Received: from localhost ([137.195.212.254]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3f9c62d083esm11518547f8f.32.2025.09.23.04.17.33
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 23 Sep 2025 04:17:34 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: Arash Esbati <arash@HIDDEN>
Subject: Re: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
In-Reply-To: <m21pnx8v5o.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN> <m21pnx8v5o.fsf@HIDDEN>
Date: Tue, 23 Sep 2025 09:28:21 +0100
Message-ID: <m0v7l97eu2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::433;
 envelope-from=abdo.haji.ali@HIDDEN; helo=mail-wr1-x433.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: bug-auctex@HIDDEN, Ikumi Keita <ikumi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Arash,

On 23/09/2025, Arash Esbati wrote:
> Before looking further, is it possible to change the signature in a
> backward compatible way?

Yes of course. I thought it would be better to have it mirror the
structure of `format-cons`, documented in `preview-dumped-alist` where
these are taken from.

--8<---------------cut here---------------start------------->8---
If the value is a cons cell, the CAR of the cons cell is the name of
output master file, the CADR of the cons cell is the command with
which the format has been generated, and the CDDR is some Emacs-flavor
specific value used for maintaining a watch on possible changes of the
preamble.
--8<---------------cut here---------------end--------------->8---

I added the output file as the CAR rather than tack it on at the end
since that seemed more logical to me. But let me know if this should
be modified in a backward compatible way as well.

-- Al




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Sep 2025 07:50:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 23 03:50:48 2025
Received: from localhost ([127.0.0.1]:39596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v0xnR-0006qR-48
	for submit <at> debbugs.gnu.org; Tue, 23 Sep 2025 03:50:48 -0400
Received: from lists.gnu.org ([2001:470:142::17]:52354)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1v0xnM-0006q4-Sc
 for submit <at> debbugs.gnu.org; Tue, 23 Sep 2025 03:50:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>) id 1v0xnH-0001ES-0e
 for bug-auctex@HIDDEN; Tue, 23 Sep 2025 03:50:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1v0xnD-00050y-TV; Tue, 23 Sep 2025 03:50:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=tHV+7DLa6/dYBrfX7AEk4r76jfG1Yta1T4fd69J9r3M=; b=Ab6rIgXiAdH9aPB+YdJG
 Sxlp8gRVShp+5aMVyiUskFCsVZgcFQhC6o/kqQE1HioiuSo04wM3uMNdEMWgXkzXKZNPxcCrn3hvd
 zlfaMgnhT8wRrF9nP397VKBUwT6tvuvSOXnPYYr43KPaA9Id9TAH4api/ZF4IxBWqhiam8O46Gjpm
 XdAuziEMMP1UE2epyiSUHHJyOVS8vCbKeugK/ogIEiUJJqs8T+KNVWa63KyRb52jac8vi0pjfWk8P
 En2hnpWFi7ajibGmoBfIGDLDE2qmtdj9ANpu2ymaiHXGmxRd5n3MxVlalbUBdrZre/GP0DVwI8ZZv
 c0idPl97wu2zew==;
From: Arash Esbati <arash@HIDDEN>
To: Al Haji-Ali <abdo.haji.ali@HIDDEN>
Subject: Re: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
In-Reply-To: <m0qzw2tja6.fsf@HIDDEN>
References: <m0qzw2tja6.fsf@HIDDEN>
Date: Tue, 23 Sep 2025 09:50:27 +0200
Message-ID: <m21pnx8v5o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: bug-auctex@HIDDEN, Ikumi Keita <ikumi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Al,

Al Haji-Ali <abdo.haji.ali@HIDDEN> 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 <a.hajiali@HIDDEN>
> 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




Information forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Sep 2025 18:10:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 19 14:10:25 2025
Received: from localhost ([127.0.0.1]:40988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uzfYu-0003sP-Rr
	for submit <at> debbugs.gnu.org; Fri, 19 Sep 2025 14:10:25 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60422)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1uzfYq-0003rZ-Op
 for submit <at> debbugs.gnu.org; Fri, 19 Sep 2025 14:10:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1uzfYk-0003a8-2o
 for bug-auctex@HIDDEN; Fri, 19 Sep 2025 14:10:14 -0400
Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <abdo.haji.ali@HIDDEN>)
 id 1uzfYb-0007hG-CO
 for bug-auctex@HIDDEN; Fri, 19 Sep 2025 14:10:11 -0400
Received: by mail-ed1-x529.google.com with SMTP id
 4fb4d7f45d1cf-62f4273a404so6440686a12.0
 for <bug-auctex@HIDDEN>; Fri, 19 Sep 2025 11:10:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1758305403; x=1758910203; darn=gnu.org;
 h=mime-version:message-id:date:cc:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=Ijr3Rgmy6g57lO0blVUBtzEHvD3aJTgFYbhE6rxBjMk=;
 b=IrVQQVAnHHpjnbKKy8Bty4/VgW1s4KCC7ZdY5URsB7as7XkJ/dHArJkB6pFH61AQfD
 q9vpSS2rNrvcyHVPK6ytTBKAISFBM6Awn7ZCYZmRbtp7ToQpHAFWMJv7eVTVU9cmNYOm
 C/w5d3NK72jCY6QjqdlkCkGCqEZ6tk9VYJY0rJtnBpkWgYsxwObZ5jkp5wJQo6LJ9Esc
 XrGOnvfWGDo1657M5in7SrZID/MXlrA0UbxaSig9fH/IyQPLDlD6ZKMvchotmbrWwdMk
 PuGNIJ/96T7O5816ZHD78AxW9XEFX3asa2Qpznz7GLkSHMsEFt1DpTH7ghky378fW1H2
 qO9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1758305403; x=1758910203;
 h=mime-version:message-id:date:cc:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=Ijr3Rgmy6g57lO0blVUBtzEHvD3aJTgFYbhE6rxBjMk=;
 b=d+w1u+k0KNRScqN+9kXUbHwh0SxQ6B+Y+BErLHHJJAtdOyDfrgVBVzWbJaHZ6BqvVT
 YsDplMBfkRHe8riVRTbafzSjmCxdeHfemjZ+VSvlVJlHwmpTMqXC3sI2m3JHQAavQauJ
 iY7sl9/qdowsli6qV1E+73tz4y5y9ZJDfMTuauCKEsFY8xnvN58t1wpxk9Yjoa5A8a41
 vwFDuof4ZHxyZz7dGHW5Adc9SUpHNJHN4VMR2cDaYAHBllwLTFfmiy5MfTo0Kcq/JEg4
 ksvbSJ21yEDW+arxUKy3W7fn8rl/As7JYs7rokPzYeBXUZo/KLdwyAUW8xwO7ruwUp1g
 gObw==
X-Gm-Message-State: AOJu0YzmFIhVdkH9X4Flr6ec44ta1225nA66H5OfvnfIFKwBiD3t4sL1
 +39l22KQ5ZWDCkIM80qQleQLsT55pNJyMn/jtEecARhHugvz9WRoZTbMARErtzAc
X-Gm-Gg: ASbGncuTh3cAvwv6V+LE4s0V11AEx9FIUfrEQHjxZuS3R1e9GQYXCWoUyJQClY4a/DU
 koEYN8ajFsT0jkhyPf+keIin7QdS/SkrILz5y3SvClMONWvCzP5QAxWQwSnxnL7sL0/vh+i4tio
 Tl1Ooh6lCMTGv/oK03hfo/b8rxcBjvBcjjmzh8PsT2Rq1v6sc536JZtuRTa30/q2xFDINkT4bil
 M+tqp+KifBYi4G0M8e1ClY2rLuheLuLkiHNyXAA9AH3F9Hqzwx6i5pZx8lRJpnA66n/3ByNOOb4
 1Qn3mN3Pxp7rXtUmAnXJDsii/sHBnmBbv1U7EfV/EB4FjMdkIy9ZvdUH50ix20Di4bSMn/TrugD
 kJdSmmK++vofImhWwoiy+v/mo1w5ru0RS6cpVQbbmxZc=
X-Google-Smtp-Source: AGHT+IEFd5393Rgcn4BUNTy5sVT5zyb5Ql0S6fb6x8ucGIBL83U/OwMLhpCg7EjvaFfzrVslQHIJ+Q==
X-Received: by 2002:a05:6402:2086:b0:62e:d3b4:4d8 with SMTP id
 4fb4d7f45d1cf-62fbe458cb4mr4364889a12.10.1758305402378; 
 Fri, 19 Sep 2025 11:10:02 -0700 (PDT)
Received: from localhost ([2a02:908:1087:8480:451e:4e86:2073:681])
 by smtp.gmail.com with ESMTPSA id
 4fb4d7f45d1cf-62fa5d4175bsm3874223a12.20.2025.09.19.11.10.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 19 Sep 2025 11:10:01 -0700 (PDT)
From: Al Haji-Ali <abdo.haji.ali@HIDDEN>
To: bug-auctex@HIDDEN
Subject: 14.1.0; [PATCH] Save ini preview files inside TeX-output-dir
Date: Fri, 19 Sep 2025 20:00:01 +0200
Message-ID: <m0qzw2tja6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2a00:1450:4864:20::529;
 envelope-from=abdo.haji.ali@HIDDEN; helo=mail-ed1-x529.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Ikumi Keita <ikumi@HIDDEN>, Arash Esbati <arash@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

[Re-sending to correct mailing-list]

Hello,

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


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=save-ini-files-inside-TeX-output-dir.patch

From 61d952df797957dc66e2f065a24bd691a832b855 Mon Sep 17 00:00:00 2001
From: Al Haji-Ali <a.hajiali@HIDDEN>
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)
   "Set up a watch on master file FILE.
 FILE can be an associated buffer instead of a filename.
 COMMAND is the command that generated the format.
@@ -1906,32 +1906,35 @@ FORMAT-CONS contains the format info for the main
 format dump handler."
   (let ((buffer (if (bufferp file)
                     file
-                  (find-buffer-visiting file))) ov)
+                  (find-buffer-visiting file)))
+        ov)
     (setcdr
      format-cons
-     (cons command
-           (when buffer
-             (with-current-buffer buffer
-               (save-excursion
-                 (save-restriction
-                   (widen)
-                   (goto-char (point-min))
-                   (unless (re-search-forward preview-dump-threshold nil t)
-                     (error "Can't find preamble of `%s'" file))
-                   (setq ov (make-overlay (point-min) (point)))
-                   (overlay-put ov 'format-cons format-cons)
-                   (overlay-put ov 'insert-in-front-hooks
-                                '(preview-preamble-changed-function))
-                   (overlay-put ov 'modification-hooks
-                                '(preview-preamble-changed-function))
-                   ov))))))))
+     (cl-list*
+      out-file
+      command
+      (when buffer
+        (with-current-buffer buffer
+          (save-excursion
+            (save-restriction
+              (widen)
+              (goto-char (point-min))
+              (unless (re-search-forward preview-dump-threshold nil t)
+                (error "Can't find preamble of `%s'" file))
+              (setq ov (make-overlay (point-min) (point)))
+              (overlay-put ov 'format-cons format-cons)
+              (overlay-put ov 'insert-in-front-hooks
+                           '(preview-preamble-changed-function))
+              (overlay-put ov 'modification-hooks
+                           '(preview-preamble-changed-function))
+              ov))))))))

 (defun preview-unwatch-preamble (format-cons)
   "Stop watching a format on FORMAT-CONS.
 The watch has been set up by `preview-watch-preamble'."
   (when (consp (cdr format-cons))
-    (when (cddr format-cons)
-      (delete-overlay (cddr format-cons)))
+    (when (cdddr format-cons)
+      (delete-overlay (cdddr format-cons)))
     (setcdr (cdr format-cons) nil)))

 (defun preview-register-change (ov)
@@ -2498,10 +2501,10 @@ The elements are (NAME . ASSOC).  NAME is the master file name
 format.  Possible values: nil means no format is available
 and none should be generated.  t means no format is available,
 it should be generated on demand.  If the value is a cons cell,
-the CAR of the cons cell is the command with which the format
-has been generated, and the CDR is some Emacs-flavor specific
-value used for maintaining a watch on possible changes of the
-preamble.")
+the CAR of the cons cell is the name of output master file, the CADR of
+the cons cell is the command with which the format has been generated,
+and the CDDR is some Emacs-flavor specific value used for maintaining a
+watch on possible changes of the preamble.")

 (defun preview-cleanout-tempfiles ()
   "Clean out all directories and files with non-persistent data.
@@ -3157,6 +3160,7 @@ pp")
         (preview-unwatch-preamble format-cons)
         (preview-watch-preamble (current-buffer)
                                 (cadr format-cons)
+                                (caddr format-cons)
                                 format-cons)))))

 ;;;###autoload
@@ -3996,10 +4000,11 @@ Those are just needed for cleanup."
   "Kill a cached format.
 FORMAT-CONS is intended to be an element of `preview-dumped-alist'.
 Tries through `preview-format-extensions'."
-  (dolist (ext preview-format-extensions)
-    (condition-case nil
-        (delete-file (preview-dump-file-name (concat (car format-cons) ext)))
-      (file-error nil))))
+  (when (consp (cdr format-cons))
+    (dolist (ext preview-format-extensions)
+      (condition-case nil
+          (delete-file (preview-dump-file-name (concat (cadr format-cons) ext)))
+        (file-error nil)))))

 (defun preview-dump-file-name (file)
   "Make a file name suitable for dumping from FILE."
@@ -4101,20 +4106,21 @@ If FORMAT-CONS is non-nil, a previous format may get reused."
   (interactive)
   (setq TeX-current-process-region-p nil)
   (let* ((dump-file
-          (expand-file-name (preview-dump-file-name (TeX-master-file "ini"))))
+          (expand-file-name (preview-dump-file-name (TeX-master-output-file "ini"))))
          (master (TeX-master-file))
          (format-name (expand-file-name master))
          (preview-format-name (shell-quote-argument
-                               (preview-dump-file-name (file-name-nondirectory
-                                                        master))))
+                               (preview-dump-file-name
+                                (TeX-master-output-file nil))))
          (master-file (expand-file-name (TeX-master-file t)))
+         (master-output-file (expand-file-name (TeX-master-output-file nil)))
          (command (preview-do-replacements
                    (TeX-command-expand
                     (preview-string-expand preview-LaTeX-command))
                    preview-dump-replacements))
          (preview-auto-cache-preamble nil))
     (unless (and (consp (cdr format-cons))
-                 (string= command (cadr format-cons)))
+                 (string= command (caddr format-cons)))
       (unless format-cons
         (setq format-cons (assoc format-name preview-dumped-alist)))
       (if format-cons
@@ -4161,6 +4167,7 @@ If FORMAT-CONS is non-nil, a previous format may get reused."
                                (zerop (process-exit-status process)))
                           (preview-watch-preamble
                            master-file
+                           master-output-file
                            command
                            format-cons)
                         (preview-format-kill format-cons))
--
2.39.5 (Apple Git-154)

--=-=-=--




Acknowledgement sent to Al Haji-Ali <abdo.haji.ali@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-auctex@HIDDEN. Full text available.
Report forwarded to bug-auctex@HIDDEN:
bug#79473; Package auctex. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 16 Oct 2025 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.