From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#18796: 24.4; python indent-for-tab-command fails to recognize if-elif-else Date: Wed, 22 Oct 2014 13:52:44 -0300 Message-ID: <82d29k3v37.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1413995847 5741 80.91.229.3 (22 Oct 2014 16:37:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 16:37:27 +0000 (UTC) Cc: fabian@anue.biz To: 18796@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 18:37:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XgyuV-0008QO-7r for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 18:37:19 +0200 Original-Received: from localhost ([::1]:58953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgyuU-0006la-Sf for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 12:37:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgyuL-0006iK-BK for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:37:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgyuF-0001XR-06 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:37:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgyuE-0001XM-TE for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XgyuE-0004D9-IS for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18796 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141399577316100 (code B ref -1); Wed, 22 Oct 2014 16:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2014 16:36:13 +0000 Original-Received: from localhost ([127.0.0.1]:60070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgytQ-0004Bb-IO for submit@debbugs.gnu.org; Wed, 22 Oct 2014 12:36:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgytN-0004BO-NO for submit@debbugs.gnu.org; Wed, 22 Oct 2014 12:36:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgytC-0001Ne-L5 for submit@debbugs.gnu.org; Wed, 22 Oct 2014 12:36:04 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgytC-0001Na-Hv for submit@debbugs.gnu.org; Wed, 22 Oct 2014 12:35:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgyt6-0006Fn-Fc for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:35:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgyt0-0001LL-F2 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:35:52 -0400 Original-Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:46644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgyt0-0001L9-9L for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 12:35:46 -0400 Original-Received: by mail-qc0-f181.google.com with SMTP id r5so3036101qcx.12 for ; Wed, 22 Oct 2014 09:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type; bh=cUQYJ6C11X7xtnwllmgoFyOAg1To/V3sPksMiELTa40=; b=er0fl35QUGDYCZ83z05M4LloUYP6+ICoG7ZmlTvrEw8tHEumICT67GP/uluUN50ZV4 +rCdbbegMsYw3PqcfE5andALd+Z9YN3fiw3M6zb143sVXCcph3KukVXKkaljZOccxrnw n2mTMkwW6toUNVMPQv0BNCrXxzVwRZOQBWjvDa8+dOdeyXgynxwHtxpbV7gkPEVy1+O+ w99Mb6foId6DmJySUgnO2WrVh20QIlBnkYzGc7W8K9F/jMr4LcoeB3x5OlgeXgzcVUij 4/TfQZB55zL5wB9HpXFv6cg4ERJSLcOSiyZOJEjtXEwYdY1aP2gngxoXKSErtpXjP5CD KTHQ== X-Received: by 10.140.48.233 with SMTP id o96mr54980746qga.47.1413995743992; Wed, 22 Oct 2014 09:35:43 -0700 (PDT) Original-Received: from carlos ([190.216.58.35]) by mx.google.com with ESMTPSA id h79sm13972110qgd.27.2014.10.22.09.35.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Oct 2014 09:35:42 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94924 While in python-mode select the following code and press tab: def f(): if True: pass else: pass You will get: def f(): if True: pass else: pass Which is clearly wrong. I understand that auto-indenting python could be a difficult task. Maybe there's a rationale for the above behavior I can't grasp. But the result is somewhat surprising for the unaware. ------------------------- In GNU Emacs 24.4.1 (i686-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-10-22 on carlos Windowing system distributor `The X.Org Foundation', version 11.0.11502000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_COLLATE: C value of $LC_TIME: es_AR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: show-paren-mode: t shell-dirtrack-mode: t eldoc-mode: t yas-global-mode: t yas-minor-mode: t ido-ubiquitous-mode: t ido-everywhere: t winner-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-e e l s e : 0 C-a C-SPC C-SPC C-w C-x C-s C-h f i n d e n t - f o r q SPC SPC SPC SPC SPC C-a C-SPC C-/ i f SPC T r u e : C-a C-d C-k i f SPC T r u e : C-a C-SPC C-/ C-/ p a s s e l s e SPC SPC SPC SPC p a s s C-/ C-a C-SPC C-e : C-a C-SPC d e d e f SPC x x x x ( ) : M-d d f C-a C-SPC C-a C-SPC C-/ C-SPC M-w M-x r e p o r t - e m Recent messages: Mark activated Closes elif argv[1] == "send": Undo! [3 times] Mark set Closes if True: Mark activated [2 times] Closes if True: Mark set Undo! Mark activated Load-path shadows: ~/.emacs.d/lisp/rmail hides /usr/share/emacs/24.4/lisp/mail/rmail Features: (nnir qp gnus-dup mule-util debug misearch multi-isearch jka-compr oauth2 warnings plstore cus-edit cus-start cus-load eieio-opt speedbar sb-image ezimage dframe python json tramp-cache tramp tramp-compat tramp-loaddefs trampver mailalias smtpmail pp shadow emacsbug sendmail rect url-queue timezone shr-color color url-http url-gw url-auth eww mm-url shr sort smiley gnus-cite mail-extr gnus-async gnus-bcklg gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 gnutls network-stream starttls nnimap parse-time tls utf7 netrc gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache google-contacts-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source google-contacts-message google-contacts xml url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache url-vars google-oauth gnus-start gnus-spec gnus-int gnus-range message idna 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 gnus-util mail-utils mm-util mail-prsvr wid-edit vc-git epa-file epa derived epg server paredit edmacro kmacro paren cl-macs ob-python ob-R org org-macro org-footnote org-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 ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs ess-toolbar ess-mouse mouseme thingatpt browse-url ess-menu ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d ess-sas-l ess-sas-a shell pcomplete ess-sta-d ess-sta-l cc-vars cc-defs make-regexp ess-sp6-d ess-sp3-d ess-julia ess-r-d compile ess-tracebug format-spec ess-roxy hideshow ess-help ess-developer ess-r-args eldoc ess-s-l ess ess-inf comint ansi-color ess-mode ess-noweb-mode ess-utils time-date ess-custom executable ess-compat ess-site yasnippet help-mode cl gv ido-ubiquitous cl-loaddefs cl-lib advice help-fns imenu-anywhere imenu ido windmove winner ring info easymenu package epg-config wombat-theme tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 8 557759 103077) (symbols 24 46775 0) (miscs 20 5488 3171) (strings 16 166668 3684) (string-bytes 1 4655761) (vectors 8 48281) (vector-slots 4 1634972 78634) (floats 8 1011 1185) (intervals 28 21468 2483) (buffers 512 63) (heap 1024 81411 3306))