3

This is almost the same question as this one, but not quite. I happen to like the docstring style

def f():
    """
    docstring

    another line
    """

so in emacs I have python-fill-docstring-style set to (quote django). Works great. But it doesn't work with this:

def f2():
    r"""
    A raw docstring with \n and \t and other symbols in it.

    Another line.
    """

If I run fill-paragraph on the first paragraph of this docstring, it turns it into:

r""" A raw docstring with \n and \t and other symbols in it.

If I run it on the second paragraph, it becomes

Another line.  """

Is this a bug or is there a customization setting I'm overlooking? The same problem arises if the docstring starts with b""" or u""".

  • This was reported as a bug, and it seems to have been fixed in Emacs 25. – John Palmieri Aug 16 '17 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.