An Emacs mode for editing Python code

Trouble with py-fill-paragraph

Reported by Andreas Roehler on 2013-05-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Undecided
Unassigned

Bug Description

Hello,

I'm trying to refill the following docstring:

class BlockCache(object):

    def remove(self, inode, start_no, end_no=None):
        """Remove blocks for `inode`

        If `end_no` is not specified, remove just the `start_no`
        block.
        Otherwise removes all blocks from `start_no` to, but not
        including, `end_no`.

        Note: if `get` and `remove` are called concurrently, then it is
        possible that a block that has been requested with `get` and
        passed to `remove` for deletion will not be deleted.
        """

        log.debug('remove(inode=%d, start=%d, end=%s): start', inode, start_no, end_no)

        if end_no is None:
            end_no = start_no + 1

When I place the cursor on e.g. the first line ("If `end_no`...) and execute M-x py-fill-paragraph, the buffer is scrolled such that this becomes the first visible line, and the indentation is removed. No filling occurs at all.

Am I doing something wrong? py-docstring-style is set to pep-256-nn.

Changed in python-mode:
milestone: none → 6.1.2
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium
Andreas Roehler (a-roehler) wrote :

Seeing a minor bug WRT to indent of closing string only, which should be fixed.

What's your version of python-mode? Did you try with current trunk?

Thanks,

Andreas

Nikolaus Rath (nikratio) wrote :

I tried with the most recent release, python-mode.el-6.1.1.tar.gz

Nikolaus Rath (nikratio) wrote :

With newest python-mode.el from http://bazaar.launchpad.net/~python-mode-devs/python-mode/python-mode/files, running M-x py-fill-paragraph is just a no-op. The screen flickers, but nothing is changed.

Am 17.05.2013 03:38, schrieb Nikolaus Rath:
> With newest python-mode.el from http://bazaar.launchpad.net/~python-
> mode-devs/python-mode/python-mode/files, running M-x py-fill-paragraph
> is just a no-op. The screen flickers, but nothing is changed.
>

hmm, please check your init file. Make sure python-mode.el is loaded before any other Python related stuff.

What happens, if just M-q is called?

If bug persists, output of M-x report-emacs-bug might be helpful.

Andreas

Changed in python-mode:
status: New → Incomplete
Changed in python-mode:
importance: Medium → Undecided
assignee: Andreas Roehler (a-roehler) → nobody
milestone: 6.1.2 → none
Changed in python-mode:
status: Incomplete → 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

Related questions