adaptive-fill-regexp grows too big

Bug #572664 reported by Chris Van Dusen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nXhtml
Invalid
High
Unassigned

Bug Description

I was getting an error that adaptive-fill-regexp was too big, and was able to trace it (with trace-function) to c-setup-paragraph-variables in cc-styles.el when moving through a file with mixed PHP, HTML, and Javascript.

This was verified by looking at adaptive-fill-regexp via C-h v adaptive-fill-regexp RET, moving around in a PHP file as described above, and then looking at the value again.

Revision history for this message
lborgman (lennart-borgman) wrote :

Thanks Chris,

I really wonder what is happening here. I can't reproduce this. I looked at the code and I can't see how it can happen. Perhaps somehow adaptive-fill-regexp gets wrong default value, but

Some things I wonder:

1) Exactly what version of Emacs are you using?

2) Is adaptive-fill-regexp buffer local?

3) Can you please give me a recipe how to reproduce this starting from

  M-x emacs-Q-nxhtml

Changed in nxhtml:
importance: Undecided → High
status: New → In Progress
Revision history for this message
Chris Van Dusen (chris0123456789) wrote :

Hi, Lennart,

Thanks for the prompt reply.

1) GNU Emacs 24.0.50.4 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of 2010-04-28 on profex.local

2) Yes.

3) I should have been more specific in my initial description.

It's only happened a few times, and usually takes a few hours to happen. What usually happens is that I'll be coding, and have erc open. After some hours, I'll start getting a Backtrace buffer with an error saying that adaptive-fill-regexp is too big, with the error originating from erc.

Originally, I thought that erc was the source of the problem, but could find nothing suspicious. Since nxhtml was the only other major mode that I had in fairly heavy use, I decided to look there.

I grep'ed through the files in my elisp directory for instances of adaptive-fill-regexp to see if something there was modifying it. I saw the couple of references to it in nxhtml, but couldn't see how they would change the value. I then looked through the lisp directory and saw a few references, but most were to things that I don't currently use (e.g., gnus, org). Also listed were cc-mode.el, cc-vars.el and cc-styles.el. Of these, cc-styles.el contains c-setup-paragraph-variables which does modify adaptive-fill-regexp.

I traced the function and whenever it was called, I checked the value of fill-adaptive-regexp. It was increasing each time.

I've attached the value of adaptive-fill-regexp after doing some navigating in a couple of files after running emacs-Q-nxhtml.

Revision history for this message
lborgman (lennart-borgman) wrote :

Is the description in 3 after starting a new emacs the way I proposed, ie with

  M-x emacs-Q-nxhtml

Revision history for this message
Chris Van Dusen (chris0123456789) wrote :

Yes.

Revision history for this message
lborgman (lennart-borgman) wrote :

This is an Emacs bug. It is a problem with js.el.

I have filed a bug report:

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6071

Revision history for this message
Chris Van Dusen (chris0123456789) wrote :

Thanks for your help with this.

Revision history for this message
lborgman (lennart-borgman) wrote :

Hi Chris,

Without your report we would probably not had catch this in the next Emacs release. Chong has added a fix for the release branch now so I am marking this as invalid. (At the moment it is not fixed on "trunk", but it will surely be shortly.)

I am marking this as invalid here, since it is not a bug in nXhtml. (Shouldn't there be something like "bug elsewhere"?)

Changed in nxhtml:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.