lock-up requiring C-g in R chunk with org-mumamo-mode

Bug #626039 reported by Dan Davison
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nXhtml
In Progress
Medium
Unassigned

Bug Description

Steps to recreate:

1. emacs -Q

2. load nxhtml and ESS
i.e. (require 'ess-site)

3. create Org-mode buffer containing:

--------------------------
* R block
#+begin_src R
  aa <- 1
#+end_src
--------------------------

4. M-x org-mumamo-mode

5. Move point in and out of R chunk and along the line inside the R chunk

This causes a lock-up in which no further movement of point is possible. C-g does exit the lock-up, but afterwards org-mumamo-mode is not properly functioning (e.g. the variable org-mumamo-mode has the value t, but chunks are not recognised, and fontification of chunks in the buffer is not correct).

The following is written to *Messages* when the lock-up occurs:

--------------------------
Making change-major-mode-hook buffer-local while locally let-bound!
OVERVIEW
Making change-major-mode-hook buffer-local while locally let-bound! [27 times]
Error in pre-command-hook: (quit)
--------------------------

GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-08-27 on Luscinia
nXhtml mode version 2.08
Org-mode version 7.01 (release_7.01h.227.g2f93)

ess-version is a variable defined in `ess-custom.el'.
Its value is "5.12"

Thanks,

Dan

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

Thanks for the bug report, Dan.

Where do I find ess-site? Which version of it are you using?

Changed in nxhtml:
status: New → Incomplete
Revision history for this message
lborgman (lennart-borgman) wrote :

I found ess-site (I actually had it, sigh).

I can reproduce the problem with the latest nXhtml beta 2.09. I will look into it.

Changed in nxhtml:
importance: Undecided → Medium
status: Incomplete → In Progress
Revision history for this message
lborgman (lennart-borgman) wrote :

I have sent a mail to the ess maintainers and asked for help with this.

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

I have got no reply from the ESS maintainers so I do not know what to do. If anyone is willing to try to contact them again please do!

Revision history for this message
Erik Iverson (3y9m2vc-erik-fkzsxrq) wrote :

Hello, using the latest devel version of mumamo through github. (2.09beta) and emacs 24.1.1.

I think I made some progress on this. I was trying to get mumamo get work with markdown-mode + R through ESS. I experienced the same lockups when editing R code chunks. I could fix it by specifying:

(setq mumamo-set-major-mode-delay -1)

 I believe this comes down to the fact that while there is a function in ESS called "R-mode", the actual major-mode variable is called "ess-mode". So mumumo sees the chunk is in "ess-mode"and thinks it *should-be* in R-mode, so tries to switch it. In mumamo.el, this line in mumamo-set-major-post-command

(set-it-now (not (or in-pre-hook (mumamo-fun-eq major major-mode)))))

will assign t to set-it-now even when it does not have to, because of this R-mode vs. ess-mode incongruence. I believe this is related to the infinite loop that mumamo ends up in without setting the mumamo-set-major-mode-delay as above.

I also currently get things like the following in my *Messages* buffer, even with setting the delay to -1:

Switched to ess-mode [3 times]

so I'm just going to remove the message function call that is generating those lines for now. I realize this does not fix the problem per se, but it makes it usable for me, and hopefully this helps track down the larger issue.

Thanks, mumamo is great!

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.