* bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings
@ 2015-09-29 15:14 Torsten Bronger
2020-12-03 10:57 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Torsten Bronger @ 2015-09-29 15:14 UTC (permalink / raw)
To: 21583
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@jabber.rwth-aachen.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings
2015-09-29 15:14 bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings Torsten Bronger
@ 2020-12-03 10:57 ` Lars Ingebrigtsen
2020-12-08 23:14 ` Torsten Bronger
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-03 10:57 UTC (permalink / raw)
To: Torsten Bronger; +Cc: 21583
Torsten Bronger <bronger@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings
2020-12-03 10:57 ` Lars Ingebrigtsen
@ 2020-12-08 23:14 ` Torsten Bronger
2020-12-08 23:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 4+ messages in thread
From: Torsten Bronger @ 2020-12-08 23:14 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 21583
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
Hallöchen!
Lars Ingebrigtsen schreibt:
> Torsten Bronger <bronger@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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4913 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings
2020-12-08 23:14 ` Torsten Bronger
@ 2020-12-08 23:17 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-08 23:17 UTC (permalink / raw)
To: Torsten Bronger; +Cc: 21583
Torsten Bronger <bronger@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-08 23:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 15:14 bug#21583: 25.0.50; Python mode uses wrong indentation in docstrings Torsten Bronger
2020-12-03 10:57 ` Lars Ingebrigtsen
2020-12-08 23:14 ` Torsten Bronger
2020-12-08 23:17 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).