GNU bug report logs - #14394
jit-lock-force-redisplay redefinition breaks jit fontification in auctex

Previous Next

Package: auctex;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Mon, 13 May 2013 09:25:01 UTC

Severity: normal

Merged with 16879

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14394 in the body.
You can then email your comments to 14394 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14394; Package emacs. (Mon, 13 May 2013 09:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antoine Levitt <antoine.levitt <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 13 May 2013 09:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Antoine Levitt <antoine.levitt <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org, bug-auctex <at> gnu.org,
	Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: jit-lock-force-redisplay redefinition breaks jit fontification in
	auctex
Date: Mon, 13 May 2013 11:23:07 +0200
Hi,

A commit of Stefan Monnier in April 23 changed the API of
jit-lock-force-redisplay. First and easiest, the docstring of
jit-lock-force-redisplay was not changed, and still mentions the old BUF
argument.

Second, this breaks function font-latex-jit-lock-force-redisplay in
auctex, which uses the old prototype. This is present in emacs and
auctex from trunk. Is the prototype change really necessary? If no, this
is a bug for emacs, if yes, this is a bug for auctex. In doubt, I'm
submitting the report in both.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14394; Package emacs. (Mon, 13 May 2013 16:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 14394 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: bug-auctex <at> gnu.org, 14394 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#14394: jit-lock-force-redisplay redefinition breaks
	jit	fontification in auctex
Date: Mon, 13 May 2013 19:11:55 +0300
> From: Antoine Levitt <antoine.levitt <at> gmail.com>
> Date: Mon, 13 May 2013 11:23:07 +0200
> 
> A commit of Stefan Monnier in April 23 changed the API of
> jit-lock-force-redisplay. First and easiest, the docstring of
> jit-lock-force-redisplay was not changed, and still mentions the old BUF
> argument.
> 
> Second, this breaks function font-latex-jit-lock-force-redisplay in
> auctex, which uses the old prototype. This is present in emacs and
> auctex from trunk.

The doc string fix issue aside, is there any reason why AUCTeX should
call jit-lock-force-redisplay, instead of always using its expanded
code, like it does for versions of Emacs that don't have that
function?

I mean, doesn't this incident speak volumes about the danger of using
internal APIs?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14394; Package emacs. (Mon, 13 May 2013 16:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 14394 <at> debbugs.gnu.org (full text, mbox):

From: Ralf Angeli <angeli <at> caeruleus.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: bug-auctex <at> gnu.org, 14394 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca,
	Antoine Levitt <antoine.levitt <at> gmail.com>
Subject: Re: [Bug-AUCTeX] bug#14394: jit-lock-force-redisplay redefinition
	breaks jit	fontification in auctex
Date: Mon, 13 May 2013 18:57:51 +0200
* Eli Zaretskii (2013-05-13) writes:

>> Second, this breaks function font-latex-jit-lock-force-redisplay in
>> auctex, which uses the old prototype. This is present in emacs and
>> auctex from trunk.
>
> The doc string fix issue aside, is there any reason why AUCTeX should
> call jit-lock-force-redisplay, instead of always using its expanded
> code, like it does for versions of Emacs that don't have that
> function?

I guess the idea was that calling the function might be more
forward-compatible than using the expanded code because this decouples
the code from future changes in the underlying machinery.  In this
particular case this didn't work so well, but things can break with
either approach.

Mosè already changed the code in AUCTeX's repository to use the expanded
code only, so we might stick with this for the time being and see what
happens.

-- 
Ralf




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14394; Package emacs. (Tue, 14 May 2013 15:53:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Cc: bug-auctex <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: jit-lock-force-redisplay redefinition breaks jit fontification in
	auctex
Date: Tue, 14 May 2013 11:52:06 -0400
> Second, this breaks function font-latex-jit-lock-force-redisplay in
> auctex, which uses the old prototype. This is present in emacs and
> auctex from trunk. Is the prototype change really necessary? If no, this
> is a bug for emacs, if yes, this is a bug for auctex. In doubt, I'm
> submitting the report in both.

The answer is that font-latex should not modify
font-lock-fontify-region-function and should instead use
font-lock-extend-region-functions (it's OK to do what it does when
running on older Emacsen which do not have
font-lock-extend-region-functions, of course).


        Stefan




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 10 Feb 2014 21:45:02 GMT) Full text and rfc822 format available.

Notification sent to Antoine Levitt <antoine.levitt <at> gmail.com>:
bug acknowledged by developer. (Mon, 10 Feb 2014 21:45:03 GMT) Full text and rfc822 format available.

Message #19 received at 14394-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 14394-done <at> debbugs.gnu.org
Subject: Re: bug#14394: jit-lock-force-redisplay redefinition breaks jit
 fontification in auctex
Date: Mon, 10 Feb 2014 16:44:34 -0500
Version: 24.4

Antoine Levitt wrote:

> First and easiest, the docstring of jit-lock-force-redisplay was not
> changed, and still mentions the old BUF argument.

Fixed.

The remainder is an AUCTeX issue, and since you said you already mailed
them about it, no need to keep this Emacs bug report open.




Forcibly Merged 14394 16879. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 16:54:01 GMT) Full text and rfc822 format available.

bug reassigned from package 'emacs' to 'emacs,auctex'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 16:54:02 GMT) Full text and rfc822 format available.

bug No longer marked as found in versions 24.3.50. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 16:54:03 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 24.4. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 16:54:03 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 17:09:01 GMT) Full text and rfc822 format available.

bug reassigned from package 'emacs,auctex' to 'auctex'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 25 Feb 2014 17:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Mar 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 54 days ago.

Previous Next


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