emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

flymake mode freezes emacs


From: Ralf Schmitt
Subject: flymake mode freezes emacs
Date: Mon, 06 Aug 2007 09:42:18 +0200
User-agent: Icedove 1.5.0.12 (X11/20070731)

when using flymake with pyflakes
(http://divmod.org/projects/pyflakes)emacs hangs for around 10 seconds with certain input files. If I load the attached python file and turn on flymake mode, emacs freezes. If I change pyflakes to only output "could not compile 'wiki.py':24: it works. I tested it with the emacs multi tty branch and emacs 22.1. Both do not work.

-----------------------
.emacs:

(when (load "flymake" t)
      (defun flymake-pyflakes-init ()
        (let* ((temp-file (flymake-init-create-temp-buffer-copy
                           'flymake-create-temp-inplace))
           (local-file (file-relative-name
                        temp-file
                        (file-name-directory buffer-file-name))))
          (list "pyflakes" (list local-file))))

      (add-to-list 'flymake-allowed-file-name-masks
               '("\\.py\\'" flymake-pyflakes-init)))


-----
python file:

#! /usr/bin/env python

import os
from ConfigParser import ConfigParser

def wiki_cdb(path=None):
    """
    from mwlib import cdbwiki
    db=cdbwiki.WikiDB(path)
    return db

def image_download(url=None, localpath=None):
assert url and localpath, "must supply url and localpath for in [images] section"
    from mwlib import netdb
    imgdb = netdb.ImageDB(url, localpath)
    return imgdb



dispatch = dict(
    images = dict(download = image_download),
    wiki = dict(cdb = wiki_cdb)
)
------------

Output of pyflakes for this file:
could not compile 'wiki.py':24:
    """
    from mwlib import cdbwiki
    db=cdbwiki.WikiDB(path)
    return db

def image_download(url=None, localpath=None):
assert url and localpath, "must supply url and localpath for in [images] section"
    from mwlib import netdb
    imgdb = netdb.ImageDB(url, localpath)
    return imgdb



dispatch = dict(
    images = dict(download = image_download),
    wiki = dict(cdb = wiki_cdb)
)






                                             ^

-----------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]