GNU bug report logs - #39927
12.2; preview-latex gs treatment off by one

Previous Next

Package: auctex;

Reported by: candeb <at> free.fr

Date: Thu, 5 Mar 2020 15:23:02 UTC

Severity: normal

Tags: fixed

Found in version 12.2

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: candeb <at> free.fr
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 39927 <at> debbugs.gnu.org
Subject: bug#39927: 12.2; preview-latex gs treatment off by one
Date: Thu, 12 Mar 2020 09:51:14 +0100 (CET)
[Message part 1 (text/plain, inline)]
Hi Ikumi

I spent some time digging into the internals of preview-latex, even though I do not speak elisp wery well...

The crucial part happens inside preview-gs-transact, which gets called each time GS has written something to the standard output (usually  GS>  or  GS<1>)

As I wrote in a previous message, adding some debug prints to the beginning of preview-gs-transact shows that you need to count the number of GS<1> prompts in order to guess when a new file is ready.
Current code just counts all prompts, skipping one, so with two GS> prompts at the beginning it is off by one.

The attached patch, based on that observation, solves the problem entirely.

Again, as I said in all my previous messages, I DO NOT UNDERSTAND ghostscript, I am just making empiric observations regarding the correlation between what GS writes to stdout and what seems to happen.
These observations seem to be consistent regardless of the color compatibility option you choose or the number of files you feed into GS at a time (but only tested with 9.50)

Cheers,
Itaï
[0103-Improve-preview-gs-transact.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 127 days ago.

Previous Next


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