Bug 198954 - XEmacs: MH-E: Infinite loop if add a blank line in header with font-lock on
XEmacs: MH-E: Infinite loop if add a blank line in header with font-lock on
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: xemacs-sumo (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-14 17:54 EDT by Dan Harkless
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-17 03:53:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Harkless 2006-07-14 17:54:43 EDT
Description of problem:
In mh-letter-mode, if font-lock is on (which it is by default), if you hit
Ctrl-o or Enter within an email header (to add a new line), xemacs infinite-loops.

Version-Release number of selected component (if applicable):
xemacs-21.4.15-10.EL.1
xemacs-sumo-20040818-2.noarch

How reproducible:
Always

Steps to Reproduce:
1. Either:
 A) Use nmh's 'comp' with the editor set to xemacs, or
 B) Fake it by creating a text file that looks like a standard email, e.g.:

        To: someone@example.com
        Subject: Test
        --------

    and then do M-x mh-letter-mode and M-x font-lock-mode.

2. With the cursor within the email header portion, hit Ctrl-o or Enter.
  
Actual results:
xemacs infinite-loops.  You can't do anything (except hit Ctrl-g) and "Garbage
collecting... done" appears at the bottom with "done" blinking.

Expected results:
You should just get a new line and then be able to continue composing your mail.

Additional info:
I don't have time to try upgrading a newer local copy of MH-E (or font-lock or
xemacs itself), so I'm working around it for now with (setq
font-lock-mode-disable-list '(mh-letter-mode)).

If you kill xemacs while it's infinite-looping, the Lisp backtrace sometimes
varies a little, and sometimes is even blank, but here is a backtrace from
running xemacs as root (whose profile contains very few customizations and none
that would affect this):

  # bind (end point data-end data-begin field limit)
  mh-font-lock-field-data(26)
  # bind (highlights matcher keyword nkeywords iter old-progress progress
bufname keywords case-fold-search loudly loudvar end start)
  font-lock-fontify-keywords-region(1 26 nil)
  # (unwind-protect ...)
  # bind (modified buffer-undo-list inhibit-read-only old-syntax-table
buffer-file-name buffer-file-truename loudly end beg)
  font-lock-default-fontify-region(1 26 nil)
  # bind (loudly end beg)
  font-lock-fontify-region(1 26)
  # bind (val end beg)
  #<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region]
3>(1 26 t)
  map-range-table(#<compiled-function (beg end val) "...(5)" [end beg
font-lock-fontify-region] 3> #s(range-table data ((1 26) t)))
  # bind (zmacs-region-stays)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (dummy buffer)
  #<compiled-function (buffer dummy) "...(49)" [font-lock-pending-buffer-table
zmacs-region-stays font-lock-range-table buffer remhash buffer-live-p
clear-range-table map-extents #<compiled-function ... "...(32)" ... 5> nil
font-lock-pending t put-text-property map-range-table #<compiled-function ...
"...(5)" ... 3>] 9>(#<buffer "1"> t)
  maphash(#<compiled-function (buffer dummy) "...(49)"
[font-lock-pending-buffer-table zmacs-region-stays font-lock-range-table buffer
remhash buffer-live-p clear-range-table map-extents #<compiled-function ...
"...(32)" ... 5> nil font-lock-pending t put-text-property map-range-table
#<compiled-function ... "...(5)" ... 3>] 9> #<hash-table size 0/29 weakness key
0x1760>)
  # (unwind-protect ...)
  # bind (match-data)
  font-lock-fontify-pending-extents()
  byte-code("..." [font-lock-pending-buffer-table hash-table-count 0
font-lock-fontify-pending-extents] 2)
  # (condition-case ... . ((error (warn "Error caught in
`font-lock-pre-idle-hook': %s" font-lock-error))))
  font-lock-pre-idle-hook()
  # (condition-case ... . error)
  # (condition-case ... . error)
  # (catch top-level ...)
Terminated

And here's the same thing running xemacs from my account (which has a fair
amount of customization):

  # (unwind-protect ...)
  mh-letter-header-end()
  # bind (limit)
  mh-font-lock-field-data(91)
  # bind (highlights matcher keyword nkeywords iter old-progress progress
bufname keywords case-fold-search loudly loudvar end start)
  font-lock-fontify-keywords-region(50 91 nil)
  # (unwind-protect ...)
  # bind (modified buffer-undo-list inhibit-read-only old-syntax-table
buffer-file-name buffer-file-truename loudly end beg)
  font-lock-default-fontify-region(50 91 nil)
  # bind (loudly end beg)
  font-lock-fontify-region(50 91)
  # bind (val end beg)
  #<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region]
3>(50 91 t)
  map-range-table(#<compiled-function (beg end val) "...(5)" [end beg
font-lock-fontify-region] 3> #s(range-table data ((50 91) t)))
  # bind (zmacs-region-stays)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (dummy buffer)
  #<compiled-function (buffer dummy) "...(49)" [font-lock-pending-buffer-table
zmacs-region-stays font-lock-range-table buffer remhash buffer-live-p
clear-range-table map-extents #<compiled-function ... "...(32)" ... 5> nil
font-lock-pending t put-text-property map-range-table #<compiled-function ...
"...(5)" ... 3>] 9>(#<buffer "2"> t)
  maphash(#<compiled-function (buffer dummy) "...(49)"
[font-lock-pending-buffer-table zmacs-region-stays font-lock-range-table buffer
remhash buffer-live-p clear-range-table map-extents #<compiled-function ...
"...(32)" ... 5> nil font-lock-pending t put-text-property map-range-table
#<compiled-function ... "...(5)" ... 3>] 9> #<hash-table size 0/29 weakness key
0x1529>)
  # (unwind-protect ...)
  # bind (match-data)
  font-lock-fontify-pending-extents()
  byte-code("..." [font-lock-pending-buffer-table hash-table-count 0
font-lock-fontify-pending-extents] 2)
  # (condition-case ... . ((error (warn "Error caught in
`font-lock-pre-idle-hook': %s" font-lock-error))))
  font-lock-pre-idle-hook()
  # (condition-case ... . error)
  # (condition-case ... . error)
  # (catch top-level ...)
Comment 1 Jens Petersen 2007-07-19 01:47:41 EDT
It is probably unlikely this will get fixed for RHEL4.

Sorry for taking so long to follow up: are you able to test with
a newer version of mh-e or xemacs-sumo?  This may already be fixed
upstream.
Comment 2 Jens Petersen 2007-07-19 02:04:58 EDT
It doesn't seem to happen for me with current xemacs and
xemacs-packages-extras-20070427-1.fc8 which contains mh-e version 7.4.2 anyway.

Note You need to log in before you can comment on or make changes to this bug.