An Emacs mode for editing Python code

python-mode.el fails on an empty file

Reported by François Pinard on 2012-01-25
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-mode.el
Medium
Andreas Roehler

Bug Description

Hi again.

Editing an empty Python file raises an error, about "erg" being undefined.

It may come from py-guess-indent-offset, where the condition of the while never reaches the setq.

François

P.S. What is "erg" standing for? Is it an acronym? A non-English word? An English word I do not know? :-)

Georg Brandl (gbrandl) wrote :

Probably "ergebnis", meaning result in German :)

Andreas Roehler (a-roehler) wrote :

Indeed.
Only used from inside let.
Previously used "res", as from result.
However the pro is, when seeing "erg" as here, already know where it must be from.

Nonetheless, can't reproduce.
Please send the output from M-x report-emacs-bug

Georg, do you get this error?

Thanks,

Andreas

Georg Brandl (gbrandl) wrote :

Hmm, I think "Editing an empty Python file" is not well specified. Does it occur directly when finding the file, or when trying to insert some text?

Am 25.01.2012 03:05, schrieb François Pinard:
> Public bug reported:
>
> Hi again.
>
> Editing an empty Python file raises an error, about "erg" being
> undefined.
>
> It may come from py-guess-indent-offset, where the condition of the
> while never reaches the setq.
>

Okay, see an error here. "erg" is used by setq but not introduced by let.

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.5
importance: Undecided → Medium
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers