X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Campbell Barton <ideasman42@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 03 Dec 2024 10:57:02 +0000 Resent-Message-ID: <handler.74666.B.173322337328550 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 74666 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.173322337328550 (code B ref -1); Tue, 03 Dec 2024 10:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Dec 2024 10:56:13 +0000 Received: from localhost ([127.0.0.1]:58411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tIQZg-0007QP-IO for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 05:56:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:33932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ideasman42@HIDDEN>) id 1tIQZd-0007QE-Kt for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 05:56:10 -0500 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 <ideasman42@HIDDEN>) id 1tIQZd-00008x-2H for bug-gnu-emacs@HIDDEN; Tue, 03 Dec 2024 05:56:09 -0500 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <ideasman42@HIDDEN>) id 1tIQZb-0004kQ-AV for bug-gnu-emacs@HIDDEN; Tue, 03 Dec 2024 05:56:08 -0500 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7fbc1ca1046so4880551a12.0 for <bug-gnu-emacs@HIDDEN>; Tue, 03 Dec 2024 02:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733223365; x=1733828165; darn=gnu.org; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=KcokF8Nal4aDfysvWVCuV4Yx7WketgdS0G8fQqm3EL8=; b=WTNlCb9S+NNKoGY0ZMbadNBRMLF6T1IHcfA7Lrid17Rj0Vav9wonbyf3AoMiN10eMb PGXP62SzgGu/PcH/NdO8jpiAJugO/gfhQPBS2icN3lCaBpdY/UEoG+SND1l0usnzcdDf gYfpuAmS/dGOLQp1BZXHQPvMR6QVArXdXds8M8Bj8a0K5psJ6MtA/noBs3Eg2lMq2gjp KTwoADQJ5Ys4v+hlggklXQ5c202lyf7PiQ1CNbQiU2krg1tUuxZ1wp5BKDanST4v2n4j 020YPpY5zW+q7jVtj51coqLhgq3AoUnBhpjLSDbV+1M8orZnZMMq1ksOXeyCNSxgtu6w DbeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733223365; x=1733828165; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KcokF8Nal4aDfysvWVCuV4Yx7WketgdS0G8fQqm3EL8=; b=MhF0M0Uk5I3n0HAAFQ3+AlJoJKODUIwyBp91UDBl/rjQYXhuK/BNDPJ7DY5+EM8TgQ OYhkaLT/ZaWkjJt+6ZoegL33+tMsc7EFomvf2lvVuRt9b0Dy4LallyE+Ogmfx+fHqKKt YqoE52D+BOQyaox5ywVj60/kRgjxYeqZONClbSExXDzFzu9rCH3x6e5lKjNaLtcJdXVV /OxWp0vfR4C03iytsDdsFqE5hGxaLqnEoTpA4F1XfI+Zn02MBj1mSso6MJCfifK9w+uY 0ZNmPwD0fGFyXDjRGuvoqwSqMuj+j6ccl/4CMpJxUtCpcsBQHB8UHuG9dTgg7xjghvRm yXRg== X-Gm-Message-State: AOJu0Yx3sdV5rqToFpLFfYEaj6IwiLMn3PGbdl38cxzSlwBksnsVbVbp vtIvq7DqgLivRoRwXjU0s0G+5IYpLdsqtpK7/qC9epvxi1d5he3w9Z9fCA== X-Gm-Gg: ASbGncsMrnkx/M5GX1mENQCP16WjJSxTu+gm4zi2lWIaucR20uPlTaXZ4HRsqoWs/hS hMly9eZNMRLFKVanC9E2OtyJicQbKNN6xmaYtYcxMl3X168HWe8hb0FpwVkBV/mj+1yiBNnwgId ysPkJDNGVmpBjzVCgQKAntlypghbI0Hk4fOMQ1FONeFF1Yme4cseeyUaTndbRa33M8+VKnsV1N9 uR3NSr335f3/BBQ6c7SwUbV6+fsIs7uSoqzgDCP5s6Kl2T5Ufx0nrtL X-Google-Smtp-Source: AGHT+IH+PMZKqz8QKp+DPbrTu63vuOQ+ZY+dZJ0l4v8WRmjHIvcbTxJhP8Yn4UfEwKIFlHH4YvB2Hg== X-Received: by 2002:a17:90b:2f08:b0:2ee:aef4:2c5d with SMTP id 98e67ed59e1d1-2ef01259f1cmr2476579a91.26.1733223365060; Tue, 03 Dec 2024 02:56:05 -0800 (PST) Received: from ?IPV6:2402:b801:2c65:4b00::1? ([2402:b801:2c65:4b00::1]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ee61638836sm7523528a91.48.2024.12.03.02.56.03 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2024 02:56:04 -0800 (PST) Message-ID: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> Date: Tue, 3 Dec 2024 21:56:02 +1100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Campbell Barton <ideasman42@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=ideasman42@HIDDEN; helo=mail-pg1-x52e.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, 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.1 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.1 (--) Run the following file as an executable script: emacs -Q --batch -l ./emacs-test.el ;; BEGIN SCRIPT: #!/usr/bin/env -S emacs --batch -l ;;; emacs-git-log --- Batch check emacs-lisp. -*- lexical-binding: t -*- (defun printf (&rest args) (princ (apply #'format args) #'external-debugging-output)) (defun test-me (is-forward) (let ((result "")) (with-temp-buffer (insert "__B_\n") (save-match-data (set-match-data (list 2 4 2 2 2 4)) (cond (is-forward (replace-match "HELLO" t t nil 1) (replace-match "WORLD" t t nil 2)) (t (replace-match "WORLD" t t nil 2) (replace-match "HELLO" t t nil 1)))) (setq result (buffer-substring-no-properties (point-min) (point-max)))) result)) (printf "A: %s" (test-me t)) (printf "B: %s" (test-me nil)) ;; END SCRIPT: In emacs 29.4 this prints: A: _HELLOWORLD_ B: _HELLOWORLD_ In emacs 31.0.50 this prints: A: _WORLD_ B: _HELLOWORLD_ This is a regression in 47b497b4dac91e5ea56102018223bdeb5e21a93b. In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) of 2024-12-03 built on campbell-trx40aorusmaster Repository revision: 04d035acd72823e82dd61c4894f9c09113e65dd6 Repository branch: master System Description: Arch Linux Configured using: 'configure --prefix=/opt/emacs --with-sound=no --disable-acl --with-file-notification=no --with-xpm --with-native-compilation --with-jpeg --with-tiff --with-gif --with-png --without-compress-install --without-rsvg --without-lcms2 --without-libsystemd --without-gsettings --without-harfbuzz --without-m17n-flt --without-libotf --without-gpm --without-dbus --without-gsettings --without-gconf --without-selinux --without-gnutls --without-makeinfo --without-libgmp --with-zlib --with-threads --with-x-toolkit=gtk3 --with-xft --with-pgtk --with-tree-sitter --with-modules 'CFLAGS=-O3 -mtune=native -march=native -pipe -fomit-frame-pointer'' Configured features: CAIRO FREETYPE GIF GLIB JPEG LIBXML2 MODULES NATIVE_COMP PDUMPER PGTK PNG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB Important settings: value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t 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: None found. 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 text-property-search time-date subr-x 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 rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win touch-screen pgtk-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 dynamic-setting font-render-setting cairo gtk pgtk multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 53518 10389) (symbols 48 5294 0) (strings 32 18752 1367) (string-bytes 1 607905) (vectors 16 9151) (vector-slots 8 128466 8940) (floats 8 22 2) (intervals 56 268 3) (buffers 992 10))
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Campbell Barton <ideasman42@HIDDEN> Subject: bug#74666: Acknowledgement (31.0.50; Regression in replace-match with empty-adjacent groups) Message-ID: <handler.74666.B.173322337328550.ack <at> debbugs.gnu.org> References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> X-Gnu-PR-Message: ack 74666 X-Gnu-PR-Package: emacs Reply-To: 74666 <at> debbugs.gnu.org Date: Tue, 03 Dec 2024 10:57:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 74666 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 74666: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74666 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 03 Dec 2024 14:06:01 +0000 Resent-Message-ID: <handler.74666.B74666.173323475531893 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Campbell Barton <ideasman42@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 74666 <at> debbugs.gnu.org Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173323475531893 (code B ref 74666); Tue, 03 Dec 2024 14:06:01 +0000 Received: (at 74666) by debbugs.gnu.org; 3 Dec 2024 14:05:55 +0000 Received: from localhost ([127.0.0.1]:58773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tITXG-0008IL-OA for submit <at> debbugs.gnu.org; Tue, 03 Dec 2024 09:05:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tITXF-0008I4-EA for 74666 <at> debbugs.gnu.org; Tue, 03 Dec 2024 09:05:54 -0500 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 <eliz@HIDDEN>) id 1tITX8-0004i4-Ns; Tue, 03 Dec 2024 09:05:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vcWNyl9nGvYdzzsAdgu1Hj7d/JIMdTNulX7ifS0lkzE=; b=LcT0SYgukWVf NFOH14XGSrevq+RC+hdVUInso6rKYVGoYha7UP1XyOAGjmXR7Zv/nV/OEKbrEs/sILCQ0m0sUPT+F FvHJ1495TwrF1+pKR4w84dT9S4haHJoEvFXOn6RAUARvidA+J+CfRFd7xz9v59RtdyjatjaeiMoPx 0qqdluCXDdiOalIlklmS6EAZjFBFPhZNGWSvQFsxcBGdHokvJ6/aYRs/SeDDnnfolRlxtnGK+hDBx Z24eOTUdPmI2yqb7JfCs0L8Bgxgo8SPYovcpcusTbDfAgkjjnPIMxmMyEH+xI4u2zZg4JLxLCmq5f SqCnIYB3VQXa2xzBTu2e6Q==; Date: Tue, 03 Dec 2024 16:05:40 +0200 Message-Id: <86y10w2763.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> (message from Campbell Barton on Tue, 3 Dec 2024 21:56:02 +1100) References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Tue, 3 Dec 2024 21:56:02 +1100 > From: Campbell Barton <ideasman42@HIDDEN> > > > Run the following file as an executable script: > > emacs -Q --batch -l ./emacs-test.el > > ;; BEGIN SCRIPT: > #!/usr/bin/env -S emacs --batch -l > ;;; emacs-git-log --- Batch check emacs-lisp. -*- lexical-binding: t -*- > > (defun printf (&rest args) > (princ (apply #'format args) #'external-debugging-output)) > > (defun test-me (is-forward) > (let ((result "")) > (with-temp-buffer > (insert "__B_\n") > (save-match-data > (set-match-data (list 2 4 2 2 2 4)) > (cond > (is-forward > (replace-match "HELLO" t t nil 1) > (replace-match "WORLD" t t nil 2)) > (t > (replace-match "WORLD" t t nil 2) > (replace-match "HELLO" t t nil 1)))) > (setq result (buffer-substring-no-properties (point-min) > (point-max)))) > result)) > > (printf "A: %s" (test-me t)) > (printf "B: %s" (test-me nil)) > ;; END SCRIPT: > > In emacs 29.4 this prints: > > A: _HELLOWORLD_ > B: _HELLOWORLD_ > > In emacs 31.0.50 this prints: > > A: _WORLD_ > B: _HELLOWORLD_ > > This is a regression in 47b497b4dac91e5ea56102018223bdeb5e21a93b. Stefan, could you please take a look?
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 14 Dec 2024 09:44:02 +0000 Resent-Message-ID: <handler.74666.B74666.173416940927027 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: monnier@HIDDEN Cc: 74666 <at> debbugs.gnu.org, ideasman42@HIDDEN Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173416940927027 (code B ref 74666); Sat, 14 Dec 2024 09:44:02 +0000 Received: (at 74666) by debbugs.gnu.org; 14 Dec 2024 09:43:29 +0000 Received: from localhost ([127.0.0.1]:45492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tMOgL-00071r-2W for submit <at> debbugs.gnu.org; Sat, 14 Dec 2024 04:43:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tMOgJ-00071b-4y for 74666 <at> debbugs.gnu.org; Sat, 14 Dec 2024 04:43:27 -0500 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 <eliz@HIDDEN>) id 1tMOgD-0002jj-Ts; Sat, 14 Dec 2024 04:43:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EkVab09aO/6wjjQTK6H6rDrIwP48XbCsVaKtib1LFM8=; b=imVVRxxE4kId ElQPZ+BEdHngMgYB3e2VbdooUA3iAtUNCil6k+x84s+cCOBrqQPMCe/8uFymMhksOQC2NnOanB8uP R2iEetuBbxLEYc2UxtPYCapMAgmuBxhs1vWUq/zKygCzObHK0FQ9c+yJt3aZ0NLZVlWK5Tm2CdX0l QuMSbVIdOwprHfBTw3PmxQ8ITHspsHf22+1AI20ObwbKKNa/3cqUoapFWIuLsEGN3pXaKScS5gp0W Rld9o7PXKiGrttjPjwzqYhGQEiUHFCSe4Bbq0WixLRrMNHSdKv8pExV9R9iNtnYjUQVU/rHBTSVZe PNJr90e9GzYkIZyjsixjfA==; Date: Sat, 14 Dec 2024 11:43:17 +0200 Message-Id: <86ttb6vbuy.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <86y10w2763.fsf@HIDDEN> (message from Eli Zaretskii on Tue, 03 Dec 2024 16:05:40 +0200) References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <86y10w2763.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ping! > Cc: 74666 <at> debbugs.gnu.org > Date: Tue, 03 Dec 2024 16:05:40 +0200 > From: Eli Zaretskii <eliz@HIDDEN> > > > Date: Tue, 3 Dec 2024 21:56:02 +1100 > > From: Campbell Barton <ideasman42@HIDDEN> > > > > > > Run the following file as an executable script: > > > > emacs -Q --batch -l ./emacs-test.el > > > > ;; BEGIN SCRIPT: > > #!/usr/bin/env -S emacs --batch -l > > ;;; emacs-git-log --- Batch check emacs-lisp. -*- lexical-binding: t -*- > > > > (defun printf (&rest args) > > (princ (apply #'format args) #'external-debugging-output)) > > > > (defun test-me (is-forward) > > (let ((result "")) > > (with-temp-buffer > > (insert "__B_\n") > > (save-match-data > > (set-match-data (list 2 4 2 2 2 4)) > > (cond > > (is-forward > > (replace-match "HELLO" t t nil 1) > > (replace-match "WORLD" t t nil 2)) > > (t > > (replace-match "WORLD" t t nil 2) > > (replace-match "HELLO" t t nil 1)))) > > (setq result (buffer-substring-no-properties (point-min) > > (point-max)))) > > result)) > > > > (printf "A: %s" (test-me t)) > > (printf "B: %s" (test-me nil)) > > ;; END SCRIPT: > > > > In emacs 29.4 this prints: > > > > A: _HELLOWORLD_ > > B: _HELLOWORLD_ > > > > In emacs 31.0.50 this prints: > > > > A: _WORLD_ > > B: _HELLOWORLD_ > > > > This is a regression in 47b497b4dac91e5ea56102018223bdeb5e21a93b. > > Stefan, could you please take a look? > > > >
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 14 Dec 2024 16:12:01 +0000 Resent-Message-ID: <handler.74666.B74666.17341927155597 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Campbell Barton <ideasman42@HIDDEN> Cc: 74666 <at> debbugs.gnu.org Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.17341927155597 (code B ref 74666); Sat, 14 Dec 2024 16:12:01 +0000 Received: (at 74666) by debbugs.gnu.org; 14 Dec 2024 16:11:55 +0000 Received: from localhost ([127.0.0.1]:48099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tMUkE-0001SD-Lj for submit <at> debbugs.gnu.org; Sat, 14 Dec 2024 11:11:54 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1tMUkB-0001Ql-0b for 74666 <at> debbugs.gnu.org; Sat, 14 Dec 2024 11:11:52 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 749378093F; Sat, 14 Dec 2024 11:11:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1734192698; bh=02hX6dqmjnsdTo5le/ohH3+dbi7vHRlj01YU+GmWstE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=H+Hp/Ix5N9ssVSMH4twHTz2QnFFA39q75XhLlueDZOgMKXE89yvvl4N2BsoyBkzvD CpYWrE2TMSYThenEPLtt0eRrmWtatERQv5Qz39idOUBzR/9kLVSUUl+X8/FCxen8I/ sV4NEpHcMBFsG3i+xI9VRwHks+WXESM5oshBYg93kxTZIEX4t8SeRhn9fQBeCBAEWh Fvr/k9JIT/8uQt9NtXnX9d47k9P/rSSz2Dh2Wi/iHCyI4NYlD/MV7DFjT1sPMlSmlQ 5UsRJzObUhl8A4ZTfKh4InHS8ZE/UrPmwsCtiSIn6iKy1y9eHw94MA2Gs256qvakUY g+VcbCaog4/eg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 67A4C801B7; Sat, 14 Dec 2024 11:11:38 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 366981204C5; Sat, 14 Dec 2024 11:11:38 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> (Campbell Barton's message of "Tue, 3 Dec 2024 21:56:02 +1100") Message-ID: <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> Date: Sat, 14 Dec 2024 11:11:36 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.042 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > (defun test-me (is-forward) > (let ((result "")) > (with-temp-buffer > (insert "__B_\n") > (save-match-data > (set-match-data (list 2 4 2 2 2 4)) > (cond > (is-forward > (replace-match "HELLO" t t nil 1) > (replace-match "WORLD" t t nil 2)) > (t > (replace-match "WORLD" t t nil 2) > (replace-match "HELLO" t t nil 1)))) > (setq result (buffer-substring-no-properties (point-min) > (point-max)))) > result)) [...] > In emacs 29.4 this prints: > > A: _HELLOWORLD_ > B: _HELLOWORLD_ > > In emacs 31.0.50 this prints: > > A: _WORLD_ > B: _HELLOWORLD_ The problem is that the `set-match-data` doesn't give us any information about the intended inclusion relationship between the subgroups. I agree that the behavior you see is not the one you want if it's the result of: (goto-char (point-min)) (looking-at "_\\(\\)\\(_B\\)") But OTOH it is the one we want if it is the result of: (goto-char (point-min)) (looking-at "_\\(?2:\\(?1:\\)_B\\)") We can try and guess the inclusion relationship based on circumstantial evidence (e.g. a "_\\(\\)\\(_B\\)" regexp is more likely than "_\\(?2:\\(?1:\\)_B\\)"), but that would make the code of `update_search_regs` tricky, with various heuristics. And we'll never handle all cases right unless we make significant changes to the match-data (and the regexp compiler) to keep track of inclusion relationships. Could you give us some information about the larger context in which you bumped into this problem? Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Campbell Barton <ideasman42@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 15 Dec 2024 01:12:01 +0000 Resent-Message-ID: <handler.74666.B74666.173422509713264 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 74666 <at> debbugs.gnu.org Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173422509713264 (code B ref 74666); Sun, 15 Dec 2024 01:12:01 +0000 Received: (at 74666) by debbugs.gnu.org; 15 Dec 2024 01:11:37 +0000 Received: from localhost ([127.0.0.1]:48944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tMdAW-0003Rs-Qh for submit <at> debbugs.gnu.org; Sat, 14 Dec 2024 20:11:37 -0500 Received: from mail-pl1-f173.google.com ([209.85.214.173]:57735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ideasman42@HIDDEN>) id 1tMdAS-0003RY-2R for 74666 <at> debbugs.gnu.org; Sat, 14 Dec 2024 20:11:36 -0500 Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-21628b3fe7dso23494755ad.3 for <74666 <at> debbugs.gnu.org>; Sat, 14 Dec 2024 17:11:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734225031; x=1734829831; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CP194S5EoRlDJTZFSc6OcII2qhHR23Uiq0c72CMIoo0=; b=egmVce5A2r91RywgbbnWhXUl93z+MkRb5EvLPs0KGjBvXOAod02B3X+kArJEoMPIlK OIaotDJmhYYiJXKepS8TVO0zvKOJlmNV3Zit/hmfgsVhPSVLRa9M64rxP6IPPo1POldY SWLy2Xz2HOBgaDuv1M6QROv+8Heqt38fYME7jqAxV+MqWKyo4Su4VqsrZWEihaH3qJYp i1QgNLJFsS3bn4+49z2ap14LQjLxmD/494JFYe4XM2plRQSpe5839A+JA8sjPZzikY79 zayk3jItUDSi+U7pZCEfMd06kO/xxJ3lGD1CwNh3Cj2DcXbI8odBAn6ROJvGL48XBI37 35GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734225031; x=1734829831; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CP194S5EoRlDJTZFSc6OcII2qhHR23Uiq0c72CMIoo0=; b=bYXJPfOntk7sECZSLjFr00LWgkVHUCR+HT/tlLLAD4sjpi973jREcmxhkg1VgTl9oI f7UcarNH1QLrKRAIF5z643Gjp/p3KQgxkeSnQBxlktYFrThawBXg05kt1GjvdfvHqFZ2 TUctpeLBNTT4ga4rC9tf5RQfIN6SqMIiETujJATGjlDFRSdJxoeSnco1MvQK0BZI+blG HEI7/Hd+URc2Sxnsi0X78Y9kpJCvIXSAOMXstqW1UXBDsE24EPInUjzlTeo9Z1Y0SoO1 S2/rdOO1CXFhvq6MDIc7G0o+n2drj9woCZ9CEgV4hEjuH8L4Kxf/mKeByvmLgacgPuMm O+pw== X-Gm-Message-State: AOJu0Yxs9x/quLqLLNIhrGf5l53PRKTu/PQx6PfZDHIZJuBeQFiXM0// C06VEHtKqViVNi/Pl1Sl6/2ZLjgHalty1xFq0w+7rHdPhK38bqsEzxn8Zg== X-Gm-Gg: ASbGncvpOeX6OMa10aopvqAYN3BIs+I3QIs8yCYlHfaKpbIpoXdAPx8ezeoK7s0/aaK jLQaaUIY9briI0GAqryYV5L2tgtzsQe8pHxEwwt00zWJ5k7UBSjPoM6W51nnuFB0PuNDGcWbwBE PC6vjCA4aqHt3r9KoiEfdCCN4GzVEm8Jl2jyzpuBPDrkLmwYq3edzp2YwajExC30uBwco7gt5Dd XRk5QXnO14GNOtbSOIlN9P8X6TYGfF00V64MtphkyshuFH9KzEuPQsosJmoyIM= X-Google-Smtp-Source: AGHT+IEruzi3YmPJdNoMaw0K4gzLsN8DqlvqHvg0H13k7bBONTx1UUxiUO3aF8j/ET3NT/KOEi741A== X-Received: by 2002:a17:902:f64c:b0:216:2804:a241 with SMTP id d9443c01a7336-21892a546e5mr127022045ad.37.1734225031187; Sat, 14 Dec 2024 17:10:31 -0800 (PST) Received: from ?IPV6:2402:b801:2c65:4b00::1? ([2402:b801:2c65:4b00::1]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142f9e193sm5426647a91.32.2024.12.14.17.10.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Dec 2024 17:10:30 -0800 (PST) Message-ID: <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> Date: Sun, 15 Dec 2024 12:10:26 +1100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> Content-Language: en-US From: Campbell Barton <ideasman42@HIDDEN> In-Reply-To: <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) On 24-12-15 3:11 AM, Stefan Monnier wrote: >> (defun test-me (is-forward) >> (let ((result "")) >> (with-temp-buffer >> (insert "__B_\n") >> (save-match-data >> (set-match-data (list 2 4 2 2 2 4)) >> (cond >> (is-forward >> (replace-match "HELLO" t t nil 1) >> (replace-match "WORLD" t t nil 2)) >> (t >> (replace-match "WORLD" t t nil 2) >> (replace-match "HELLO" t t nil 1)))) >> (setq result (buffer-substring-no-properties (point-min) >> (point-max)))) >> result)) > [...] >> In emacs 29.4 this prints: >> >> A: _HELLOWORLD_ >> B: _HELLOWORLD_ >> >> In emacs 31.0.50 this prints: >> >> A: _WORLD_ >> B: _HELLOWORLD_ > > The problem is that the `set-match-data` doesn't give us any information > about the intended inclusion relationship between the subgroups. > > I agree that the behavior you see is not the one you want if it's the > result of: > > (goto-char (point-min)) > (looking-at "_\\(\\)\\(_B\\)") > > But OTOH it is the one we want if it is the result of: > > (goto-char (point-min)) > (looking-at "_\\(?2:\\(?1:\\)_B\\)") > > We can try and guess the inclusion relationship based on circumstantial > evidence (e.g. a "_\\(\\)\\(_B\\)" regexp is more likely than > "_\\(?2:\\(?1:\\)_B\\)"), but that would make the code of > `update_search_regs` tricky, with various heuristics. > And we'll never handle all cases right unless we make significant > changes to the match-data (and the regexp compiler) to keep track of > inclusion relationships. > > Could you give us some information about the larger context in which you > bumped into this problem? On the user side - I ran into this bug when decrementing numbers broke for me in the evil-numbers package [0]. Numbers would fail to become negative. Decrementing 0 would become 1. In this case, the match data is set with `set-match-data' using calculated ranges. Since this used to work I think it's reasonable to consider it a regression. I've since committed a workaround to evil-numbers [1], although I'd suspect this would impact others. [0]: https://melpa.org/#/evil-numbers [1]: https://github.com/juliapath/evil-numbers/commit/f93258b706fa5cf9259e815c2d8258fcc6262804
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 17 Dec 2024 03:20:02 +0000 Resent-Message-ID: <handler.74666.B74666.173440555014679 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Campbell Barton <ideasman42@HIDDEN> Cc: 74666 <at> debbugs.gnu.org Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173440555014679 (code B ref 74666); Tue, 17 Dec 2024 03:20:02 +0000 Received: (at 74666) by debbugs.gnu.org; 17 Dec 2024 03:19:10 +0000 Received: from localhost ([127.0.0.1]:57017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tNO73-0003of-Tw for submit <at> debbugs.gnu.org; Mon, 16 Dec 2024 22:19:10 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1tNO71-0003o4-LR for 74666 <at> debbugs.gnu.org; Mon, 16 Dec 2024 22:19:08 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 802E480848; Mon, 16 Dec 2024 22:18:59 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1734405538; bh=pcFscS0zDC6SFoHFFQ4U6Pm0Sjf5nAU566RZSYay+P0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KW8aRtbh+WFHbRpJBTGCXAdwghGpHPlYAueFOMMaPBvfKaicdvU/qx5NAA53EaYr0 6Y9pH+xhVEC+fUEcBfQI4wgaoCZBgdwu1cUdPQDNMrFwKmIyyg3QdT2sROF/Vrlx5O rs2+CfQ009MZYeeE7wFQWLY8LpL4Rw5JAo1O3fBeeuAMy5Z030tyHWjObQ0HttD8jZ BrPOSETrpWXKXmYPDvC37Pe4zaF1NVTeDUq4mmn4AlxmCMZsSS8AbUIzOKh7Rs2KFK 2V5wZ0a6ZFPxLlKhvpAoopSsb4Gko9mNDsprQhiJG6u8Mh9ZigepI3qAtyqgzNwqES x8bwaCbXQSReg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8CFB080372; Mon, 16 Dec 2024 22:18:58 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 649791204C5; Mon, 16 Dec 2024 22:18:58 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> (Campbell Barton's message of "Sun, 15 Dec 2024 12:10:26 +1100") Message-ID: <jwvzfkvknwt.fsf-monnier+emacs@HIDDEN> References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> Date: Mon, 16 Dec 2024 22:18:57 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > In this case, the match data is set with `set-match-data' using > calculated ranges. I guess we can take this as good thing: it means complexifying the regexp code would be wasted. =F0=9F=99=82 > Since this used to work I think it's reasonable to consider it a regressi= on. I was not trying to say it's not a regression. Just pouting because the old behavior was just a lucky accident and recovering it without losing the other improvement isn't completely straightforward. > I've since committed a workaround to evil-numbers [1], although I'd suspe= ct > this would impact others. [ And the workaround relies on another lucky accident: the "easiest" fix for the problem would break your workaround. =F0=9F=99=81 ] Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 28 Dec 2024 11:39:01 +0000 Resent-Message-ID: <handler.74666.B74666.173538590632356 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 74666 <at> debbugs.gnu.org, ideasman42@HIDDEN Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173538590632356 (code B ref 74666); Sat, 28 Dec 2024 11:39:01 +0000 Received: (at 74666) by debbugs.gnu.org; 28 Dec 2024 11:38:26 +0000 Received: from localhost ([127.0.0.1]:49506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tRV9F-0008Pn-Sm for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 06:38:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tRV9D-0008Pa-WA for 74666 <at> debbugs.gnu.org; Sat, 28 Dec 2024 06:38:24 -0500 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 <eliz@HIDDEN>) id 1tRV97-0000Bb-UM; Sat, 28 Dec 2024 06:38:17 -0500 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=g+yp6k2Ct2U2/ozN0KAWDRvOEgj76z5omxO8QzIL4jg=; b=XWzNSzXmvE7q/NJ8DwcM PmNuo4swvTptSA3PXljIydnV80cKUk6RS91ZDNxjExd4qhyrV5/g5xmMdHqSr14P4W6lktG6mbuti EWEDlseFBDXfV2H3Zq4kXU/OVu5YxJuVs9ZOQcVw/5NZgDpb9YAh6PltulT1xlQ6jtQn+g/6zEElM zSV3ujfoRc/Fzbz36Zi1phcrTdrFlWL3yYd3eGgFHP3rARaQZSCZuE2dQEZz9HmWYyeAG5dPJd7HY B7CEeMZWkdJjukzVU2do8zdteBYW8DppQ2jyLLku5+N5JEUIUJc3UJc2uTi/snFWfLGPpOY/RVqRi 5eHvI/jf9t0Zxg==; Date: Sat, 28 Dec 2024 13:38:14 +0200 Message-Id: <8634i8t4ux.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <jwvzfkvknwt.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN) References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> <jwvzfkvknwt.fsf-monnier+emacs@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 74666 <at> debbugs.gnu.org > Date: Mon, 16 Dec 2024 22:18:57 -0500 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > > In this case, the match data is set with `set-match-data' using > > calculated ranges. > > I guess we can take this as good thing: it means complexifying the > regexp code would be wasted. 🙂 > > > Since this used to work I think it's reasonable to consider it a regression. > > I was not trying to say it's not a regression. Just pouting because the > old behavior was just a lucky accident and recovering it without losing > the other improvement isn't completely straightforward. > > > I've since committed a workaround to evil-numbers [1], although I'd suspect > > this would impact others. > > [ And the workaround relies on another lucky accident: the "easiest" > fix for the problem would break your workaround. 🙁 ] What should we do with this bug report?
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 28 Dec 2024 15:01:01 +0000 Resent-Message-ID: <handler.74666.B74666.17353980495836 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: 74666 <at> debbugs.gnu.org, ideasman42@HIDDEN Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.17353980495836 (code B ref 74666); Sat, 28 Dec 2024 15:01:01 +0000 Received: (at 74666) by debbugs.gnu.org; 28 Dec 2024 15:00:49 +0000 Received: from localhost ([127.0.0.1]:52274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tRYJ6-0001W1-IV for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 10:00:49 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1tRYJ4-0001Vm-2T for 74666 <at> debbugs.gnu.org; Sat, 28 Dec 2024 10:00:46 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B490C100035; Sat, 28 Dec 2024 10:00:40 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735398039; bh=wy8z0twHqJmQ8LP2Iz7ChKu8Sc/gxFCPlIwPkwA+XnI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AwkVu7yaKEpEQusqf814qbFqMRp8Mx1pV7BAQ3D/tkNMJta5Ifltf4ZZOmNL+KU1S 1uh5T3H7t4TpEUQ2pE9GBoK5Zojl1OeMN8GMixr+cK8SQ0/Hi+dQcEDPtTjbdeotGc uGy1h1ZdvGG7SYbyLgE0wcsFzXbNez56IoeNNxUFegx2PYx4bLBIOUJdLFltEPmxt3 FVfB/8TEBgMoezHBbBfF4cbreXALhuCtIoGMeOn9qL0mImgmUTTBAo8kW1LfZX2uNj boLLMiWtpap5HrfmqN8l888S1wevm+B9P1CmA5iqAfUN+4Hav2hwBeLCDStV249x1I N0wDzSrg3vjLA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D5EE810004C; Sat, 28 Dec 2024 10:00:39 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A81491206A7; Sat, 28 Dec 2024 10:00:39 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <8634i8t4ux.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 28 Dec 2024 13:38:14 +0200") Message-ID: <jwvo70vam8d.fsf-monnier+emacs@HIDDEN> References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> <jwvzfkvknwt.fsf-monnier+emacs@HIDDEN> <8634i8t4ux.fsf@HIDDEN> Date: Sat, 28 Dec 2024 10:00:33 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.603 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > What should we do with this bug report? I'd leave it open for now. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#74666: 31.0.50; Regression in replace-match with empty-adjacent groups Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 28 Dec 2024 16:36:01 +0000 Resent-Message-ID: <handler.74666.B74666.173540372322549 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: 74666 <at> debbugs.gnu.org, ideasman42@HIDDEN Received: via spool by 74666-submit <at> debbugs.gnu.org id=B74666.173540372322549 (code B ref 74666); Sat, 28 Dec 2024 16:36:01 +0000 Received: (at 74666) by debbugs.gnu.org; 28 Dec 2024 16:35:23 +0000 Received: from localhost ([127.0.0.1]:52434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tRZmc-0005rc-Qk for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 11:35:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tRZmb-0005rM-4f for 74666 <at> debbugs.gnu.org; Sat, 28 Dec 2024 11:35:21 -0500 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 <eliz@HIDDEN>) id 1tRZkO-0000xH-Ie; Sat, 28 Dec 2024 11:33:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=eE357RDVzA31Vk7cW/K0zlceZ6vWooIf6SureNgzi60=; b=N/Tz/jOQtcde SWyOPLgclDVA1bkH/COAob1Zvuc4rxCiOKhoqLoow3A2K5szI2wElBsiKndwMoNAxxsWFJkMhD8Dp PUIrKxrffpR6a9VLLjqQKJx5b/2sODRb0naWelmZAZ7MC32PUQm2MdCNh3VZB7a1w9W/RyjqZL6I+ AwKtOExI8+FqMWLvXxAaQk+GyrShv9qKJ9C3FfbVrzSEq8tHu2wbVQcvP48Xl/1BaAoAQ4OoHcY6n CdhMs/lhOAPRWG4syrU4hMuYoAVwF0XkjiCNC3sz49bUpwgkys4FUt646MtBAXf//pzH95KpF1fYa wf7atNPB3aTzT1k617F2iw==; Date: Sat, 28 Dec 2024 18:33:00 +0200 Message-Id: <86bjwvsr7n.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <jwvo70vam8d.fsf-monnier+emacs@HIDDEN> (message from Stefan Monnier on Sat, 28 Dec 2024 10:00:33 -0500) References: <5aad7547-5fd7-4eba-a6eb-38b1b4753dd8@HIDDEN> <jwvseqqwbc6.fsf-monnier+emacs@HIDDEN> <8340bf95-c716-4ebe-994e-07554b6e2165@HIDDEN> <jwvzfkvknwt.fsf-monnier+emacs@HIDDEN> <8634i8t4ux.fsf@HIDDEN> <jwvo70vam8d.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stefan Monnier <monnier@HIDDEN> > Cc: ideasman42@HIDDEN, 74666 <at> debbugs.gnu.org > Date: Sat, 28 Dec 2024 10:00:33 -0500 > > > What should we do with this bug report? > > I'd leave it open for now. OK, but when should I ask again?
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.