all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
@ 2016-10-27 22:03 Jules Tamagnan
  2017-05-22 15:31 ` npostavs
  2017-05-23  0:26 ` npostavs
  0 siblings, 2 replies; 5+ messages in thread
From: Jules Tamagnan @ 2016-10-27 22:03 UTC (permalink / raw)
  To: 24809


The bug is quite simple.
  - Open a python file.
  - Type:
    hello = \
  - C-m ; newline

The point will now be directly under the backslash character. This is
indented incorrectly according to the pep8 style guide and the
pycodestyle checker, it should instead be indented
`python-indent-offset` further than the previous line.

This behavior can
be fixed with:

diff -u --label /usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz --label \#\<buffer\ python.el.gz\> /tmp/jka-com1650val /tmp/buffer-content-1650Jvx
--- /usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz
+++ #<buffer python.el.gz>
@@ -1026,13 +1026,13 @@
            (max line-indentation base-indent)))
         (`(,(or :after-block-start
                 :after-backslash-first-line
+                :after-backslash-assignment-continuation
                 :inside-paren-newline-start) . ,start)
          ;; Add one indentation level.
          (goto-char start)
          (+ (current-indentation) python-indent-offset))
         (`(,(or :inside-paren
                 :after-backslash-block-continuation
-                :after-backslash-assignment-continuation
                 :after-backslash-dotted-continuation) . ,start)
          ;; Use the column given by the context.
          (goto-char start)

Diff finished.  Thu Oct 27 14:53:35 2016
 



In GNU Emacs 25.1.51 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-09-06 built on jat-delphix-lap
Repository revision: 927afa1ef6514e62162068d7dbdc9d8381a71598
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Ubuntu 16.04.1 LTS

Configured using:
 'configure --with-x-toolkit=gtk CC=gcc'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Diff

Minor modes in effect:
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
  recentf-mode: t
  winner-mode: t
  csv-field-index-mode: t
  TeX-PDF-mode: t
  pyvenv-tracking-mode: t
  pyvenv-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  ivy-mode: t
  global-undo-tree-mode: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  fancy-battery-mode: t
  display-battery-mode: t
  projectile-global-mode: t
  projectile-mode: t
  imagex-global-sticky-mode: t
  imagex-sticky-mode: t
  pdf-occur-global-minor-mode: t
  persistent-scratch-autosave-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  shell-dirtrack-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  company-statistics-mode: t
  company-quickhelp-mode: t
  global-company-mode: t
  company-mode: t
  display-time-mode: t
  override-global-mode: t
  diff-auto-refine-mode: t
  image-diredx-async-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Undo branch point!
user-error: No further undo information [2 times]
Quit
Saving file /usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz...
compressing python.el.gz...done
Wrote /usr/local/share/emacs/25.1/lisp/progmodes/python.el.gz
Quit
uncompressing python.el.gz...done
Mark set
Quit

Load-path shadows:
~/Development/git/fork/ace-window/ace-window hides /home/jat/.emacs.d/elpa/ace-window-20160923.1117/ace-window
~/Development/git/pull/exwm/exwm-core hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-core
~/Development/git/pull/exwm/exwm hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm
~/Development/git/pull/exwm/exwm-floating hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-floating
~/Development/git/pull/exwm/exwm-cm hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-cm
~/Development/git/pull/exwm/exwm-systemtray hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-systemtray
~/Development/git/pull/exwm/exwm-workspace hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-workspace
~/Development/git/pull/exwm/exwm-randr hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-randr
~/Development/git/pull/exwm/exwm-input hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-input
~/Development/git/pull/exwm/exwm-config hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-config
~/Development/git/pull/exwm/exwm-manage hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-manage
~/Development/git/pull/exwm/exwm-layout hides /home/jat/.emacs.d/elpa/exwm-0.10/exwm-layout
/home/jat/.emacs.d/elpa/org-20160926/ox-md hides /usr/local/share/emacs/25.1/lisp/org/ox-md
/home/jat/.emacs.d/elpa/org-20160926/ob-perl hides /usr/local/share/emacs/25.1/lisp/org/ob-perl
/home/jat/.emacs.d/elpa/org-20160926/ob-scheme hides /usr/local/share/emacs/25.1/lisp/org/ob-scheme
/home/jat/.emacs.d/elpa/org-20160926/ob-latex hides /usr/local/share/emacs/25.1/lisp/org/ob-latex
/home/jat/.emacs.d/elpa/org-20160926/org-clock hides /usr/local/share/emacs/25.1/lisp/org/org-clock
/home/jat/.emacs.d/elpa/org-20160926/ob-lilypond hides /usr/local/share/emacs/25.1/lisp/org/ob-lilypond
/home/jat/.emacs.d/elpa/org-20160926/ob-css hides /usr/local/share/emacs/25.1/lisp/org/ob-css
/home/jat/.emacs.d/elpa/org-20160926/ox-odt hides /usr/local/share/emacs/25.1/lisp/org/ox-odt
/home/jat/.emacs.d/elpa/org-20160926/ob-calc hides /usr/local/share/emacs/25.1/lisp/org/ob-calc
/home/jat/.emacs.d/elpa/org-20160926/org-macro hides /usr/local/share/emacs/25.1/lisp/org/org-macro
/home/jat/.emacs.d/elpa/org-20160926/ob-comint hides /usr/local/share/emacs/25.1/lisp/org/ob-comint
/home/jat/.emacs.d/elpa/org-20160926/ob-tangle hides /usr/local/share/emacs/25.1/lisp/org/ob-tangle
/home/jat/.emacs.d/elpa/org-20160926/ob hides /usr/local/share/emacs/25.1/lisp/org/ob
/home/jat/.emacs.d/elpa/org-20160926/ox-latex hides /usr/local/share/emacs/25.1/lisp/org/ox-latex
/home/jat/.emacs.d/elpa/org-20160926/ob-clojure hides /usr/local/share/emacs/25.1/lisp/org/ob-clojure
/home/jat/.emacs.d/elpa/org-20160926/ob-octave hides /usr/local/share/emacs/25.1/lisp/org/ob-octave
/home/jat/.emacs.d/elpa/org-20160926/ox-texinfo hides /usr/local/share/emacs/25.1/lisp/org/ox-texinfo
/home/jat/.emacs.d/elpa/org-20160926/ox-org hides /usr/local/share/emacs/25.1/lisp/org/ox-org
/home/jat/.emacs.d/elpa/org-20160926/ob-screen hides /usr/local/share/emacs/25.1/lisp/org/ob-screen
/home/jat/.emacs.d/elpa/org-20160926/org-bibtex hides /usr/local/share/emacs/25.1/lisp/org/org-bibtex
/home/jat/.emacs.d/elpa/org-20160926/org-w3m hides /usr/local/share/emacs/25.1/lisp/org/org-w3m
/home/jat/.emacs.d/elpa/org-20160926/ox hides /usr/local/share/emacs/25.1/lisp/org/ox
/home/jat/.emacs.d/elpa/org-20160926/ob-java hides /usr/local/share/emacs/25.1/lisp/org/ob-java
/home/jat/.emacs.d/elpa/org-20160926/org-install hides /usr/local/share/emacs/25.1/lisp/org/org-install
/home/jat/.emacs.d/elpa/org-20160926/ob-keys hides /usr/local/share/emacs/25.1/lisp/org/ob-keys
/home/jat/.emacs.d/elpa/org-20160926/ob-table hides /usr/local/share/emacs/25.1/lisp/org/ob-table
/home/jat/.emacs.d/elpa/org-20160926/ob-lisp hides /usr/local/share/emacs/25.1/lisp/org/ob-lisp
/home/jat/.emacs.d/elpa/org-20160926/ob-C hides /usr/local/share/emacs/25.1/lisp/org/ob-C
/home/jat/.emacs.d/elpa/org-20160926/ob-python hides /usr/local/share/emacs/25.1/lisp/org/ob-python
/home/jat/.emacs.d/elpa/org-20160926/ob-picolisp hides /usr/local/share/emacs/25.1/lisp/org/ob-picolisp
/home/jat/.emacs.d/elpa/org-20160926/org-eshell hides /usr/local/share/emacs/25.1/lisp/org/org-eshell
/home/jat/.emacs.d/elpa/org-20160926/ox-ascii hides /usr/local/share/emacs/25.1/lisp/org/ox-ascii
/home/jat/.emacs.d/elpa/org-20160926/ob-org hides /usr/local/share/emacs/25.1/lisp/org/ob-org
/home/jat/.emacs.d/elpa/org-20160926/org-attach hides /usr/local/share/emacs/25.1/lisp/org/org-attach
/home/jat/.emacs.d/elpa/org-20160926/org-mouse hides /usr/local/share/emacs/25.1/lisp/org/org-mouse
/home/jat/.emacs.d/elpa/org-20160926/ob-ocaml hides /usr/local/share/emacs/25.1/lisp/org/ob-ocaml
/home/jat/.emacs.d/elpa/org-20160926/org-indent hides /usr/local/share/emacs/25.1/lisp/org/org-indent
/home/jat/.emacs.d/elpa/org-20160926/ob-eval hides /usr/local/share/emacs/25.1/lisp/org/ob-eval
/home/jat/.emacs.d/elpa/org-20160926/org-ctags hides /usr/local/share/emacs/25.1/lisp/org/org-ctags
/home/jat/.emacs.d/elpa/org-20160926/org-capture hides /usr/local/share/emacs/25.1/lisp/org/org-capture
/home/jat/.emacs.d/elpa/org-20160926/org-timer hides /usr/local/share/emacs/25.1/lisp/org/org-timer
/home/jat/.emacs.d/elpa/org-20160926/ob-ditaa hides /usr/local/share/emacs/25.1/lisp/org/ob-ditaa
/home/jat/.emacs.d/elpa/org-20160926/org-macs hides /usr/local/share/emacs/25.1/lisp/org/org-macs
/home/jat/.emacs.d/elpa/org-20160926/ob-emacs-lisp hides /usr/local/share/emacs/25.1/lisp/org/ob-emacs-lisp
/home/jat/.emacs.d/elpa/org-20160926/ob-sqlite hides /usr/local/share/emacs/25.1/lisp/org/ob-sqlite
/home/jat/.emacs.d/elpa/org-20160926/org-mhe hides /usr/local/share/emacs/25.1/lisp/org/org-mhe
/home/jat/.emacs.d/elpa/org-20160926/org-faces hides /usr/local/share/emacs/25.1/lisp/org/org-faces
/home/jat/.emacs.d/elpa/org-20160926/ob-io hides /usr/local/share/emacs/25.1/lisp/org/ob-io
/home/jat/.emacs.d/elpa/org-20160926/org-colview hides /usr/local/share/emacs/25.1/lisp/org/org-colview
/home/jat/.emacs.d/elpa/org-20160926/org-src hides /usr/local/share/emacs/25.1/lisp/org/org-src
/home/jat/.emacs.d/elpa/org-20160926/ox-html hides /usr/local/share/emacs/25.1/lisp/org/ox-html
/home/jat/.emacs.d/elpa/org-20160926/org-info hides /usr/local/share/emacs/25.1/lisp/org/org-info
/home/jat/.emacs.d/elpa/org-20160926/ob-lob hides /usr/local/share/emacs/25.1/lisp/org/ob-lob
/home/jat/.emacs.d/elpa/org-20160926/org hides /usr/local/share/emacs/25.1/lisp/org/org
/home/jat/.emacs.d/elpa/org-20160926/org-loaddefs hides /usr/local/share/emacs/25.1/lisp/org/org-loaddefs
/home/jat/.emacs.d/elpa/org-20160926/ob-fortran hides /usr/local/share/emacs/25.1/lisp/org/ob-fortran
/home/jat/.emacs.d/elpa/org-20160926/org-id hides /usr/local/share/emacs/25.1/lisp/org/org-id
/home/jat/.emacs.d/elpa/org-20160926/org-gnus hides /usr/local/share/emacs/25.1/lisp/org/org-gnus
/home/jat/.emacs.d/elpa/org-20160926/ob-awk hides /usr/local/share/emacs/25.1/lisp/org/ob-awk
/home/jat/.emacs.d/elpa/org-20160926/org-mobile hides /usr/local/share/emacs/25.1/lisp/org/org-mobile
/home/jat/.emacs.d/elpa/org-20160926/ob-shen hides /usr/local/share/emacs/25.1/lisp/org/ob-shen
/home/jat/.emacs.d/elpa/org-20160926/ob-dot hides /usr/local/share/emacs/25.1/lisp/org/ob-dot
/home/jat/.emacs.d/elpa/org-20160926/ob-js hides /usr/local/share/emacs/25.1/lisp/org/ob-js
/home/jat/.emacs.d/elpa/org-20160926/ob-scala hides /usr/local/share/emacs/25.1/lisp/org/ob-scala
/home/jat/.emacs.d/elpa/org-20160926/ob-ledger hides /usr/local/share/emacs/25.1/lisp/org/ob-ledger
/home/jat/.emacs.d/elpa/org-20160926/ob-sql hides /usr/local/share/emacs/25.1/lisp/org/ob-sql
/home/jat/.emacs.d/elpa/org-20160926/ob-mscgen hides /usr/local/share/emacs/25.1/lisp/org/ob-mscgen
/home/jat/.emacs.d/elpa/org-20160926/org-plot hides /usr/local/share/emacs/25.1/lisp/org/org-plot
/home/jat/.emacs.d/elpa/org-20160926/org-compat hides /usr/local/share/emacs/25.1/lisp/org/org-compat
/home/jat/.emacs.d/elpa/org-20160926/org-list hides /usr/local/share/emacs/25.1/lisp/org/org-list
/home/jat/.emacs.d/elpa/org-20160926/ob-ruby hides /usr/local/share/emacs/25.1/lisp/org/ob-ruby
/home/jat/.emacs.d/elpa/org-20160926/org-version hides /usr/local/share/emacs/25.1/lisp/org/org-version
/home/jat/.emacs.d/elpa/org-20160926/ox-man hides /usr/local/share/emacs/25.1/lisp/org/ox-man
/home/jat/.emacs.d/elpa/org-20160926/org-protocol hides /usr/local/share/emacs/25.1/lisp/org/org-protocol
/home/jat/.emacs.d/elpa/org-20160926/org-rmail hides /usr/local/share/emacs/25.1/lisp/org/org-rmail
/home/jat/.emacs.d/elpa/org-20160926/org-agenda hides /usr/local/share/emacs/25.1/lisp/org/org-agenda
/home/jat/.emacs.d/elpa/org-20160926/org-inlinetask hides /usr/local/share/emacs/25.1/lisp/org/org-inlinetask
/home/jat/.emacs.d/elpa/org-20160926/ox-publish hides /usr/local/share/emacs/25.1/lisp/org/ox-publish
/home/jat/.emacs.d/elpa/org-20160926/ob-R hides /usr/local/share/emacs/25.1/lisp/org/ob-R
/home/jat/.emacs.d/elpa/org-20160926/org-bbdb hides /usr/local/share/emacs/25.1/lisp/org/org-bbdb
/home/jat/.emacs.d/elpa/org-20160926/org-element hides /usr/local/share/emacs/25.1/lisp/org/org-element
/home/jat/.emacs.d/elpa/org-20160926/ob-asymptote hides /usr/local/share/emacs/25.1/lisp/org/ob-asymptote
/home/jat/.emacs.d/elpa/org-20160926/ob-maxima hides /usr/local/share/emacs/25.1/lisp/org/ob-maxima
/home/jat/.emacs.d/elpa/org-20160926/org-archive hides /usr/local/share/emacs/25.1/lisp/org/org-archive
/home/jat/.emacs.d/elpa/org-20160926/org-footnote hides /usr/local/share/emacs/25.1/lisp/org/org-footnote
/home/jat/.emacs.d/elpa/org-20160926/ob-exp hides /usr/local/share/emacs/25.1/lisp/org/ob-exp
/home/jat/.emacs.d/elpa/org-20160926/org-irc hides /usr/local/share/emacs/25.1/lisp/org/org-irc
/home/jat/.emacs.d/elpa/org-20160926/ob-sass hides /usr/local/share/emacs/25.1/lisp/org/ob-sass
/home/jat/.emacs.d/elpa/org-20160926/org-habit hides /usr/local/share/emacs/25.1/lisp/org/org-habit
/home/jat/.emacs.d/elpa/org-20160926/ob-core hides /usr/local/share/emacs/25.1/lisp/org/ob-core
/home/jat/.emacs.d/elpa/org-20160926/org-datetree hides /usr/local/share/emacs/25.1/lisp/org/org-datetree
/home/jat/.emacs.d/elpa/org-20160926/ob-makefile hides /usr/local/share/emacs/25.1/lisp/org/ob-makefile
/home/jat/.emacs.d/elpa/org-20160926/ox-beamer hides /usr/local/share/emacs/25.1/lisp/org/ox-beamer
/home/jat/.emacs.d/elpa/org-20160926/ob-plantuml hides /usr/local/share/emacs/25.1/lisp/org/ob-plantuml
/home/jat/.emacs.d/elpa/org-20160926/ob-ref hides /usr/local/share/emacs/25.1/lisp/org/ob-ref
/home/jat/.emacs.d/elpa/org-20160926/org-crypt hides /usr/local/share/emacs/25.1/lisp/org/org-crypt
/home/jat/.emacs.d/elpa/org-20160926/org-table hides /usr/local/share/emacs/25.1/lisp/org/org-table
/home/jat/.emacs.d/elpa/org-20160926/org-docview hides /usr/local/share/emacs/25.1/lisp/org/org-docview
/home/jat/.emacs.d/elpa/org-20160926/ob-haskell hides /usr/local/share/emacs/25.1/lisp/org/ob-haskell
/home/jat/.emacs.d/elpa/org-20160926/org-pcomplete hides /usr/local/share/emacs/25.1/lisp/org/org-pcomplete
/home/jat/.emacs.d/elpa/org-20160926/ob-gnuplot hides /usr/local/share/emacs/25.1/lisp/org/ob-gnuplot
/home/jat/.emacs.d/elpa/org-20160926/org-feed hides /usr/local/share/emacs/25.1/lisp/org/org-feed
/home/jat/.emacs.d/elpa/org-20160926/org-entities hides /usr/local/share/emacs/25.1/lisp/org/org-entities
/home/jat/.emacs.d/elpa/org-20160926/ob-matlab hides /usr/local/share/emacs/25.1/lisp/org/ob-matlab
/home/jat/.emacs.d/elpa/org-20160926/ox-icalendar hides /usr/local/share/emacs/25.1/lisp/org/ox-icalendar
/home/jat/.emacs.d/elpa/seq-2.16/seq hides /usr/local/share/emacs/25.1/lisp/emacs-lisp/seq

Features:
(shadow emacsbug pkg-info epl two-column iso-transl dabbrev hi-lock
json-reformat sh-script smie executable conf-mode web-mode-expansions
web-mode flow-fill man vc vc-dispatcher todo-mode diary-lib
diary-loaddefs face-remap gnus-kill dired-aux wdired magit-blame
magit-stash magit-bisect magit-remote magit-commit magit-sequence magit
magit-apply magit-wip magit-log magit-diff smerge-mode magit-core
magit-autorevert magit-process magit-popup magit-mode git-commit
log-edit pcvs-util add-log with-editor async-bytecomp async
js-mode-expansions js html-mode-expansions smartparens-html sgml-mode
readline-complete autoload lisp-mnt url-handlers url-http url-gw
url-cache url-auth paradox paradox-menu paradox-commit-list
paradox-execute paradox-github paradox-core spinner warnings cal-move
debug pulse eieio-opt speedbar sb-image ezimage dframe browse-url
ace-window avy smex ido expand-region text-mode-expansions
cc-mode-expansions the-org-mode-expansions python-el-fgallina-expansions
latex-mode-expansions er-basic-expansions expand-region-core
expand-region-custom org-table mailalias html2text mm-archive flyspell
ispell nnir qp smiley gnus-cite mail-extr gnus-async gnus-bcklg gnus-ml
gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus network-stream nsm
starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-cache gnus-sum
gnus-notify gnus-demon nntp gnus-group gnus-undo gnus-start gnus-cloud
nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win counsel tramp-cache recentf
tree-widget colir smtpmail bbdb-mua bbdb-com bbdb-message sendmail
message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader bbdb
bbdb-site timezone gnus gnus-ems nnheader mail-utils exwm-randr
xcb-randr exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating
xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh
xcb-icccm xelb xcb xcb-xproto xcb-types restclient url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap winner puppet-mode align make-mode markdown-mode
csv-mode sort company-auctex smartparens-latex latex tex-ispell
tex-style tex dbus xml ox-twbs ox-md ox-latex ox-icalendar ox-html
ox-ascii ox-publish ox org-bullets ob-plantuml org-agenda company-jedi
jedi-core epc ctable concurrent python-environment smartparens-python
python tramp-sh pyvenv company-irony irony-completion irony-snippet
irony multishell multishell-list savehist multi-term term disp-table
ehelp bash-completion flycheck-pos-tip flycheck rx swiper ivy delsel
ffap url-parse url-vars multiple-cursors mc-hide-unmatched-lines-mode
mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more
mc-cycle-cursors mc-edit-lines multiple-cursors-core rect undo-tree diff
electric-operator names edebug cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs smartparens-config
smartparens rbt magit-git crm magit-section magit-utils json map popup
fancy-battery battery org-projectile org-capture ibuffer-projectile
projectile thingatpt esh-var esh-io esh-cmd esh-opt esh-ext esh-proc
esh-arg esh-groups eshell esh-module esh-mode esh-util ggtags ewoc
htmlize figlet image+ image-file server pinentry epa-file epa derived
epg sx pdf-occur ibuf-ext ibuffer tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc imenu
pdf-tools cus-edit cus-start cus-load wid-edit pdf-view bookmark pp
pdf-cache pdf-info tq pdf-util visual-regexp-steroids visual-regexp
company-yasnippet persistent-scratch keyfreq free-keys wgrep grep tramp
tramp-compat auth-source mm-util help-fns mail-prsvr password-cache
tramp-loaddefs trampver shell autorevert filenotify compile yasnippet
company-statistics company-quickhelp pos-tip company-oddmuse
company-keywords company-etags etags xref project eieio eieio-core
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
company edmacro kmacro hydra lv deferred cl highlight-numbers
parent-mode rainbow-mode time spaceline-config spaceline-segments s
ucs-normalize spaceline dash powerline cl-macs powerline-separators
color powerline-themes column-marker adaptive-wrap linum hl-line
use-package diminish bind-key cl-seq tabify vc-git diff-mode org-rmail
org-mhe org-irc org-info org-gnus gnus-util org-docview doc-view subr-x
jka-compr image-mode org-bibtex bibtex org-bbdb org-element avl-tree
org-w3m org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys
ob-comint comint ansi-color ring ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs
sanityinc-tomorrow-eighties-theme color-theme-sanityinc-tomorrow
finder-inf tex-site image-dired+ image-dired format-spec dired advice
info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib 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 move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 2474425 281840)
 (symbols 48 90602 25)
 (miscs 40 12162 6009)
 (strings 32 331808 46857)
 (string-bytes 1 10669574)
 (vectors 16 153450)
 (vector-slots 8 3304679 158422)
 (floats 8 3541 2574)
 (intervals 56 274521 13763)
 (buffers 976 442)
 (heap 1024 202068 29985))





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
  2016-10-27 22:03 bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation Jules Tamagnan
@ 2017-05-22 15:31 ` npostavs
  2017-05-23  0:26 ` npostavs
  1 sibling, 0 replies; 5+ messages in thread
From: npostavs @ 2017-05-22 15:31 UTC (permalink / raw)
  To: Jules Tamagnan; +Cc: 24809

Jules Tamagnan <jtamagnan@gmail.com> writes:

> The bug is quite simple.
>   - Open a python file.
>   - Type:
>     hello = \
>   - C-m ; newline
>
> The point will now be directly under the backslash character. This is
> indented incorrectly according to the pep8 style guide and the
> pycodestyle checker, it should instead be indented
> `python-indent-offset` further than the previous line.

So the patch works (additionally the python-indent-after-backslash-4
test would need to be updated) but I'm not sure if it's correct.
Currently, the pep8 style guide doesn't really say anything about
indentation following backslash, it just recommends using parens
instead.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
  2016-10-27 22:03 bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation Jules Tamagnan
  2017-05-22 15:31 ` npostavs
@ 2017-05-23  0:26 ` npostavs
  2017-05-23  0:47   ` npostavs
  1 sibling, 1 reply; 5+ messages in thread
From: npostavs @ 2017-05-23  0:26 UTC (permalink / raw)
  To: 24809; +Cc: Jules Tamagnan

[-- Attachment #1: Type: text/plain, Size: 62 bytes --]

[Please use "Reply All" to keep 24809@debbugs.gnu.org on Cc]


[-- Attachment #2: Type: message/rfc822, Size: 2195 bytes --]

From: Jules Tamagnan <jtamagnan@gmail.com>
To: npostavs@users.sourceforge.net
Subject: Re: bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
Date: Mon, 22 May 2017 11:46:32 -0700
Message-ID: <87tw4cbugn.fsf@gmail.com>

npostavs@users.sourceforge.net writes:

> Jules Tamagnan <jtamagnan@gmail.com> writes:
>
>> The bug is quite simple.
>>   - Open a python file.
>>   - Type:
>>     hello = \
>>   - C-m ; newline
>>
>> The point will now be directly under the backslash character. This is
>> indented incorrectly according to the pep8 style guide and the
>> pycodestyle checker, it should instead be indented
>> `python-indent-offset` further than the previous line.
>
> So the patch works (additionally the python-indent-after-backslash-4
> test would need to be updated) but I'm not sure if it's correct.
> Currently, the pep8 style guide doesn't really say anything about
> indentation following backslash, it just recommends using parens
> instead.

I can update the test. Yeah it is a sort of gray zone because the style
guide isn't explicit. I think that the goal of putting a backslash after
the equal sign would be to split a line that was too long. The current
way that emacs chooses to split a line is not really consistent that
goal or with the outcome of using an open paren. I think that the
following long line:

an_overly_long_variable_name = some_object.some_method(some_argument_to_some_method)

could be split like this:

an_overly_long_variable_name = (
    some_object.some_method(some_argument_to_some_method))

or if someone wanted to use a backslash like this:

an_overly_long_variable_name = \
    some_object.some_method(some_argument_to_some_method)

instead of like:

an_overly_long_variable_name = \
                               some_object.some_method(some_argument_to_some_method)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
  2017-05-23  0:26 ` npostavs
@ 2017-05-23  0:47   ` npostavs
  2017-05-29  3:36     ` npostavs
  0 siblings, 1 reply; 5+ messages in thread
From: npostavs @ 2017-05-23  0:47 UTC (permalink / raw)
  To: 24809; +Cc: Jules Tamagnan

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

From: Jules Tamagnan <jtamagnan@gmail.com>

> an_overly_long_variable_name = some_object.some_method(some_argument_to_some_method)
>
> could be split like this:
>
> an_overly_long_variable_name = (
>     some_object.some_method(some_argument_to_some_method))
>
> or if someone wanted to use a backslash like this:
>
> an_overly_long_variable_name = \
>     some_object.some_method(some_argument_to_some_method)
>
> instead of like:
>
> an_overly_long_variable_name = \
>                                some_object.some_method(some_argument_to_some_method)
> ----------

Ah, I'd been looking at stuff from the test suite which looked like:

    an_overly_long_variable_name = something \
                                   another.thing(etc)

which seems a bit neater than

    an_overly_long_variable_name = something \
        another.thing(etc)

but I find your example convincing.  And we still have parens if the
first kind of indentation is preferred:

    an_overly_long_variable_name = (something 
                                    another.thing(etc))

I actually have the fix for the tests already written anyway.  I'll wait
a week or so before pushing, in case anyone else has some comments on
this.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1426 bytes --]

From 5476e881e1d302bcd40a407de0946d383012384f Mon Sep 17 00:00:00 2001
From: Jules Tamagnan <jtamagnan@gmail.com>
Date: Thu, 27 Oct 2016 15:03:31 -0700
Subject: [PATCH v2 1/3] Comply with pep 8 style guide for backslash in
 assignment (Bug#24809)

* lisp/progmodes/python.el (python-indent--calculate-indentation):
Increase indent by `python-indent-offset' after
`:after-backslash-assignment-continuation'.

Copyright-paperwork-exempt: yes
---
 lisp/progmodes/python.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9cebc81bfc..02a2e4046d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1054,13 +1054,13 @@ (defun python-indent--calculate-indentation ()
            (max line-indentation base-indent)))
         (`(,(or :after-block-start
                 :after-backslash-first-line
+                :after-backslash-assignment-continuation
                 :inside-paren-newline-start) . ,start)
          ;; Add one indentation level.
          (goto-char start)
          (+ (current-indentation) python-indent-offset))
         (`(,(or :inside-paren
                 :after-backslash-block-continuation
-                :after-backslash-assignment-continuation
                 :after-backslash-dotted-continuation) . ,start)
          ;; Use the column given by the context.
          (goto-char start)
-- 
2.11.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch --]
[-- Type: text/x-diff, Size: 1803 bytes --]

From e931c8bd772be41dc4b98bc2614eacff529af195 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 22 May 2017 12:32:04 -0400
Subject: [PATCH v2 2/3] ; Update test for previous change

* test/lisp/progmodes/python-tests.el
(python-indent-after-backslash-4): Indent after backslash is now
python-indent-offset.
---
 test/lisp/progmodes/python-tests.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index cd05710000..cea597acea 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -753,8 +753,8 @@ (ert-deftest python-indent-after-backslash-4 ()
   (python-tests-with-temp-buffer
    "
 super_awful_assignment = some_calculation() and \\\\
-                         another_calculation() and \\\\
-                         some_final_calculation()
+    another_calculation() and \\\\
+    some_final_calculation()
 "
    (python-tests-look-at
     "super_awful_assignment = some_calculation() and \\\\")
@@ -763,10 +763,10 @@ (ert-deftest python-indent-after-backslash-4 ()
    (python-tests-look-at "another_calculation() and \\\\")
    (should (eq (car (python-indent-context))
                :after-backslash-assignment-continuation))
-   (should (= (python-indent-calculate-indentation) 25))
+   (should (= (python-indent-calculate-indentation) python-indent-offset))
    (python-tests-look-at "some_final_calculation()")
    (should (eq (car (python-indent-context)) :after-backslash))
-   (should (= (python-indent-calculate-indentation) 25))))
+   (should (= (python-indent-calculate-indentation) python-indent-offset))))
 
 (ert-deftest python-indent-after-backslash-5 ()
   "Dotted continuation bizarre example."
-- 
2.11.1


[-- Attachment #4: patch --]
[-- Type: text/plain, Size: 12576 bytes --]

From 711102160a678b4f9fb7042d8ae53cf7c740c309 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Mon, 22 May 2017 12:36:20 -0400
Subject: [PATCH v2 3/3] ; Fix backslashes in python-tests

* test/lisp/progmodes/python-tests.el (python-indent-after-backslash-1)
(python-indent-after-backslash-2)
(python-indent-after-backslash-3)
(python-indent-after-backslash-4)
(python-indent-after-backslash-5)
(python-nav-beginning-of-statement-1)
(python-nav-end-of-statement-1)
(python-nav-forward-statement-1)
(python-nav-backward-statement-1)
(python-nav-backward-statement-2)
(python-info-statement-starts-block-p-2)
(python-info-statement-ends-block-p-2)
(python-info-beginning-of-statement-p-2)
(python-info-end-of-statement-p-2)
(python-info-beginning-of-block-p-2)
(python-info-end-of-block-p-2)
(python-info-line-ends-backslash-p-1)
(python-info-beginning-of-backslash-1)
(python-info-continuation-line-p-1)
(python-info-block-continuation-line-p-1)
(python-info-assignment-statement-p-1)
(python-info-assignment-continuation-line-p-1): Backslashes in
literals should be doubled only once to produce one backslash in the
buffer.  If there backslashes inside a Python string literal in a Lisp
literal, that would need to be doubled twice, but there are no such
cases.  Note that `python-tests-looking-at' takes a plain string, not
a regexp.
---
 test/lisp/progmodes/python-tests.el | 106 ++++++++++++++++++------------------
 1 file changed, 53 insertions(+), 53 deletions(-)

diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index cea597acea..7c274381cd 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -662,8 +662,8 @@ (ert-deftest python-indent-after-backslash-1 ()
   "The most common case."
   (python-tests-with-temp-buffer
    "
-from foo.bar.baz import something, something_1 \\\\
-    something_2 something_3, \\\\
+from foo.bar.baz import something, something_1 \\
+    something_2 something_3, \\
     something_4, something_5
 "
    (python-tests-look-at "from foo.bar.baz import something, something_1")
@@ -683,14 +683,14 @@ (ert-deftest python-indent-after-backslash-2 ()
   "A pretty extreme complicated case."
   (python-tests-with-temp-buffer
    "
-objects = Thing.objects.all() \\\\
+objects = Thing.objects.all() \\
                        .filter(
                            type='toy',
                            status='bought'
-                       ) \\\\
+                       ) \\
                        .aggregate(
                            Sum('amount')
-                       ) \\\\
+                       ) \\
                        .values_list()
 "
    (python-tests-look-at "objects = Thing.objects.all()")
@@ -706,7 +706,7 @@ (ert-deftest python-indent-after-backslash-2 ()
    (python-tests-look-at "status='bought'")
    (should (eq (car (python-indent-context)) :inside-paren-newline-start))
    (should (= (python-indent-calculate-indentation) 27))
-   (python-tests-look-at ") \\\\")
+   (python-tests-look-at ") \\")
    (should (eq (car (python-indent-context)) :inside-paren-at-closing-paren))
    (should (= (python-indent-calculate-indentation) 23))
    (python-tests-look-at ".aggregate(")
@@ -716,7 +716,7 @@ (ert-deftest python-indent-after-backslash-2 ()
    (python-tests-look-at "Sum('amount')")
    (should (eq (car (python-indent-context)) :inside-paren-newline-start))
    (should (= (python-indent-calculate-indentation) 27))
-   (python-tests-look-at ") \\\\")
+   (python-tests-look-at ") \\")
    (should (eq (car (python-indent-context)) :inside-paren-at-closing-paren))
    (should (= (python-indent-calculate-indentation) 23))
    (python-tests-look-at ".values_list()")
@@ -731,12 +731,12 @@ (ert-deftest python-indent-after-backslash-3 ()
   "Backslash continuation from block start."
   (python-tests-with-temp-buffer
    "
-with open('/path/to/some/file/you/want/to/read') as file_1, \\\\
+with open('/path/to/some/file/you/want/to/read') as file_1, \\
      open('/path/to/some/file/being/written', 'w') as file_2:
     file_2.write(file_1.read())
 "
    (python-tests-look-at
-    "with open('/path/to/some/file/you/want/to/read') as file_1, \\\\")
+    "with open('/path/to/some/file/you/want/to/read') as file_1, \\")
    (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at
@@ -752,15 +752,15 @@ (ert-deftest python-indent-after-backslash-4 ()
   "Backslash continuation from assignment."
   (python-tests-with-temp-buffer
    "
-super_awful_assignment = some_calculation() and \\\\
-    another_calculation() and \\\\
+super_awful_assignment = some_calculation() and \\
+    another_calculation() and \\
     some_final_calculation()
 "
    (python-tests-look-at
-    "super_awful_assignment = some_calculation() and \\\\")
+    "super_awful_assignment = some_calculation() and \\")
    (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
-   (python-tests-look-at "another_calculation() and \\\\")
+   (python-tests-look-at "another_calculation() and \\")
    (should (eq (car (python-indent-context))
                :after-backslash-assignment-continuation))
    (should (= (python-indent-calculate-indentation) python-indent-offset))
@@ -773,14 +773,14 @@ (ert-deftest python-indent-after-backslash-5 ()
   (python-tests-with-temp-buffer
    "
 def delete_all_things():
-    Thing \\\\
-        .objects.all() \\\\
+    Thing \\
+        .objects.all() \\
                 .delete()
 "
-   (python-tests-look-at "Thing \\\\")
+   (python-tests-look-at "Thing \\")
    (should (eq (car (python-indent-context)) :after-block-start))
    (should (= (python-indent-calculate-indentation) 4))
-   (python-tests-look-at ".objects.all() \\\\")
+   (python-tests-look-at ".objects.all() \\")
    (should (eq (car (python-indent-context)) :after-backslash-first-line))
    (should (= (python-indent-calculate-indentation) 8))
    (python-tests-look-at ".delete()")
@@ -1882,8 +1882,8 @@ (ert-deftest python-nav-forward-defun-3 ()
 (ert-deftest python-nav-beginning-of-statement-1 ()
   (python-tests-with-temp-buffer
    "
-v1 = 123 + \
-     456 + \
+v1 = 123 + \\
+     456 + \\
      789
 v2 = (value1,
       value2,
@@ -1930,8 +1930,8 @@ (ert-deftest python-nav-beginning-of-statement-1 ()
 (ert-deftest python-nav-end-of-statement-1 ()
   (python-tests-with-temp-buffer
    "
-v1 = 123 + \
-     456 + \
+v1 = 123 + \\
+     456 + \\
      789
 v2 = (value1,
       value2,
@@ -1984,8 +1984,8 @@ (ert-deftest python-nav-end-of-statement-1 ()
 (ert-deftest python-nav-forward-statement-1 ()
   (python-tests-with-temp-buffer
    "
-v1 = 123 + \
-     456 + \
+v1 = 123 + \\
+     456 + \\
      789
 v2 = (value1,
       value2,
@@ -2025,8 +2025,8 @@ (ert-deftest python-nav-forward-statement-1 ()
 (ert-deftest python-nav-backward-statement-1 ()
   (python-tests-with-temp-buffer
    "
-v1 = 123 + \
-     456 + \
+v1 = 123 + \\
+     456 + \\
      789
 v2 = (value1,
       value2,
@@ -2067,8 +2067,8 @@ (ert-deftest python-nav-backward-statement-2 ()
   :expected-result :failed
   (python-tests-with-temp-buffer
    "
-v1 = 123 + \
-     456 + \
+v1 = 123 + \\
+     456 + \\
      789
 v2 = (value1,
       value2,
@@ -3962,8 +3962,8 @@ (ert-deftest python-info-statement-starts-block-p-1 ()
 (ert-deftest python-info-statement-starts-block-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError('sorry, you lose')
 "
@@ -3987,8 +3987,8 @@ (ert-deftest python-info-statement-ends-block-p-1 ()
 (ert-deftest python-info-statement-ends-block-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4018,8 +4018,8 @@ (ert-deftest python-info-beginning-of-statement-p-1 ()
 (ert-deftest python-info-beginning-of-statement-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4058,8 +4058,8 @@ (ert-deftest python-info-end-of-statement-p-1 ()
 (ert-deftest python-info-end-of-statement-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4099,8 +4099,8 @@ (ert-deftest python-info-beginning-of-block-p-1 ()
 (ert-deftest python-info-beginning-of-block-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4137,8 +4137,8 @@ (ert-deftest python-info-end-of-block-p-1 ()
 (ert-deftest python-info-end-of-block-p-2 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4645,14 +4645,14 @@ (ert-deftest python-info-dedenter-statement-p-5 ()
 (ert-deftest python-info-line-ends-backslash-p-1 ()
   (python-tests-with-temp-buffer
    "
-objects = Thing.objects.all() \\\\
+objects = Thing.objects.all() \\
                        .filter(
                            type='toy',
                            status='bought'
-                       ) \\\\
+                       ) \\
                        .aggregate(
                            Sum('amount')
-                       ) \\\\
+                       ) \\
                        .values_list()
 "
    (should (python-info-line-ends-backslash-p 2)) ; .filter(...
@@ -4668,14 +4668,14 @@ (ert-deftest python-info-line-ends-backslash-p-1 ()
 (ert-deftest python-info-beginning-of-backslash-1 ()
   (python-tests-with-temp-buffer
    "
-objects = Thing.objects.all() \\\\
+objects = Thing.objects.all() \\
                        .filter(
                            type='toy',
                            status='bought'
-                       ) \\\\
+                       ) \\
                        .aggregate(
                            Sum('amount')
-                       ) \\\\
+                       ) \\
                        .values_list()
 "
    (let ((first 2)
@@ -4694,8 +4694,8 @@ (ert-deftest python-info-beginning-of-backslash-1 ()
 (ert-deftest python-info-continuation-line-p-1 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4722,8 +4722,8 @@ (ert-deftest python-info-continuation-line-p-1 ()
 (ert-deftest python-info-block-continuation-line-p-1 ()
   (python-tests-with-temp-buffer
    "
-if width == 0 and height == 0 and \\\\
-   color == 'red' and emphasis == 'strong' or \\\\
+if width == 0 and height == 0 and \\
+   color == 'red' and emphasis == 'strong' or \\
    highlight > 100:
     raise ValueError(
 'sorry, you lose'
@@ -4757,8 +4757,8 @@ (ert-deftest python-info-block-continuation-line-p-2 ()
 (ert-deftest python-info-assignment-statement-p-1 ()
   (python-tests-with-temp-buffer
    "
-data = foo(), bar() \\\\
-       baz(), 4 \\\\
+data = foo(), bar() \\
+       baz(), 4 \\
        5, 6
 "
    (python-tests-look-at "data = foo(), bar()")
@@ -4800,8 +4800,8 @@ (ert-deftest python-info-assignment-statement-p-3 ()
 (ert-deftest python-info-assignment-continuation-line-p-1 ()
   (python-tests-with-temp-buffer
    "
-data = foo(), bar() \\\\
-       baz(), 4 \\\\
+data = foo(), bar() \\
+       baz(), 4 \\
        5, 6
 "
    (python-tests-look-at "data = foo(), bar()")
-- 
2.11.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation
  2017-05-23  0:47   ` npostavs
@ 2017-05-29  3:36     ` npostavs
  0 siblings, 0 replies; 5+ messages in thread
From: npostavs @ 2017-05-29  3:36 UTC (permalink / raw)
  To: 24809; +Cc: Jules Tamagnan

tags 24809 fixed
close 24809 26.1
quit

npostavs@users.sourceforge.net writes:

> I actually have the fix for the tests already written anyway.  I'll wait
> a week or so before pushing, in case anyone else has some comments on
> this.

Pushed to master [1: c9097e9b5f], [2: eafc985f7e], [3: 443f371636].

[1: c9097e9b5f]: 2017-05-28 23:33:25 -0400
  Comply with pep 8 style guide for backslash in assignment (Bug#24809)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c9097e9b5f5e427c7d2438db9aad190222882aa1

[2: eafc985f7e]: 2017-05-28 23:33:25 -0400
  ; Update test for previous change
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=eafc985f7ea975f86b22d9456a2f91fe5342a9ca

[3: 443f371636]: 2017-05-28 23:33:25 -0400
  ; Fix backslashes in python-tests
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=443f37163634319a730133efe9e21933c23dc3c6





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-29  3:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 22:03 bug#24809: 25.1; Python.el improper indention after backslash-assignment-continuation Jules Tamagnan
2017-05-22 15:31 ` npostavs
2017-05-23  0:26 ` npostavs
2017-05-23  0:47   ` npostavs
2017-05-29  3:36     ` npostavs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.