From unknown Thu Sep 11 23:31:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79271 <79271@debbugs.gnu.org> To: bug#79271 <79271@debbugs.gnu.org> Subject: Status: 30.1; cperl-mode regexp indent issue Reply-To: bug#79271 <79271@debbugs.gnu.org> Date: Fri, 12 Sep 2025 06:31:44 +0000 retitle 79271 30.1; cperl-mode regexp indent issue reassign 79271 emacs submitter 79271 John C severity 79271 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 19 13:43:44 2025 Received: (at submit) by debbugs.gnu.org; 19 Aug 2025 17:43:44 +0000 Received: from localhost ([127.0.0.1]:54792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoQN5-0004k5-DJ for submit@debbugs.gnu.org; Tue, 19 Aug 2025 13:43:44 -0400 Received: from lists.gnu.org ([2001:470:142::17]:45364) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoQN2-0004jm-BT for submit@debbugs.gnu.org; Tue, 19 Aug 2025 13:43:41 -0400 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 1uoQMt-00058z-Qc for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2025 13:43:33 -0400 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoQMr-0005De-80 for bug-gnu-emacs@gnu.org; Tue, 19 Aug 2025 13:43:31 -0400 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-3e57010bc95so49942375ab.3 for ; Tue, 19 Aug 2025 10:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755625407; x=1756230207; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=G9VBSrV5p3OdGCzQxcOEapVMCkcAZSOkm4jCEqFQkOM=; b=aQxPIiOr1M0ahxrkByOWw//vt6HQnGsj3SUD9R8oysCecsF2qtiHVV4OeKpUotQ5hR APOWSbS41UENiM9kB5bYJFOWFhL8y3DYUZC6JAnFzxS2zSTvQxc5q83MdbSSmMtnK9xM qtDb86kV70g9ZgDjt6kFwpLLCDhItiz4w9h2uNTJmk2dTB6e+QD27Ap3Jck7CF9+hmjm j6NZfmON2ayvlj9iOgw+Sg9bIlzRPppKxCXPGh65INiyF75MS0wtSMTSE8cEBedu9NyM TRHsPDjkHFdwdjLbbYbnRdYUCjQvoDm33u40ZUF4/dT1GwrRVXu0EdaQ6+bj5z1cTuaZ bR+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755625407; x=1756230207; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=G9VBSrV5p3OdGCzQxcOEapVMCkcAZSOkm4jCEqFQkOM=; b=GAp2kMjuO6eYobpnY4Dn6+isnkl3haBAgABQKgAXlZPQiRgKhQ7h1+HpdP5UImOnbY VhEYPMLe1TYZ5Da/P72F8HiTIDj55br7zhSjRxnQQtvz9XB76W/J0PnaVn6BRlvkUwwI MiQ2ZkX/ctuUie2YJ4ph/iddRqqO5RIqrwPQOaibTdWwjr7yj9wWppS8g/rKdjiqlckr KmVkO+NCAjesG3zc6ix9oSN9qej+bi0ockw/Wy149GSjqzJiMfY4Y4V7AGFUQmeBGU04 wOxIy1BrspewqkU1rPGfrbZWrYjE7swmmfa7ZajuCd6k8H7+fixA/XKxn6NpDtsvev75 vAdw== X-Gm-Message-State: AOJu0YycuBxLuOPODnfFFiZ9A387ke+EWEHPf5ex7WsS7u0w7HzesW2U ZMQj0PFN3ld9oJyC90KR5GmkUQ+v7WzFgfSMFFUZxVFn/io8oIMOfJpF6Ks/zPqVX9i0GlRbL7P aCJgl6OVwP/oVBoI22aJ66FFRSgDD2s3/PGYz X-Gm-Gg: ASbGncuVnlknAxK+WQHB1NeRJuS/sdIUrxF7xWeIFaociYQbyCSlAmUXkD6UIfxZVFb 4kPDtr82HWRnn7HHzOvknkPO2HkwtBt7XsacEHpmwdfaZ/jSaImsChYMdX0IMbiOpH4qRjNUss5 h6hHopEQ7X1/kDSTPLXPguXKFxfWNq3AdjYRdhqD7IYlNrCFiy121Ud/6f/y/JyclW6M5GfJzvo JeXEuWCk2QjMpsW1dM= X-Google-Smtp-Source: AGHT+IHbG9sPc7ET//O/xXn08pDNnkcl2FkSdNtzybL4e4wH4lxHHS6t8e5AGFVmwJ4YCDI46bICfjC0XQ3z3gHz580= X-Received: by 2002:a05:6e02:12c7:b0:3e5:4002:e827 with SMTP id e9e14a558f8ab-3e6765da860mr61662185ab.6.1755625406742; Tue, 19 Aug 2025 10:43:26 -0700 (PDT) MIME-Version: 1.0 From: John C Date: Tue, 19 Aug 2025 13:43:14 -0400 X-Gm-Features: Ac12FXxfRs-ProiDmSSfMkVg_Ciskl96GjCy748cmhHuR32xzl8AACpbB1UOdUM Message-ID: Subject: 30.1; cperl-mode regexp indent issue To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000ba4569063cbb644a" Received-SPF: pass client-ip=2607:f8b0:4864:20::133; envelope-from=john.ciolfi.32@gmail.com; helo=mail-il1-x133.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el I used the Jul-28-2025 version https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (john.ciolfi.32[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (john.ciolfi.32[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --000000000000ba4569063cbb644a Content-Type: text/plain; charset="UTF-8" 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el I used the Jul-28-2025 version https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el 2. cd ~/tmp 3. emacs -Q -L . # Using emacs 30.1 4. M-x byte-compile-file RET cperl-mode.el RET 5. C-x C-f foo.pl C-x h # select all of foo.pl C-M-\ # indent foo.pl Here's the indented foo.pl: # -*- mode: cperl -*- my $str =~ s/^ (Field1: [^\n]+) \s* Field2: \s* (\S+) \s* //xsm; Notice that the regexp is not indented nicely. I would expect "Field2 ..." to be aligned under "(Field...)": my $str =~ s/^ (Field1: [^\n]+) \s* Field2: \s* (\S+) \s* //xsm; In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2025-04-04, modified by Debian built on sbuild Windowing system distributor 'The X.Org Foundation', version 11.0.12101006 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-cairo --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/emacs-30.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: CPerl Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/ciolfi/tmp/cperl-mode hides /usr/share/emacs/30.1/lisp/progmodes/cperl-mode Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compile text-property-search comint subr-x ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common cperl-mode rx facemenu 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 touch-screen 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 gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 84401 12096) (symbols 48 7366 0) (strings 32 20464 1856) (string-bytes 1 700197) (vectors 16 11848) (vector-slots 8 163636 10525) (floats 8 26 34) (intervals 56 418 0) (buffers 992 12)) --000000000000ba4569063cbb644a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
1. In a temporary directory, say ~/tmp/, get latest cperl-= mode.el from
=C2=A0 =C2=A0https://github.com/emacs-mirro= r/emacs/blob/master/lisp/progmodes/cperl-mode.el
=C2=A0 =C2=A0I used= the Jul-28-2025 version
=C2=A0 =C2=A0https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2= 191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el

2. cd ~/tm= p

3. emacs -Q -L . =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Using emacs = 30.1

4. M-x byte-compile-file RET cperl-mode.el RET

5. C-x C-= f foo.pl

=C2=A0 =C2=A0C-x h =C2=A0 # s= elect all of foo.pl
=C2=A0 =C2=A0C-M-\ =C2= =A0 # indent foo.pl

Here's the ind= ented foo.pl:

# -*- mode: cperl -*-
my $str =3D~ s/^
=C2=A0 =C2=A0 (Field1: [^\n= ]+) \s*
=C2=A0 Field2: \s* (\S+) \s*
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 //xsm;

Notice that the regexp is not indented n= icely. I would expect "Field2 ..." to be aligned under
"(= Field...)":

=C2=A0 my $str =3D~ s/^=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(Field1: [^\n]+) \s= *
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Field2: \s* (\S= +) \s*
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0//xsm;
=


In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Versio= n 3.24.38,
=C2=A0cairo version 1.16.0) of 2025-04-04, modified by Debian= built on sbuild
Windowing system distributor 'The X.Org Foundation&= #39;, version 11.0.12101006
System Description: Debian GNU/Linux 12 (boo= kworm)

Configured using:
=C2=A0'configure --build x86_64-linu= x-gnu --prefix=3D/usr
=C2=A0--sharedstatedir=3D/var/lib --libexecdir=3D/= usr/libexec
=C2=A0--localstatedir=3D/var/lib --infodir=3D/usr/share/info=
=C2=A0--mandir=3D/usr/share/man --with-libsystemd --with-pop=3Dyes
= =C2=A0--enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/30.1/site-= lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/30.1/site-lisp:/usr/= share/emacs/site-lisp
=C2=A0--with-sound=3Dalsa --without-gconf --with-m= ailutils --build
=C2=A0x86_64-linux-gnu --prefix=3D/usr --sharedstatedir= =3D/var/lib
=C2=A0--libexecdir=3D/usr/libexec --localstatedir=3D/var/lib=
=C2=A0--infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-libs= ystemd
=C2=A0--with-pop=3Dyes
=C2=A0--enable-locallisppath=3D/etc/ema= cs:/usr/local/share/emacs/30.1/site-lisp:/usr/local/share/emacs/site-lisp:/= usr/share/emacs/30.1/site-lisp:/usr/share/emacs/site-lisp
=C2=A0--with-s= ound=3Dalsa --without-gconf --with-mailutils --with-cairo
=C2=A0--with-x= =3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars
=C2=A0'CFL= AGS=3D-g -O2
=C2=A0-ffile-prefix-map=3D/build/reproducible-path/emacs-30= .1+1=3D. -fstack-protector-strong
=C2=A0-Wformat -Werror=3Dformat-securi= ty -Wall' 'CPPFLAGS=3D-Wdate-time
=C2=A0-D_FORTIFY_SOURCE=3D2= 9; LDFLAGS=3D-Wl,-z,relro'

Configured features:
ACL CAIRO DBU= S FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF = LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIF= Y PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BAR= S TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important sett= ings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system:= utf-8-unix

Major mode: CPerl

Minor modes in effect:
=C2= =A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 show-paren-mod= e: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2= =A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-= mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
= =C2=A0 blink-cursor-mode: t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 l= ine-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-m= ode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=
=C2=A0 auto-compression-mode: t

Load-path shadows:
/home/ciol= fi/tmp/cperl-mode hides /usr/share/emacs/30.1/lisp/progmodes/cperl-mode
=
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media= puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived= epg rfc6068
epg-config gnus-util time-date mm-decode mm-bodies mm-encod= e mail-parse
rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib = sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils compil= e
text-property-search comint subr-x ansi-osc ansi-color ring comp-runbytecomp byte-compile comp-common cperl-mode rx facemenu rmc iso-transltooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-f= loat-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch= -screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
repl= ace 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-la= ng vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932= hebrew greek romanian slovak czech european
ethiopic indian cyrillic ch= inese composite emoji-zwj charscript charprop
case-table epa-hook jka-cm= pr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-= loaddefs faces cus-face macroexp
files window text-properties overlay sh= a1 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 gtk x-toolkit xinput2 x mu= lti-tty move-toolbar
make-network-process native-compile emacs)

M= emory information:
((conses 16 84401 12096) (symbols 48 7366 0) (strings= 32 20464 1856)
=C2=A0(string-bytes 1 700197) (vectors 16 11848)
=C2= =A0(vector-slots 8 163636 10525) (floats 8 26 34) (intervals 56 418 0)
= =C2=A0(buffers 992 12))
--000000000000ba4569063cbb644a-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 20 10:41:49 2025 Received: (at 79271) by debbugs.gnu.org; 20 Aug 2025 14:41:50 +0000 Received: from localhost ([127.0.0.1]:57231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uok0b-00046D-Jn for submit@debbugs.gnu.org; Wed, 20 Aug 2025 10:41:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39236) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uok0W-00045t-W4 for 79271@debbugs.gnu.org; Wed, 20 Aug 2025 10:41:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uok0R-0001PP-EX; Wed, 20 Aug 2025 10:41:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/5NK4Lqb/Q7y2kR+I7ESrMgcIEc8GEWg+TjtbQhyZ0M=; b=RQwFCcIVYRhJyWoRJuf7 QiU8imCReqArryb0FvLwy2Byn3Ahcaq+f+kTTrGYEhGEKBSvDdDYfo6t16k7Se9Qv4plzVoj9aazL 4E3pXOkkH/OX2E/+4X6r2MQjhgFojbnlzYLTyzw4sCF8Ezf4/2Ld1epMy2SpI9XO8u3xFpNmX4ArR +mQIRrU3OaRb2bG8GWHV4doPrSiqltcnbf6uxELAIdn06XwF3eQKH3Jj0iLrFCNWyTldeXGHN9bDS aYoJb9zXn9Qqii9FZTK2vb9ovqqvQrnWHfumuerVtSx3ENv0+6ZNytpjb4OcEAMYvBIqaUNuK8kl/ fwVINF+IHo1L/Q==; Date: Wed, 20 Aug 2025 17:40:59 +0300 Message-Id: <867byyf43o.fsf@gnu.org> From: Eli Zaretskii To: John C , Harald =?utf-8?Q?J=C3=B6rg?= In-Reply-To: (message from John C on Tue, 19 Aug 2025 13:43:14 -0400) Subject: Re: bug#79271: 30.1; cperl-mode regexp indent issue References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79271 Cc: 79271@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: John C > Date: Tue, 19 Aug 2025 13:43:14 -0400 > > 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from > https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el > I used the Jul-28-2025 version > > https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el > > > 2. cd ~/tmp > > 3. emacs -Q -L . # Using emacs 30.1 > > 4. M-x byte-compile-file RET cperl-mode.el RET > > 5. C-x C-f foo.pl > > C-x h # select all of foo.pl > C-M-\ # indent foo.pl > > Here's the indented foo.pl: > > # -*- mode: cperl -*- > my $str =~ s/^ > (Field1: [^\n]+) \s* > Field2: \s* (\S+) \s* > //xsm; > > Notice that the regexp is not indented nicely. I would expect "Field2 ..." to be aligned under > "(Field...)": > > my $str =~ s/^ > (Field1: [^\n]+) \s* > Field2: \s* (\S+) \s* > //xsm; And this one, too. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 20 13:35:03 2025 Received: (at 79271) by debbugs.gnu.org; 20 Aug 2025 17:35:04 +0000 Received: from localhost ([127.0.0.1]:57559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uomiF-0004P3-Gb for submit@debbugs.gnu.org; Wed, 20 Aug 2025 13:35:03 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58069) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uomiB-0004OQ-So for 79271@debbugs.gnu.org; Wed, 20 Aug 2025 13:35:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 732EE240101 for <79271@debbugs.gnu.org>; Wed, 20 Aug 2025 19:34:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1755711292; bh=5LwknHgYcXgJf3XTxH/1+Rn9MBZmYtgrbx93Fek7QJY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=rCAj/CsZ3LsdiTzQW5cjxHeVcQfjsJi+RgL3ipYAAqsiUUu+vbmZCC6rGLLWqeuUd a/+yCkbXm9NOA+dfBL6W+YiwC2ritXRv4QxK6xIUdZfq+7O2PKutCbhiZMcuVJePUt lKadyom+Grh4dhTIJUGByWeoPt6HZMXuQn5N1yffF829QWeaZyHC/xRSDjAohUb3iz DofOAqe4ejmVdik5idusTjo94W/U8ncAIZRG/yqyP+WWE6tEkAnxtnK9+zkmAQVm7K 0h0uWcqt+MeKv4knuyvsFdyvi9B1+5ZbCycCiUTDVme8zlzJOZeEBUBKKNXI8RF6Kt hNQabHeJiv5bg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c6YVg4JQmz6twH; Wed, 20 Aug 2025 19:34:51 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: Eli Zaretskii Subject: Re: bug#79271: 30.1; cperl-mode regexp indent issue In-Reply-To: <867byyf43o.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 Aug 2025 17:40:59 +0300") References: <867byyf43o.fsf@gnu.org> Date: Wed, 20 Aug 2025 17:34:51 +0000 Message-ID: <87qzx5x5fo.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79271 Cc: 79271@debbugs.gnu.org, John C X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: John C >> Date: Tue, 19 Aug 2025 13:43:14 -0400 >> >> 1. In a temporary directory, say ~/tmp/, get latest cperl-mode.el from >> https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/cperl-mode.el >> I used the Jul-28-2025 version >> >> https://github.com/emacs-mirror/emacs/blob/cef4302d309e26c2191821ba998518fb89fff54e/lisp/progmodes/cperl-mode.el >> >> >> 2. cd ~/tmp >> >> 3. emacs -Q -L . # Using emacs 30.1 >> >> 4. M-x byte-compile-file RET cperl-mode.el RET >> >> 5. C-x C-f foo.pl >> >> C-x h # select all of foo.pl >> C-M-\ # indent foo.pl >> >> Here's the indented foo.pl: >> >> # -*- mode: cperl -*- >> my $str =~ s/^ >> (Field1: [^\n]+) \s* >> Field2: \s* (\S+) \s* >> //xsm; >> >> Notice that the regexp is not indented nicely. I would expect "Field2 ..." to be aligned under >> "(Field...)": >> >> my $str =~ s/^ >> (Field1: [^\n]+) \s* >> Field2: \s* (\S+) \s* >> //xsm; > > And this one, too. Another very good recipe (and future test case), thanks! I'll fix that too (hopefully). cperl-mode wrongly indents "Field2:" as a label. -- Cheers, haj From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 22 08:17:53 2025 Received: (at 79271-done) by debbugs.gnu.org; 22 Aug 2025 12:17:53 +0000 Received: from localhost ([127.0.0.1]:35528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upQiO-00006r-HH for submit@debbugs.gnu.org; Fri, 22 Aug 2025 08:17:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45071) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upQiK-00006W-Vp for 79271-done@debbugs.gnu.org; Fri, 22 Aug 2025 08:17:50 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3DD04240027 for <79271-done@debbugs.gnu.org>; Fri, 22 Aug 2025 14:17:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.de; s=2017; t=1755865062; bh=zRlCe5XtTiGm4C7LO03IEU3PedCUDhwKddvwK1vDX+o=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=pFbmXrqTTnLhDlTZTKaXP6luxIa+oI8Ty/gGH3lIidTFpFbzFd4PUFthoRd7ri42f peYf1czukhRXaPCZ5K669TOdPMDeRHJvZ2cipdSbt6y2Wp9i053I+9c5J08ZWF7Uqd Dpz6r1qAOmff8momuvgPLHTUcL6ikp+WPNAJtDRJ6WkCTaJXkaRgKxu2WYXgXVkMUH USzsitz1NmFr4jiIO5iPs5hoUds/69nPQCdCcjdFMzLU3cDBuo+XJKewDz52zqKizk /qVayKEvuYTU1wov/VJT5LL1zRc6byzR6gC8jtzX4j3AAapwEYMo0AvL9wU8VwLGgp YaR1bNKb4msFQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c7fMn5gmhz6tvq for <79271-done@debbugs.gnu.org>; Fri, 22 Aug 2025 14:17:41 +0200 (CEST) From: =?utf-8?Q?Harald_J=C3=B6rg?= To: 79271-done@debbugs.gnu.org Subject: Indentation of "looks like a label" in a regex fixed Date: Fri, 22 Aug 2025 12:17:41 +0000 Message-ID: <87jz2vwnx6.fsf@oook.m.uunet.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79271-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This bug has now been fixed in the master branch. Tests have been added, including the example code from the report. I am closing the issue now. Keep the reports coming! There's still a lot of room for improvement with regard to test coverage in cperl-mode. -- Cheers, haj