python-mode.el fails on an empty file

Bug #921364 reported by François Pinard
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
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? :-)

Revision history for this message
Georg Brandl (gbrandl) wrote :

Probably "ergebnis", meaning result in German :)

Revision history for this message
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

Revision history for this message
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?

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 921364] [NEW] python-mode.el fails on an empty file

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.