scan-error on py-sort-imports

Bug #1545013 reported by Barry Warsaw on 2016-02-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Low
Andreas Roehler
Debian
New
Unknown

Bug Description

From python-mode.el Debian 6.2.2

Visit an empty file and hit C-c C-f on an empty line (py-sort-imports). You get a scan-error:

up-list: Scan error: "Unbalanced parentheses", 1, 1

Changed in debian:
status: Unknown → New
Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Low
status: New → In Progress

On 12.02.2016 15:51, Barry Warsaw wrote:
> Public bug reported:
>
> >From python-mode.el Debian 6.2.2
>
> Visit an empty file and hit C-c C-f on an empty line (py-sort-imports).
> You get a scan-error:
>
> up-list: Scan error: "Unbalanced parentheses", 1, 1
>
>

Doku says:

Put point inside the parentheses of a multiline import and hit

;;

Will it be okay if Emacs stays silent here?
Issuing a warning would mean over-engineering WRT to doku.

Barry Warsaw (barry) wrote :

On Feb 13, 2016, at 07:35 PM, Andreas Roehler wrote:

>Will it be okay if Emacs stays silent here?

Yes, I think it's fine if Emacs does nothing. It can just suppress the scan
error.

Changed in python-mode:
status: In Progress → Fix Committed
milestone: none → 6.2.3

Hi Barry,

fixing lp:1551167 with last commit, fontification now looks reasonable.

Suggest changing the default of py-fontify-shell-buffer-p to non-nil.

WDYT?

Cheers,

Andreas

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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