From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rob Moss Newsgroups: gmane.emacs.bugs Subject: bug#62031: 29.0.60; python-mode indentation after re.match Date: Tue, 7 Mar 2023 15:44:51 +1100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11082"; mail-complaints-to="usenet@ciao.gmane.io" To: 62031@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 07 09:55:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZT6P-0002ek-I3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Mar 2023 09:55:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZT67-0001Uc-Ul; Tue, 07 Mar 2023 03:55:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZT66-0001UH-Sc for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 03:55:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZT66-00058I-60 for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 03:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZT65-00025j-P8 for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 03:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rob Moss Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Mar 2023 08:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62031 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16781792757992 (code B ref -1); Tue, 07 Mar 2023 08:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Mar 2023 08:54:35 +0000 Original-Received: from localhost ([127.0.0.1]:44421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZT5d-00024o-M2 for submit@debbugs.gnu.org; Tue, 07 Mar 2023 03:54:35 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:36136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZPCP-0003nR-Vj for submit@debbugs.gnu.org; Mon, 06 Mar 2023 23:45:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZPCH-00065R-82 for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 23:45:14 -0500 Original-Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZPCD-0007lc-6R for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 23:45:08 -0500 Original-Received: by mail-pj1-x1042.google.com with SMTP id kb15so12078223pjb.1 for ; Mon, 06 Mar 2023 20:45:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678164303; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=hQVTGnu+NlNo1JirLUu4L1jG+wgReamixMe5yQe8f78=; b=e/H1SFjYsAWMjQt8LQIkP8JRPo3GGdvTV5UlY2WVDUx2D8okyeyLaI9YU9NrZxjA9d i3fX8b08FoLYYtLyutXs9y5TeAvT2KAAHTWn/30JjE8Vajyhj+Q+lkWdQwaQoQ7sZI/W TQsmu9X1dVKlHORpL+58TP7LoaYmHl/9JOgaeTZYBNSU3oI7w0ZKseWA5RJ7ihe8hZEQ afDH7IUe3FA2DIr1Njm5p0yI47rM/nCwWqtli0bHoWAwf2EdHaSoOj/w02bDUykMXUmz N37xnHZZz7S1EhIEDD4YfyGR1B76dijfkgtiybyRcwnKepleb13x8LKgzrJ4/Zxo6OVe aIfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678164303; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hQVTGnu+NlNo1JirLUu4L1jG+wgReamixMe5yQe8f78=; b=zJtqJ8x9Un0r5VKd6vsKvU6Ze+Lr8dkfHOMcSKLkpeNxhzGZXE1mROYy7q8mns0YUf iDS7kJq+PCZy/h/fnL7K4+3Wz/5I8UxhIHRwQZY6n3yXh2n/0kVc2I7ulrutzQNJf594 lbrvxkG1NV4glR6UFQTp7Kr/GWFpQXSka2UQLy5ibGhlgWqPuV1nxeEXNEf8knsvXpzx q0+2J4cucf9XYLURqpLB0NU59TSOY7FQYVKSaJNEvo98RYCPtHTSWX74viiOvTTxR6Tj w0j4JNtbE48/vlvdzvbu1lKIt3mAFhba1WfbHxr3viWsOISYKt0ojpKu0o6gtLgPW+W4 LRFw== X-Gm-Message-State: AO0yUKVDmGMbwc++9XyCNMcq73aafTkEpaHZhzi2Um8Y6WcRgTRsGUbB IV9j7wsTPJ8cKAbSP/pZDaQuf3PzPvEfYLBYxBJkZXHv+qpnGJR4yW8= X-Google-Smtp-Source: AK7set8DWN8vHoN2DHpGybpUTX4CsvBvaFZ4TbylCi4D8rJw7pZK0pvEnDMQ1IHXrYZYJZnq7lBV4JxLFGgIQpaSLlg= X-Received: by 2002:a17:902:efce:b0:19b:5233:51d8 with SMTP id ja14-20020a170902efce00b0019b523351d8mr5400831plb.13.1678164302857; Mon, 06 Mar 2023 20:45:02 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=robm.dev@gmail.com; helo=mail-pj1-x1042.google.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, LONGWORDS=2.035, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_HEX=0.1 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 07 Mar 2023 03:54:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257435 Archived-At: Hi there, Starting from 'emacs -Q' I do the following: 1. Visit a new Python file ("~/test.py", say); 2. Enter the following lines: ---------------------------------------- import re def test_re(string): if re.match('^[a-c]+$', string): print('yes') else: print('no') ---------------------------------------- 3. Place the cursor on the "else:" line and press . This has the following effect on the buffer contents: ---------------------------------------- import re def test_re(string): if re.match('^[a-c]+$', string): print('yes') else: print('no') ---------------------------------------- Pressing repeatedly has no effect, this incorrect indentation is the only indentation it allows. I experience this issue with "python-mode" and "python-ts-mode", but if I change "re.match" to "re.matches", the correct indentation is preserved. So presumably the "match" in "re.match" is being treated as a match statement. All the best, Rob In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-02-24 built on 5050l-202293-l.mobility.unimelb.net.au Repository revision: 94e70ed4261dbfcef679697dfa0dc2348a90dbdc Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Ubuntu 20.04.5 LTS Configured using: 'configure --with-native-compilation --with-json --with-cairo --with-tree-sitter --with-sqlite3 --prefix=/opt/emacs29 CFLAGS=-O2' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_AU.UTF-8 locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: consult-org-roam-mode: t org-roam-db-autosync-mode: t flyspell-mode: t pdf-occur-global-minor-mode: t pyvenv-mode: t smartparens-global-mode: t smartparens-mode: t global-company-mode: t company-mode: t global-flycheck-mode: t flycheck-mode: t recentf-mode: t desktop-save-mode: t global-git-commit-mode: t magit-auto-revert-mode: t shell-dirtrack-mode: t global-diff-hl-mode: t diff-hl-mode: t vertico-multiform-mode: t vertico-mode: t savehist-mode: t marginalia-mode: t mood-line-mode: t which-key-mode: t global-hl-todo-mode: t hl-todo-mode: t olivetti-mode: t delete-selection-mode: t global-hl-line-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t line-number-mode: t visual-line-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Features: (shadow mail-extr emacsbug cl-print rst shortdoc help-fns radix-tree pulse skeleton misearch multi-isearch latexenc oc-basic rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid nxml-mode nxml-outln nxml-rap sgml-mode facemenu make-mode cal-move ess-sp6-d tabify ucs-normalize org-roam-boxes consult-org-entity embark-org embark-consult embark consult-org consult-org-roam consult-org-roam-buffer f consult-vertico consult compat-28 org-roam-migrate org-roam-log org-roam-mode org-roam-capture org-roam-id org-roam-node org-roam-db org-roam-utils org-roam-compat org-roam org-capture org-attach emacsql-sqlite url-http url-auth url-gw novice vertico-directory mule-util conf-mode sh-script smie cursor-sensor reftex-dcr reftex reftex-loaddefs reftex-vars tex-mode mixed-pitch adaptive-wrap reveal org-superstar ox-beamer ffap ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader range ol-docview doc-view ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi outshine outshine-org-cmds outorg ox-jfm ox-gfm ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-element org-persist xdg org-id org-refile avl-tree ob-shell ob-dot ob-R ob-python ob-haskell org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat org-macs eglot external-completion array jsonrpc ert debug backtrace python-blue python compat treesit init sanityinc-tomorrow-night-theme executable vc-git whitespace face-remap flyspell ispell sort gnutls nsm dns elpher pdf-occur ibuf-ext ibuffer ibuffer-loaddefs pdf-isearch let-alist pdf-misc pdf-tools pdf-view magit-bookmark bookmark jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif 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 mastodon-alt mastodon-media url-cache mastodon-tl ts s mastodon shr pixel-fill kinsoku url-file svg dom mastodon-toot mastodon-iso persist mastodon-http request ffmpeg-elf yaml-mode emacsql-sqlite-builtin sqlite emacsql-sqlite-common emacsql emacsql-compiler xml bibtex rust-mode poly-R ess-r-mode ess-r-flymake flymake-proc flymake ess-r-xref ess-trns ess-r-package ess-r-completion ess-roxy ess-r-syntax ess-rd hideshow ess-s-lang ess-help ess-mode ess-inf ess-tracebug compile tramp tramp-loaddefs trampver tramp-integration tramp-compat parse-time iso8601 ls-lisp poly-noweb poly-markdown markdown-mode noutline outline polymode poly-lock polymode-base polymode-weave polymode-export polymode-compat polymode-methods polymode-core polymode-classes eieio-custom eieio-base ess lisp-mnt ess-utils ess-custom pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util cus-edit pp cus-load files-x driverr smartparens thingatpt company-oddmuse company-keywords company-etags etags fileloop generator xref project company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb company flycheck find-func recentf tree-widget wid-edit desktop frameset magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell pcomplete comint ansi-osc ring server ansi-color magit-mode transient format-spec magit-git magit-section magit-utils crm diff-hl vc-dir ewoc vc vc-dispatcher diff-mode vertico-multiform vertico savehist orderless marginalia edmacro kmacro emojify advice apropos tar-mode arc-mode archive-mode pcase ht dash mood-line undo-fu hercules which-key hl-todo color-theme-sanityinc-tomorrow color olivetti delsel hl-line comp comp-cstr warnings icons cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core undo-fu-autoloads haskell-mode-autoloads consult-dir-autoloads python-blue-autoloads emacsql-sqlite-builtin-autoloads mastodon-autoloads persist-autoloads consult-org-entity-autoloads pdf-tools-autoloads orderless-autoloads consult-org-roam-autoloads which-key-autoloads olivetti-autoloads smartparens-autoloads rx flycheck-autoloads org-roam-autoloads emacsql-sqlite-autoloads emacsql-autoloads finder-inf color-theme-sanityinc-tomorrow-autoloads citar-embark-autoloads citar-autoloads citeproc-autoloads string-inflection-autoloads parsebib-autoloads queue-autoloads embark-consult-autoloads embark-autoloads marginalia-autoloads vertico-autoloads polymode-autoloads ess-autoloads consult-autoloads compat-autoloads ts-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1904084 978312) (symbols 48 62463 106) (strings 32 307966 100211) (string-bytes 1 10375851) (vectors 16 147394) (vector-slots 8 3144694 1170710) (floats 8 905 2495) (intervals 56 45653 40421) (buffers 984 67))