GNU bug report logs -
#21583
25.0.50; Python mode uses wrong indentation in docstrings
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21583 in the body.
You can then email your comments to 21583 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21583
; Package
emacs
.
(Tue, 29 Sep 2015 15:16:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Torsten Bronger <bronger <at> physik.rwth-aachen.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 29 Sep 2015 15:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When using python-mode and auto-fill-mode and writing docstrings for
Python methods, a function/method decorator confuses python-mode so that
it uses a too small indentation for a new line. Have a look at this
example:
class A:
@property
def a(self):
"""This is property a. blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah
"""
If the "@property" line is removed, the second line in the docstring is
properly indented.
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu)
of 2015-09-29
Repository revision: 50e844ce73f4c4287877816fa7753ef4930ed55c
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.3 LTS
Configured using:
'configure --prefix=/usr/local/ --mandir=/usr/local/share/man/
--infodir=/usr/local/share/info/ --with-x-toolkit=no --without-makeinfo
--with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-x'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB X11
Important settings:
value of $LC_MONETARY: de_DE.UTF-8
value of $LC_NUMERIC: de_DE.UTF-8
value of $LC_TIME: de_DE.UTF-8
value of $LANG: de_DE.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Python
Minor modes in effect:
diff-auto-refine-mode: t
shell-dirtrack-mode: t
global-auto-revert-mode: t
savehist-mode: t
display-time-mode: t
desktop-save-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
auto-fill-function: do-auto-fill
Recent messages:
Wrote /home/bronger/.newsrc
Saving /home/bronger/.newsrc.eld...
Saving file /home/bronger/.newsrc.eld...
Wrote /home/bronger/.newsrc.eld
Saving /home/bronger/.newsrc.eld...done
Saving file /home/bronger/src/totorio/totorio.py...
Wrote /home/bronger/src/totorio/totorio.py
(No files need saving)
delete-backward-char: Text is read-only [3 times]
Making completion list...
Load-path shadows:
/usr/local/share/emacs/25.0.50/lisp/textmodes/rst hides /usr/share/emacs/site-lisp/rst
~/.emacs.d/elpa/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
Features:
(shadow emacsbug sendmail url-util url-parse url-vars shr dom subr-x
mm-archive gnus-picon sort smiley gnus-cite gnus-bcklg gnus-async qp
gnus-ml gmane nndraft nnmh gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg nnml nnfolder gnus-cache bbdb-gnus gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap gnus-sum bbdb-snarf
mail-extr bbdb-com warnings network-stream nsm starttls nntp gnus-topic
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
gnus-ems nnheader mail-utils css-mode smerge-mode js imenu thingatpt
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs ruby-mode add-log reftex-dcr reftex reftex-vars
font-latex latexenc sgml-mode dired-aux adaptive-wrap nxml-uchnm rng-xsd
xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok conf-mode vc
vc-git diff-mode disp-table python tramp-sh tramp tramp-compat
auth-source cl-seq eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core mm-util help-fns help-mode mail-prsvr password-cache
tramp-loaddefs trampver shell json postscript-sli yaml-mode
dockerfile-mode derived rx sh-script smie executable dired-x
vc-dispatcher vc-bzr org-element org-rmail org-mhe org-irc org-info
org-gnus gnus-util org-docview org-bibtex bibtex org-bbdb org-w3m
org-agenda ob-python org org-macro org-footnote org-pcomplete pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec
find-func server cl-macs w3m browse-url doc-view jka-compr dired
image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems wid-edit w3m-ccl ccl
w3m-favicon w3m-image w3m-proc w3m-util rst compile comint ansi-color
ring browse-kill-ring mmm-mode mmm-univ mmm-class mmm-region mmm-auto
mmm-vars mmm-utils mmm-compat cl gv bbdb-autoloads bbdb timezone
cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays
hol-loaddefs appt diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs preview prv-emacs info reporter latex easy-mmode edmacro
kmacro tex-style tex-buf tex dbus xml advice autorevert filenotify
tex-site auto-loads savehist time desktop frameset cl-loaddefs pcase
cl-lib delsel cus-start cus-load finder-inf adaptive-wrap-autoloads
package easymenu epg-config time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
x multi-tty make-network-process emacs)
Memory information:
((conses 16 541162 40840)
(symbols 48 56512 106)
(miscs 40 7089 651)
(strings 32 135990 33983)
(string-bytes 1 4307841)
(vectors 16 58613)
(vector-slots 8 1788849 238308)
(floats 8 1454 604)
(intervals 56 14509 115)
(buffers 976 238)
(heap 1024 79358 9211))
--
Torsten Bronger Jabber ID: torsten.bronger <at> jabber.rwth-aachen.de
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21583
; Package
emacs
.
(Thu, 03 Dec 2020 10:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 21583 <at> debbugs.gnu.org (full text, mbox):
Torsten Bronger <bronger <at> physik.rwth-aachen.de> writes:
> When using python-mode and auto-fill-mode and writing docstrings for
> Python methods, a function/method decorator confuses python-mode so that
> it uses a too small indentation for a new line. Have a look at this
> example:
>
> class A:
>
> @property
> def a(self):
> """This is property a. blah blah blah blah blah blah blah blah blah
> blah blah blah blah blah blah blah blah blah blah
>
> """
>
> If the "@property" line is removed, the second line in the docstring is
> properly indented.
(This bug report unfortunately got no response at the time.)
I tried reproducing this in Emacs 26.1 and Emacs 28, and it seems to
work fine for me there. Are you still seeing this problem?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 03 Dec 2020 10:58:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21583
; Package
emacs
.
(Tue, 08 Dec 2020 23:16:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 21583 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hallöchen!
Lars Ingebrigtsen schreibt:
> Torsten Bronger <bronger <at> physik.rwth-aachen.de> writes:
>
>> When using python-mode and auto-fill-mode and writing docstrings for
>> Python methods, a function/method decorator confuses python-mode so that
>> it uses a too small indentation for a new line. Have a look at this
>> example:
>>
>> class A:
>>
>> @property
>> def a(self):
>> """This is property a. blah blah blah blah blah blah blah blah blah
>> blah blah blah blah blah blah blah blah blah blah
>>
>> """
>>
>> If the "@property" line is removed, the second line in the docstring is
>> properly indented.
>
> [...]
>
> I tried reproducing this in Emacs 26.1 and Emacs 28, and it seems to
> work fine for me there. Are you still seeing this problem?
No, I cannot reproduce this anymore with current Emacs.
Regards,
Torsten.
--
Torsten Bronger
[smime.p7s (application/pkcs7-signature, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21583
; Package
emacs
.
(Tue, 08 Dec 2020 23:18:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 21583 <at> debbugs.gnu.org (full text, mbox):
Torsten Bronger <bronger <at> physik.rwth-aachen.de> writes:
> No, I cannot reproduce this anymore with current Emacs.
Thanks for checking; closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
21583 <at> debbugs.gnu.org and Torsten Bronger <bronger <at> physik.rwth-aachen.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 08 Dec 2020 23:19:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 06 Jan 2021 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.