From unknown Fri Jun 20 07:16:50 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#31586 <31586@debbugs.gnu.org> To: bug#31586 <31586@debbugs.gnu.org> Subject: Status: 27.0.50; `frame-title-format' doesn't save match data Reply-To: bug#31586 <31586@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:16:50 +0000 retitle 31586 27.0.50; `frame-title-format' doesn't save match data reassign 31586 emacs submitter 31586 Philipp severity 31586 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 24 17:56:16 2018 Received: (at submit) by debbugs.gnu.org; 24 May 2018 21:56:16 +0000 Received: from localhost ([127.0.0.1]:46986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLyDY-0004sS-D7 for submit@debbugs.gnu.org; Thu, 24 May 2018 17:56:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLyDT-0004sC-Ct for submit@debbugs.gnu.org; Thu, 24 May 2018 17:56:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLyDN-0003ma-4e for submit@debbugs.gnu.org; Thu, 24 May 2018 17:56:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fLyDN-0003mU-1g for submit@debbugs.gnu.org; Thu, 24 May 2018 17:56:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLyDL-0004TP-KS for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLyDK-0003le-OQ for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:56:03 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:54293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLyDK-0003l7-Hh for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:56:02 -0400 Received: by mail-wm0-x22a.google.com with SMTP id f6-v6so9104391wmc.4 for ; Thu, 24 May 2018 14:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=vy5XSEIocE5EaoaE8kDtx/gGf/x9iXR32SZ0gI89oXM=; b=r1+QvPrXH1tT3mDhZuC56R/ZZyh6a333C/v4ZlmfTIxUFaIke1PxFTPT5/jljK2rGU faUflHxyTRWOPVKQm6jxvp3QIdfK8H2LTFXDJXidhhIXu7eJE4ZpwolsrpKNagg1AjYO K+bnE/GssWvnjpebsfLX7UXu14Zv7BqCcVP1wkmCHZvEkUO7VDBBOeYYEIaNEQdis55W 7SiiK4kC1R4/UwtPFlSahWs6PA7+63LzCVam3K51OmC9flK2wDjjJTNgG3IBY8lLAha/ i4GttLUn8bsngrywcrEWocSvk1g/yfB4s8eYjnOLRzuPvAwihmPwQjkM04w2VW1jGQgT Gp2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=vy5XSEIocE5EaoaE8kDtx/gGf/x9iXR32SZ0gI89oXM=; b=uGRUtJHIOmFN4wmEbMWl2EyG0dRCn+UDtD+3wAjPpr5jlVYcqbqTzmDEEkXlJUoqL9 AHqoHGaQeOVZQSq2ny9+TL/3Q3nge6xlQ9/MnindP6lFMFnmFJyhrTEoQn0ph/opFMHu 8OPdByZewhqeFVymLbxDsMTMdHRTf27rYY/XKvG+sGx4kFk1RfMnyHNBtXlYjBr88h3n I5iM3v/6UOIxGg0jr/YyiQrfwMuqQjdjmk5WhqZhVb1eIik5FPLG9mjDNzpzIR5FEvZe GrWiOc4HSP+YI4K/616ak3g8QqSf9GzZJBNOmRmrAULdTqYqb0tejB6cg/5Vl206H1rG rxGw== X-Gm-Message-State: ALKqPwfi7Xd8HMCjC5fGxMEYUx1bXWTvm14mRECZETuXXmyF/VK8v/Oh up3NpIri2WrdSu8ubiRnn1WTW6uo X-Google-Smtp-Source: ADUXVKKVX+4Q7Y+llntTXUUEi9XohsSgE+5LTHb46NOsOmR1TcLBkEhdFzeDfZw9FBT/73gI0bCGhA== X-Received: by 2002:a1c:f114:: with SMTP id p20-v6mr353596wmh.84.1527198960898; Thu, 24 May 2018 14:56:00 -0700 (PDT) Received: from p ([2001:4c50:25f:f600:f56f:1b2:dbd8:8309]) by smtp.gmail.com with ESMTPSA id 12-v6sm7679251wmn.27.2018.05.24.14.55.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 14:56:00 -0700 (PDT) From: Philipp To: bug-gnu-emacs@gnu.org Subject: 27.0.50; `frame-title-format' doesn't save match data Date: Thu, 24 May 2018 23:55:57 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) 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: -4.8 (----) emacs -Q -eval "(setq frame-title-format '(\"\" (:eval (string-match \".\" \"a\"))))" Then go to the first character in the scratch buffer (M-<), and run M-% a RET b RET The first time you attempt to replace something, Emacs will signal an error: perform-replace: Args out of range: #, 0, 1 Backtrace: Debugger entered--Lisp error: (args-out-of-range # 0 1) buffer-substring-no-properties(0 1) perform-replace("a" "b" t nil nil nil nil nil nil nil nil) query-replace("a" "b" nil nil nil nil nil) funcall-interactively(query-replace "a" "b" nil nil nil nil nil) call-interactively(query-replace nil nil) command-execute(query-replace) Apparently the `string-match' in `frame-title-format' has overwritten the match data. This worked in Emacs 24.5. It breaks the informal contract for the match data, namely that any code is free to change it, and code that relies on the match data staying intact needs to protect it. In GNU Emacs 27.0.50 (build 69, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102)) of 2018-05-22 built on p Repository revision: 02f303d75f876517b7802f787413cbb418203315 Windowing system distributor 'Apple', version 10.3.1561 System Description: Mac OS X 10.13.3 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --with-modules --without-pop --with-mailutils --enable-gcc-warnings=yes --enable-checking --enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0'' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs 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 time-date elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 204577 6502) (symbols 48 20009 1) (miscs 40 56 152) (strings 32 28860 1923) (string-bytes 1 773241) (vectors 16 35283) (vector-slots 8 721708 13474) (floats 8 51 65) (intervals 56 210 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Fri May 25 02:31:00 2018 Received: (at 31586) by debbugs.gnu.org; 25 May 2018 06:31:00 +0000 Received: from localhost ([127.0.0.1]:47292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM6Ff-0005ih-Qx for submit@debbugs.gnu.org; Fri, 25 May 2018 02:30:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM6Fe-0005iU-1l for 31586@debbugs.gnu.org; Fri, 25 May 2018 02:30:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM6FV-0000p9-Sm for 31586@debbugs.gnu.org; Fri, 25 May 2018 02:30:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM6FV-0000p5-QP; Fri, 25 May 2018 02:30:49 -0400 Received: from [176.228.60.248] (port=1305 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fM6FV-000133-7B; Fri, 25 May 2018 02:30:49 -0400 Date: Fri, 25 May 2018 09:31:02 +0300 Message-Id: <83muwo9rh5.fsf@gnu.org> From: Eli Zaretskii To: Philipp In-reply-to: (message from Philipp on Thu, 24 May 2018 23:55:57 +0200) Subject: Re: bug#31586: 27.0.50; `frame-title-format' doesn't save match data References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31586 Cc: 31586@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Philipp > Date: Thu, 24 May 2018 23:55:57 +0200 > > emacs -Q -eval "(setq frame-title-format '(\"\" (:eval (string-match \".\" \"a\"))))" > > Then go to the first character in the scratch buffer (M-<), and run > > M-% a RET b RET > > The first time you attempt to replace something, Emacs will signal an > error: > > perform-replace: Args out of range: #, 0, 1 And this is an Emacs bug because...? The :eval expression is yours, so it's IMO your responsibility to protect it as needed. From debbugs-submit-bounces@debbugs.gnu.org Sat May 26 16:59:00 2018 Received: (at 31586) by debbugs.gnu.org; 26 May 2018 20:59:00 +0000 Received: from localhost ([127.0.0.1]:49960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMgHE-0004Xl-8j for submit@debbugs.gnu.org; Sat, 26 May 2018 16:59:00 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:39157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMgHC-0004XX-Eu for 31586@debbugs.gnu.org; Sat, 26 May 2018 16:58:59 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4QKxHfR028803; Sat, 26 May 2018 16:59:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 7D5806A368; Sat, 26 May 2018 16:58:56 -0400 (EDT) From: Stefan Monnier To: Philipp Subject: Re: bug#31586: 27.0.50; `frame-title-format' doesn't save match data Message-ID: References: Date: Sat, 26 May 2018 16:58:56 -0400 In-Reply-To: (Philipp's message of "Thu, 24 May 2018 23:55:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6294=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6294> : inlines <6661> : streams <1787886> : uri <2647710> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31586 Cc: 31586@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 (---) > perform-replace: Args out of range: #, 0, 1 > > Backtrace: > > Debugger entered--Lisp error: (args-out-of-range # 0 1) > buffer-substring-no-properties(0 1) > perform-replace("a" "b" t nil nil nil nil nil nil nil nil) > query-replace("a" "b" nil nil nil nil nil) > funcall-interactively(query-replace "a" "b" nil nil nil nil nil) > call-interactively(query-replace nil nil) > command-execute(query-replace) FWIW, I think this qualifies as a bug in query-replace: Elisp code should never presume that the match-data is preserved across something like sit-for, read-char, or any other function which can run process filters, redisplay, timers, or contains a yield-point. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 27 12:21:15 2018 Received: (at 31586) by debbugs.gnu.org; 27 May 2018 16:21:15 +0000 Received: from localhost ([127.0.0.1]:51113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMyPz-0003Wr-6H for submit@debbugs.gnu.org; Sun, 27 May 2018 12:21:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fMyPw-0003Wb-LU for 31586@debbugs.gnu.org; Sun, 27 May 2018 12:21:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMyPm-0006WC-Ry for 31586@debbugs.gnu.org; Sun, 27 May 2018 12:21:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMyPm-0006W1-OF; Sun, 27 May 2018 12:21:02 -0400 Received: from [176.228.60.248] (port=2448 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fMyPl-0004cd-SF; Sun, 27 May 2018 12:21:02 -0400 Date: Sun, 27 May 2018 19:20:52 +0300 Message-Id: <838t8583yz.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Sat, 26 May 2018 16:58:56 -0400) Subject: Re: bug#31586: 27.0.50; `frame-title-format' doesn't save match data References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31586 Cc: p.stephani2@gmail.com, 31586@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Stefan Monnier > Date: Sat, 26 May 2018 16:58:56 -0400 > Cc: 31586@debbugs.gnu.org > > > perform-replace: Args out of range: #, 0, 1 > > > > Backtrace: > > > > Debugger entered--Lisp error: (args-out-of-range # 0 1) > > buffer-substring-no-properties(0 1) > > perform-replace("a" "b" t nil nil nil nil nil nil nil nil) > > query-replace("a" "b" nil nil nil nil nil) > > funcall-interactively(query-replace "a" "b" nil nil nil nil nil) > > call-interactively(query-replace nil nil) > > command-execute(query-replace) > > FWIW, I think this qualifies as a bug in query-replace: Elisp code > should never presume that the match-data is preserved across something > like sit-for, read-char, or any other function which can run process > filters, redisplay, timers, or contains a yield-point. Is this practical? We have any number of hooks, advices, and other means to make arbitrary Lisp run almost off any function call. Given that redisplay can be entered by such Lisp by calling 'redisplay' or 'message' or one of the other functions you mentioned, your suggestion would mean we need to save-match-data around any call to any function. That would make our code very cluttered, indeed. My POV is that using :eval is intrinsically tricky, and whoever does that should take the necessary precautions. From debbugs-submit-bounces@debbugs.gnu.org Sun May 27 15:32:49 2018 Received: (at 31586) by debbugs.gnu.org; 27 May 2018 19:32:49 +0000 Received: from localhost ([127.0.0.1]:51271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN1PM-0003VB-QD for submit@debbugs.gnu.org; Sun, 27 May 2018 15:32:49 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:38151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN1PK-0003V3-Uf for 31586@debbugs.gnu.org; Sun, 27 May 2018 15:32:47 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4RJX66w019816; Sun, 27 May 2018 15:33:07 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 0840A6612B; Sun, 27 May 2018 15:32:45 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#31586: 27.0.50; `frame-title-format' doesn't save match data Message-ID: References: <838t8583yz.fsf@gnu.org> Date: Sun, 27 May 2018 15:32:44 -0400 In-Reply-To: <838t8583yz.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 27 May 2018 19:20:52 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6294=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6294> : inlines <6661> : streams <1787976> : uri <2648210> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31586 Cc: p.stephani2@gmail.com, 31586@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 (---) >> FWIW, I think this qualifies as a bug in query-replace: Elisp code >> should never presume that the match-data is preserved across something >> like sit-for, read-char, or any other function which can run process >> filters, redisplay, timers, or contains a yield-point. > Is this practical? We have any number of hooks, advices, and other > means to make arbitrary Lisp run almost off any function call. Given > that redisplay can be entered by such Lisp by calling 'redisplay' or > 'message' or one of the other functions you mentioned, your suggestion > would mean we need to save-match-data around any call to any > function. That would make our code very cluttered, indeed. That's how we've lived so far, except that the need for save-match-data is not around "any" call, but only around "any call except for <...>" where <...> is the set of "primitive enough" functions. The main problem so far is that this set is not formally defined (and also that the byte-compiler doesn't warn you if you use a function outside of this set without wrapping with save-match-data), but other than that it works well in practice, because in 99% there is *very* little code executed between a regexp match and the use of the match-data. [ Side question: while `message` does cause a form of redisplay, IIUC it doesn't cause a *real* redisplay in the sense that it won't recompute mode-lines, frame-titles, nor will it run jit-lock, IOW it won't run elisp code. ] > My POV is that using :eval is intrinsically tricky, and whoever does > that should take the necessary precautions. I think it would be preferable to save the match-data around the whole redisplay than have each :eval do it. More to the point: AFAICT in the problem at hand, between the regexp-match and the call to buffer-substring-no-properties, process filters can be executed, so it's not just the match data which could be changed, but the whole buffer's contents, so save-match-data around the :eval call will just patch over one particular instance of a more general problem, I think. This said, having looked at the code this time, the bug is not quite as clear as I thought: perform-replace does already save&restore the match data, as evidenced by: (setq key (read-event)) ;; Necessary in case something happens during ;; read-event that clobbers the match data. (set-match-data real-match-data) But it does it in a fairly complex way, so the exact problem is hard to pinpoint. If someone can understand what replace-match-data really does, maybe they can figure out the origin of the problem. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 27 21:40:58 2018 Received: (at 31586) by debbugs.gnu.org; 28 May 2018 01:40:58 +0000 Received: from localhost ([127.0.0.1]:51388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN79e-0005M9-9D for submit@debbugs.gnu.org; Sun, 27 May 2018 21:40:58 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:43026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN79c-0005Lx-RK for 31586@debbugs.gnu.org; Sun, 27 May 2018 21:40:57 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4S1epYD104317; Mon, 28 May 2018 01:40:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=38keVWrRK/cXN3wVOPQzEfmWwXQ+NKNzNdKeCVH8JdE=; b=XTAGbBpzpOjU6i6aMb/20qahJMAnSjBreN/1cL5xMH/rTeqSB0/WQDtsHNT+uLdjkNy5 4UPVyde0r5X/GtOLjDhoBE4i7KR0sLb0Ig0ii/tn5QhmSpzcI9ivXH8qTnCLTWOPH7PF 5YQLpTtHKoGeOK5gyI9sqMJt2AppwInn2kosX3X3d9SiYbvPYhlC23+DVZBd4UrT3cZ4 vUSq1rrcXmB6Ox1qUgvpYfHbHxEWo7GiwR0DmshGIRUj07KDY50q8QTHE4W+Wm+r3II7 Y1/Y8f5QpDrIH5wwwhwjgtzILrP5loSZ8/IUnWsImt8UBlsm5B4fM3lAIFa9jMiQFSKu 2A== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2j7084unjk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 May 2018 01:40:50 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4S1elKD011742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 May 2018 01:40:48 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4S1ejaX003961; Mon, 28 May 2018 01:40:47 GMT MIME-Version: 1.0 Message-ID: <50fbc85d-ea7e-485d-82d3-476f63bd8a32@default> Date: Sun, 27 May 2018 18:40:43 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Eli Zaretskii Subject: RE: bug#31586: 27.0.50; `frame-title-format' doesn't save match data References: <838t8583yz.fsf@gnu.org> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8906 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805280019 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31586 Cc: p.stephani2@gmail.com, 31586@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 (---) > >> Elisp code > >> should never presume that the match-data is preserved across something > >> like sit-for, read-char, or any other function which can run process > >> filters, redisplay, timers, or contains a yield-point. > > Is this practical? We have any number of hooks, advices, and other > > means to make arbitrary Lisp run almost off any function call. Given > > that redisplay can be entered by such Lisp by calling 'redisplay' or > > 'message' or one of the other functions you mentioned, your suggestion > > would mean we need to save-match-data around any call to any > > function. That would make our code very cluttered, indeed. >=20 > That's how we've lived so far, except that the need for save-match-data > is not around "any" call, but only around "any call except for <...>" > where <...> is the set of "primitive enough" functions. The main > problem so far is that this set is not formally defined (and also that > the byte-compiler doesn't warn you if you use a function outside of this > set without wrapping with save-match-data), but other than that it works > well in practice, because in 99% there is *very* little code executed > between a regexp match and the use of the match-data. Would it make sense to "formalize" this a bit, by having an explicit such list of the functions (those "primitive enough" to never, or perhaps hardly ever, need wrapping with `s-m-d')? Even if such a list were not consulted by any code (and it could be, presumably, for some control somewhere), it might at least help developers and users by letting them know what the story is. Just a thought. From debbugs-submit-bounces@debbugs.gnu.org Sun May 27 21:46:38 2018 Received: (at 31586) by debbugs.gnu.org; 28 May 2018 01:46:38 +0000 Received: from localhost ([127.0.0.1]:51393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN7F8-0005Ug-0J for submit@debbugs.gnu.org; Sun, 27 May 2018 21:46:38 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:50622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fN7F6-0005UX-9q for 31586@debbugs.gnu.org; Sun, 27 May 2018 21:46:37 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w4S1kueT024827; Sun, 27 May 2018 21:46:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 4D0D66610C; Sun, 27 May 2018 21:46:34 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#31586: 27.0.50; `frame-title-format' doesn't save match data Message-ID: References: <838t8583yz.fsf@gnu.org> <50fbc85d-ea7e-485d-82d3-476f63bd8a32@default> Date: Sun, 27 May 2018 21:46:34 -0400 In-Reply-To: <50fbc85d-ea7e-485d-82d3-476f63bd8a32@default> (Drew Adams's message of "Sun, 27 May 2018 18:40:43 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6294=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6294> : inlines <6661> : streams <1788000> : uri <2648349> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31586 Cc: Eli Zaretskii , 31586@debbugs.gnu.org, p.stephani2@gmail.com 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 (---) > Would it make sense to "formalize" this a bit, by having an > explicit such list of the functions (those "primitive enough" > to never, or perhaps hardly ever, need wrapping with `s-m-d')? Yes! Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 30 01:46:31 2018 Received: (at 31586) by debbugs.gnu.org; 30 Jul 2018 05:46:31 +0000 Received: from localhost ([127.0.0.1]:34296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fk10o-0005G4-Ev for submit@debbugs.gnu.org; Mon, 30 Jul 2018 01:46:31 -0400 Received: from mail-yw0-f176.google.com ([209.85.161.176]:40431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjzte-0003T0-07 for 31586@debbugs.gnu.org; Mon, 30 Jul 2018 00:35:02 -0400 Received: by mail-yw0-f176.google.com with SMTP id z143-v6so3910752ywa.7 for <31586@debbugs.gnu.org>; Sun, 29 Jul 2018 21:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wsr0hlMFJSqFkxK6dwOX0dg97CxQ7vh5s2VzJj5AlDI=; b=sEDNbKJcl7r1C0JjdrlI6FMkHPHEFZYXhTdGOKTjICwDYTebMLnQhTdcrH8ciTVvOL jsi0GN054Mq1j16Z4tYDSIpv8DtIIOdpRWzYclsk5vkuTWefD8QwmM/CBuYS+9BtJuK9 aMp6P87YX5baUKSGXB7XyKuZuMqzGv4qP8ZUQtlvCplmNbmuPV/smwBRlkxdqtI5NaVN wtn+kfrGTiNpCYP4V7GcE8/t9RO0OP+HRLLl4IIb/JmgC81J7ROtnvn2xxTdjbcJ/OwP PplaXRPomktmDFrgVXxrfVIjnlL/10pFp9BctPXs7rcAPCrij5Jmx+SVHBhcCDDAnYEa pC8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wsr0hlMFJSqFkxK6dwOX0dg97CxQ7vh5s2VzJj5AlDI=; b=MHRIMrDuVZjmfd507N+CNgsZFn/ayA1rvfYbo/p1NrL1rY1zWzTo0Fdg6w4QhW0Ssk YmgIp4+Xi/IDJsi+InRvLdbHSa//UHELCqStiJDyRsGSnz/6YFYNM5BnPMgD5LUu0lzo ya7MZcar/jouru6ZQk9THmFmooyUqPWwqazZxjfpJFd59A+y7qpmo3BiBU78oA+0MAWA 9O44PPW47yNOLbZTlIOiSJ+x0r1sjFQ2vq+ICJ3i8vlEtAvdxgA6dDqr0zHPlpp+BPF4 2fazjmn9MJoL+6nk7tU3BpwgeOPypVEh4Zd4ek6FFrc73nsaT5otjyXfX59zgV1wgRyt NS0A== X-Gm-Message-State: AOUpUlHJgsIWlYPx1Eva/KqWtEEoJhaSVb+RmbymWhJ6MUEHhl3+gDre H5KvZbLTpAHWQIjp/e0bTfzOBdOvLcMmiujbscWb/4ED X-Google-Smtp-Source: AAOMgpcrm+fE0xbZVSjaNJuXJkKdvrhBvSLvlTTFLTGiVfqYanYch/VajeNi074R0M2GEBQLPeEqyrNv3MQu6MzYxB0= X-Received: by 2002:a81:5207:: with SMTP id g7-v6mr8027510ywb.71.1532925296165; Sun, 29 Jul 2018 21:34:56 -0700 (PDT) MIME-Version: 1.0 From: Binbin YE Date: Mon, 30 Jul 2018 13:34:45 +0900 Message-ID: Subject: To: 31586@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000bec93f05722ffb0e" X-Spam-Score: 2.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: Experiencing some similar issue and there is an discussion and findings on https://github.com/syl20bnr/spacemacs/issues/9700 Do you think it is a related issue? [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.161.176 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.176 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (phantom2501[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (phantom2501[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 2.0 BLANK_SUBJECT Subject is present but empty -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 31586 X-Mailman-Approved-At: Mon, 30 Jul 2018 01:46:28 -0400 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: 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: Experiencing some similar issue and there is an discussion and findings on https://github.com/syl20bnr/spacemacs/issues/9700 Do you think it is a related issue? [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.161.176 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (phantom2501[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (phantom2501[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.176 listed in wl.mailspike.net] 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 2.0 BLANK_SUBJECT Subject is present but empty -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders --000000000000bec93f05722ffb0e Content-Type: text/plain; charset="UTF-8" Experiencing some similar issue and there is an discussion and findings on https://github.com/syl20bnr/spacemacs/issues/9700 Do you think it is a related issue? Cheers --000000000000bec93f05722ffb0e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Experiencing some similar issue and there is an discussion= and findings on=C2=A0


Do you think it is a related issue?
<= div>
Cheers


--000000000000bec93f05722ffb0e-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 30 10:19:32 2018 Received: (at 31586) by debbugs.gnu.org; 30 Jul 2018 14:19:32 +0000 Received: from localhost ([127.0.0.1]:35194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fk91I-0002rW-40 for submit@debbugs.gnu.org; Mon, 30 Jul 2018 10:19:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fk91G-0002rI-CC for 31586@debbugs.gnu.org; Mon, 30 Jul 2018 10:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fk917-0003Qq-3p for 31586@debbugs.gnu.org; Mon, 30 Jul 2018 10:19:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fk916-0003Qk-Vp; Mon, 30 Jul 2018 10:19:21 -0400 Received: from [176.228.60.248] (port=1369 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fk916-0008VA-DJ; Mon, 30 Jul 2018 10:19:20 -0400 Date: Mon, 30 Jul 2018 17:19:27 +0300 Message-Id: <83zhy8q00g.fsf@gnu.org> From: Eli Zaretskii To: Binbin YE In-reply-to: (message from Binbin YE on Mon, 30 Jul 2018 13:34:45 +0900) Subject: Re: bug#31586: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31586 Cc: 31586@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: -6.0 (------) > From: Binbin YE > Date: Mon, 30 Jul 2018 13:34:45 +0900 > > Experiencing some similar issue and there is an discussion and findings on > > https://github.com/syl20bnr/spacemacs/issues/9700 > > Do you think it is a related issue? It could be, yes. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 11 01:34:32 2018 Received: (at control) by debbugs.gnu.org; 11 Dec 2018 06:34:32 +0000 Received: from localhost ([127.0.0.1]:42661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWbcl-00044R-UZ for submit@debbugs.gnu.org; Tue, 11 Dec 2018 01:34:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gWbck-000448-8H for control@debbugs.gnu.org; Tue, 11 Dec 2018 01:34:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gWbcb-0003mL-4v for control@debbugs.gnu.org; Tue, 11 Dec 2018 01:34:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gWbcb-0003mD-1b for control@debbugs.gnu.org; Tue, 11 Dec 2018 01:34:21 -0500 Received: from [176.228.60.248] (port=2561 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gWbca-0001Zi-Kk for control@debbugs.gnu.org; Tue, 11 Dec 2018 01:34:20 -0500 Date: Tue, 11 Dec 2018 08:34:11 +0200 Message-Id: <83mupc1sik.fsf@gnu.org> From: Eli Zaretskii To: control@debbugs.gnu.org (GNU bug tracker automated control server) In-reply-to: (control@debbugs.gnu.org) Subject: Re: Processed (with 1 errors): Re: bug#33697: 26.1; file-truename messes with match data References: <83va401x2y.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control 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: -6.0 (------) severity 33697 wishlist merge 33697 31586 thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 13:30:11 2022 Received: (at 31586) by debbugs.gnu.org; 6 May 2022 17:30:11 +0000 Received: from localhost ([127.0.0.1]:49693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn1mM-00064i-M7 for submit@debbugs.gnu.org; Fri, 06 May 2022 13:30:11 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn1mG-00063H-82; Fri, 06 May 2022 13:30:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=T3qVAno5Fux2aCBvtUpK+Io9EIpflUswJYTYaJov418=; b=VceLydmQPq40qdLsXK7FXzxS2+ i+HFQu73fyNdlWpnXT//mlLsOU4Tqt2OroTtkoCi17tuXt81jcwc1HYlW0ovSy20Fr7cZFOgMR1aw wvu4U8nczgYqx93N8JGY2luwc/FbJXA+TtEoMawhEYAJxGBGVDJsKF2fY/o+owK290N8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nn1m7-0000sd-HF; Fri, 06 May 2022 19:29:57 +0200 From: Lars Ingebrigtsen To: Philipp Subject: Re: bug#33697: 26.1; file-truename messes with match data References: X-Now-Playing: The Smiths's _Complete (5): The World Won't Listen_: "You Just Haven't Earned It Yet, Baby" Date: Fri, 06 May 2022 19:29:54 +0200 In-Reply-To: (Philipp's message of "Thu, 24 May 2018 23:55:57 +0200") Message-ID: <87a6buin71.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Philipp writes: > emacs -Q -eval "(setq frame-title-format '(\"\" (:eval (string-match \".\" \"a\"))))" > > Then go to the first character in the scratch buffer (M-<), and run > > M-% a RET b RET > > The first time y [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 31586 Cc: 33697@debbugs.gnu.org, 31586@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 (---) Philipp writes: > emacs -Q -eval "(setq frame-title-format '(\"\" (:eval (string-match \".\" \"a\"))))" > > Then go to the first character in the scratch buffer (M-<), and run > > M-% a RET b RET > > The first time you attempt to replace something, Emacs will signal an > error: > > perform-replace: Args out of range: #, 0, 1 > > Backtrace: > > Debugger entered--Lisp error: (args-out-of-range # 0 1) > buffer-substring-no-properties(0 1) (I'm going through old bug reports that unfortunately weren't resolved at the time.) I can reproduce this in Emacs 26.1, but not in Emacs 28.1, so I guess this has been fixed in the years since it was reported, and I'm closing this bug report. If you're still seeing the problem in recent Emacs versions, please respond to the debbugs address and we'll reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 13:30:14 2022 Received: (at control) by debbugs.gnu.org; 6 May 2022 17:30:14 +0000 Received: from localhost ([127.0.0.1]:49695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn1mQ-00064z-8q for submit@debbugs.gnu.org; Fri, 06 May 2022 13:30:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn1mL-00064F-Fb for control@debbugs.gnu.org; Fri, 06 May 2022 13:30:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1KqYzn89ze8ImavZlhI04hUwu/ygq63aP2KEfjIs0ak=; b=VHmE2U6Zg9tV5AB+wKEgiWG/MF TkkMUpqBfJu6+BgjnnN4yUGZGbubzwX+J/W3iD+dMTyfKTWqHPU/d+InuFKhkzlpc1RfXKqZ0AApu vOf19yFe2CBuuF4pRzkOtvMMGSbV9Yj7cGByt/aLQg9yzGC5lkVZuPOReGEHDOApl8XI=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nn1mD-0000sn-Ni for control@debbugs.gnu.org; Fri, 06 May 2022 19:30:03 +0200 Date: Fri, 06 May 2022 19:30:00 +0200 Message-Id: <878rrein6v.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #33697 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 33697 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 33697 quit From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 13:51:01 2022 Received: (at 31586) by debbugs.gnu.org; 6 May 2022 17:51:01 +0000 Received: from localhost ([127.0.0.1]:49705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn26X-0000WS-12 for submit@debbugs.gnu.org; Fri, 06 May 2022 13:51:01 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:54389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nn26V-0000W1-FV; Fri, 06 May 2022 13:51:00 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A06FC1C0004; Fri, 6 May 2022 17:50:50 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#33697: 26.1; file-truename messes with match data Organization: LINKOV.NET References: <87a6buin71.fsf@gnus.org> Date: Fri, 06 May 2022 20:49:19 +0300 In-Reply-To: <87a6buin71.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 06 May 2022 19:29:54 +0200") Message-ID: <86tua2ft5s.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 31586 Cc: Philipp , 33697@debbugs.gnu.org, 31586@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: -1.7 (-) >> M-% a RET b RET >> >> The first time you attempt to replace something, Emacs will signal an >> error: >> >> perform-replace: Args out of range: #, 0, 1 >> >> Backtrace: >> >> Debugger entered--Lisp error: (args-out-of-range # 0 1) >> buffer-substring-no-properties(0 1) > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > I can reproduce this in Emacs 26.1, but not in Emacs 28.1, so I guess > this has been fixed in the years since it was reported, and I'm closing > this bug report. If you're still seeing the problem in recent Emacs > versions, please respond to the debbugs address and we'll reopen. This was fixed in bug#36328. From unknown Fri Jun 20 07:16:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Jun 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator