GNU bug report logs - #12751
24.2.50; Inferior python mode hangs

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <forcer <at> forcix.cx>

Date: Sun, 28 Oct 2012 18:41:02 UTC

Severity: important

Merged with 12645, 12743

Found in version 24.2.50

Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jorgen Schaefer <forcer <at> forcix.cx>
To: 12751 <at> debbugs.gnu.org
Subject: bug#12751: 24.2.50; Inferior python mode hangs
Date: Sun, 28 Oct 2012 19:37:40 +0100
Hello!

In current Emacs from bzr, running M-x run-python hangs Emacs until the
user hits C-g, repeatedly, every time there is input to the subprocess.
This results in the following message (from *Messages*):

Error during redisplay: (jit-lock-function 1) signaled (quit)
Error during redisplay: (jit-lock-function 256) signaled (quit)
Error during redisplay: (jit-lock-function 274) signaled (quit)
Error during redisplay: (jit-lock-function 275) signaled (quit)
Quit [3 times]
QuitError during redisplay: (jit-lock-function 284) signaled (quit)
Error during redisplay: (jit-lock-function 285) signaled (quit)
....

The problem seems to be in `inferior-python-mode'. Setting
`python-shell-enable-font-lock' to nil fixes it immediately. More
specifically, in this piece of code:

    (set (make-local-variable 'syntax-propertize-function)
         (syntax-propertize-rules
          (comint-prompt-regexp
           (0 (ignore
               (put-text-property
                comint-last-input-start end 'syntax-table
                python-shell-output-syntax-table)
               (font-lock-unfontify-region comint-last-input-start end))))
          ((python-rx string-delimiter)
           (0 (ignore
               (and (not (eq (get-text-property start 'field) 'output))
                    (python-syntax-stringify)))))
          ))

The (comint-promot-regexp ...) clause seems to be causing the problem.
Commenting that out makes the subprocess run fine.

I have to admit I have no idea what that's supposed to do anyhow. The
variable END isn't defined at all, and `ignore' will make it all nil
anyhow. But maybe I'm missing something important.

Regards,
Jorgen




This bug report was last modified 12 years and 255 days ago.

Previous Next


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