From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 08:30:52 2018 Received: (at submit) by debbugs.gnu.org; 17 Nov 2018 13:30:52 +0000 Received: from localhost ([127.0.0.1]:57135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO0gV-00015E-Tw for submit@debbugs.gnu.org; Sat, 17 Nov 2018 08:30:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO0gU-000152-1S for submit@debbugs.gnu.org; Sat, 17 Nov 2018 08:30:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gO0gO-0002dT-8A for submit@debbugs.gnu.org; Sat, 17 Nov 2018 08:30:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gO0gO-0002dL-5b for submit@debbugs.gnu.org; Sat, 17 Nov 2018 08:30:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gO0gN-0005iO-E7 for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 08:30:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gO0gM-0002cl-SV for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 08:30:43 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:38720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gO0gM-0002cM-LU for bug-gnu-emacs@gnu.org; Sat, 17 Nov 2018 08:30:42 -0500 Received: by mail-lf1-x12a.google.com with SMTP id p86so18361439lfg.5 for ; Sat, 17 Nov 2018 05:30:42 -0800 (PST) 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=vQP49xUK2szcZlK66Ta0DZvdEHLQ7K+sd00V+sRglEI=; b=KgeJ/UCLr6CF22KkBt3FBTOpPYBUdU9KF7bbPUUOdALhyjD/1eM9olpLbQ7wWK5O4S C8g4iJo1U7WzmO0Lh2L7UzmIYlficJIsNk4Sexz78FT0m0Wxvylz5RiPgcDzfy1v9I76 s5f8zUDSVO6oOoxq+J0yuRDqRw7aDwgmvUW9599+d9d7fByh2vWhxfWaqG44d25msZYt 4kHOPaKV4vkXnZSL1Df7YPOoi+YkUJnWya2xtaVNYrUC4IY90mQihUJiiePdmbKpsPNJ ZAShm4wzIvd/T3WQvM0fCg4QAAlfSz84JtFztTUV0GitMLZGypUEevQ4Psc71TyV/Uvn XMog== 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=vQP49xUK2szcZlK66Ta0DZvdEHLQ7K+sd00V+sRglEI=; b=FRE03dE5+jgv8OnEmOuaJ5tVA5+kMdv92+zVWkZiYVbY1Yeh2sS22tYW1T6UqJ6rLV t6ehey+d24Lg8mPNazKs3rxqYXfk0yRYMTTobtMM8R26LfJXaf6ODopU6DmEIwdpsoXh n7gTDOzBs+wMRxPbaL3OZ8DyCCM1nEopqMnnRg54670gCoSFBBThvJ8CqzVChCSAjYyv rUVX8t8G7giXbjXADr3NTlmZYtqzxmjEWwPHwMAG7DM6wn4v3XcAZ6MWWpKl/hKg2GaK /Vs5YASQL42p+mD6iukHmneL6ohH/cDaTais/H71oycJgrb6/SlTGHj1uvjh0ExBTSdk ZvhA== X-Gm-Message-State: AGRZ1gLXAhV78f76lhjH69Pkdx4m30/CTRKYwNDoMSs01qOqVr06iucQ M1BPswXqr2fLCqLD+YNYc6E69HobTM6KkmlsTktiG5mX X-Google-Smtp-Source: AJdET5f3JqvMOqtJ7JbIMz7gUZ1eTKDfyn6hhDTMP5Wt+g2ToDkrc0Ybp7QauYhl8Yn4bxWqfMybSaMovNXz56J6DGA= X-Received: by 2002:a19:9508:: with SMTP id x8mr7667330lfd.112.1542461440897; Sat, 17 Nov 2018 05:30:40 -0800 (PST) MIME-Version: 1.0 From: Pip Cet Date: Sat, 17 Nov 2018 13:30:04 +0000 Message-ID: Subject: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" 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: -4.0 (----) 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: -5.0 (-----) I'm debugging an issue in a custom mode that happened because my syntax-propertize function, which is complex, assumed it could use the match data and looking-at. However, the function itself was called from within looking-at-p, via a regexp generated by (regexp-opt "..." 'symbols), so inhibit-changing-match-data was still bound to t, yielding unexpected results. This was a bit tricky to debug because (backtrace) doesn't work when inhibit-changing-match-data is t. (In emacs -Q, enter (let ((inhibit-changing-match-data t)) (backtrace)) into the *scratch* buffer and evaluate with C-M-x.) At the very least, we should document these unfortunate limitations, though I think it would be better to remove them. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 08:47:05 2018 Received: (at 33414) by debbugs.gnu.org; 17 Nov 2018 13:47:05 +0000 Received: from localhost ([127.0.0.1]:57142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO0wD-0001Tq-Bv for submit@debbugs.gnu.org; Sat, 17 Nov 2018 08:47:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO0wB-0001TM-EW for 33414@debbugs.gnu.org; Sat, 17 Nov 2018 08:47:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gO0w2-0006B4-Cn for 33414@debbugs.gnu.org; Sat, 17 Nov 2018 08:46:58 -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]:38622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gO0w2-0006Ar-9e; Sat, 17 Nov 2018 08:46:54 -0500 Received: from [176.228.60.248] (port=3359 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gO0w0-0003fv-Pi; Sat, 17 Nov 2018 08:46:54 -0500 Date: Sat, 17 Nov 2018 15:46:53 +0200 Message-Id: <83lg5ru88i.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-reply-to: (message from Pip Cet on Sat, 17 Nov 2018 13:30:04 +0000) Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at 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: 33414 Cc: 33414@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: Pip Cet > Date: Sat, 17 Nov 2018 13:30:04 +0000 > > This was a bit tricky to debug because (backtrace) doesn't work when > inhibit-changing-match-data is t. (In emacs -Q, enter > > (let ((inhibit-changing-match-data t)) (backtrace)) > > into the *scratch* buffer and evaluate with C-M-x.) This works on the release branch, so I think it's a regression that needs to be fixed. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 09:14:49 2018 Received: (at 33414) by debbugs.gnu.org; 17 Nov 2018 14:14:49 +0000 Received: from localhost ([127.0.0.1]:57157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO1N3-0002BR-5c for submit@debbugs.gnu.org; Sat, 17 Nov 2018 09:14:49 -0500 Received: from mail-lj1-f179.google.com ([209.85.208.179]:46579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO1N2-0002BF-20 for 33414@debbugs.gnu.org; Sat, 17 Nov 2018 09:14:48 -0500 Received: by mail-lj1-f179.google.com with SMTP id v15-v6so22704014ljh.13 for <33414@debbugs.gnu.org>; Sat, 17 Nov 2018 06:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sM0BB+ZG4DWHi8Ut1CzSg4mmUQOvB6a+4XPF+QuSwEE=; b=SvJKLY9rf0Oc2J3y2IfiwsQGZfZ9V8spKGCm53x72eRjiz0RmFfXF1Sgr9i6VZf3Tx eE16AXq5m/c8X0501hGJDWLbnkGVSiFkklw0fv9KXOSWMcanzO5mfubzojFmCmijwQig He7yQ28nqC7/mNbffniJGaXaZwC0k0Btk7xTD9cJANCSS8jkQ64e/JArC19OjgYgUW3R itCMZ0GVyV8sk2/U4CEjTgORD8wE0GFiIBu0zVPg3+Tz2oDPTomuON26gzbtt33LEpEv MoT6LMMWlV6ycOCsOc/MddAWgsAjG5pNt7QM8tJR+J0yaNEd08Ngk2jDMOyI/027o3lb 6XRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sM0BB+ZG4DWHi8Ut1CzSg4mmUQOvB6a+4XPF+QuSwEE=; b=l/xwgS8PPzWUSy3ROxOV+R2UkX/jrPK2FAyAKwJBrHFDogDpfvLwjxOchw4Quxp5OI vb3SbSJJUER9FzzWqTyYoGTVJ2B16Z0bI3CfeC0flG68RRCoHMmzoR1EdaqS2owL5m/9 0JJo48MZq/TpyjopnKTL/7L5m+MSWjY6lDX/TMbeNFBmw714mNvDtDTBqr1mWRZHdlUJ zWI6AfRMqE54UWns3RzKdgoG/he6ZtjcSIB+f9Ppwn0LCkTqTiCIVrEV38bxz/q4FRQw KERbbd+EuojiyeOpJ+JnhFRuA+O+l7MNe6o0Tdb8D37XdHPKZnYiGpqCd+cyxyWLvVu9 Di4w== X-Gm-Message-State: AGRZ1gJLGBCnMQLrxiLWwBFaH6hq1uBXkhVIR5ieHYQBUusz8Z5HU35c fAhuj0ijfFbZ8FkRz+8pkjPJOKxHktx/BGnOEWQ= X-Google-Smtp-Source: AJdET5cRIbAyeoRWYUMhNjMEW/rZ57FHh+aAN/H8QYVf555zrZX8Umo2Gjvx5n3JpAUEJ9x8a1L7mMgsh2l7EQmQdgc= X-Received: by 2002:a2e:2b85:: with SMTP id r5-v6mr8010445ljr.91.1542464081963; Sat, 17 Nov 2018 06:14:41 -0800 (PST) MIME-Version: 1.0 References: <83lg5ru88i.fsf@gnu.org> In-Reply-To: <83lg5ru88i.fsf@gnu.org> From: Pip Cet Date: Sat, 17 Nov 2018 14:14:04 +0000 Message-ID: Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at To: eliz@gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33414 Cc: 33414@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.0 (-) On Sat, Nov 17, 2018 at 1:47 PM Eli Zaretskii wrote: > > > From: Pip Cet > > Date: Sat, 17 Nov 2018 13:30:04 +0000 > > > > This was a bit tricky to debug because (backtrace) doesn't work when > > inhibit-changing-match-data is t. (In emacs -Q, enter > > > > (let ((inhibit-changing-match-data t)) (backtrace)) > > > > into the *scratch* buffer and evaluate with C-M-x.) > > This works on the release branch, so I think it's a regression that > needs to be fixed. If I'm testing correctly, (let ((inhibit-changing-match-data t)) (debug)) fails on both branches, which is also bad; I think that means the issue is present in some form on both branches. Maybe `save-match-data' should save/restore `inhibit-changing-match-data' along with the actual match data? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 17 09:36:58 2018 Received: (at 33414) by debbugs.gnu.org; 17 Nov 2018 14:36:58 +0000 Received: from localhost ([127.0.0.1]:57169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO1iU-0002je-Ad for submit@debbugs.gnu.org; Sat, 17 Nov 2018 09:36:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gO1iS-0002jR-5K for 33414@debbugs.gnu.org; Sat, 17 Nov 2018 09:36:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gO1iG-0003eb-Cq for 33414@debbugs.gnu.org; Sat, 17 Nov 2018 09:36:50 -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]:39396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gO1iE-0003e1-Ga; Sat, 17 Nov 2018 09:36:42 -0500 Received: from [176.228.60.248] (port=2766 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gO1iC-0003vW-KI; Sat, 17 Nov 2018 09:36:42 -0500 Date: Sat, 17 Nov 2018 16:36:40 +0200 Message-Id: <83k1lbu5xj.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-reply-to: (message from Pip Cet on Sat, 17 Nov 2018 14:14:04 +0000) Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.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: 33414 Cc: 33414@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: Pip Cet > Date: Sat, 17 Nov 2018 14:14:04 +0000 > Cc: 33414@debbugs.gnu.org > > > > (let ((inhibit-changing-match-data t)) (backtrace)) > > > > > > into the *scratch* buffer and evaluate with C-M-x.) > > > > This works on the release branch, so I think it's a regression that > > needs to be fixed. > > If I'm testing correctly, > > (let ((inhibit-changing-match-data t)) (debug)) > > fails on both branches You are right, not sure what I did wrong when trying it a few moments ago. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 12 09:11:41 2021 Received: (at 33414) by debbugs.gnu.org; 12 Aug 2021 13:11:41 +0000 Received: from localhost ([127.0.0.1]:37786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEAUm-0000mG-Nn for submit@debbugs.gnu.org; Thu, 12 Aug 2021 09:11:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEAUk-0000m1-GA for 33414@debbugs.gnu.org; Thu, 12 Aug 2021 09:11:39 -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=nmsHCEJV5X0OjIEYvcK6XQmUbA4DsoMO5pzrpcHgDSM=; b=qlPvr1Brd07oDn5e5OFBBsrmER oDg4PDfdn7hIDxj2XeTQFA6WzUY5e6m1AKCK99V0TMkF9h4dNIGIrVybjIeRRGDDShLhYKss4/R7M oFfrTFNoKD3EIrMRAUtwlfs9hPzT8S5Mpj57zIQxG1ZLUSXlMWyMFsr34AK/C+E6hKao=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEAUZ-00062g-NI; Thu, 12 Aug 2021 15:11:31 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> Date: Thu, 12 Aug 2021 15:11:25 +0200 In-Reply-To: <83k1lbu5xj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Nov 2018 16:36:40 +0200") Message-ID: <87r1eylsea.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Eli Zaretskii writes: >> If I'm testing correctly, >> >> (let ((inhibit-changing-match-data t)) (debug)) >> >> fails on both branches > > You are right, not sure what I did wrong when trying it a few moments > ago. 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: 33414 Cc: 33414@debbugs.gnu.org, Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> If I'm testing correctly, >> >> (let ((inhibit-changing-match-data t)) (debug)) >> >> fails on both branches > > You are right, not sure what I did wrong when trying it a few moments > ago. It seems to fail reliably the first time executed, but after that it only sometimes fails. Below is the backtrace for the reliable breakage. But... I'm not sure this is supposed to work? I mean, this is an internal variable only supposed to be used in very limited circumstances, and aren't ... particularly well defined. But I see this was added in 2016: 7fb75680b38 (Noam Postavsky 2016-08-05 338) /* If we are debugging an error while `inhibit-changing-match-data' 7fb75680b38 (Noam Postavsky 2016-08-05 339) is bound to non-nil (e.g., within a call to `string-match-p'), 7fb75680b38 (Noam Postavsky 2016-08-05 340) then make sure debugger code can still use match data. */ 7fb75680b38 (Noam Postavsky 2016-08-05 341) specbind (Qinhibit_changing_match_data, Qnil); To work around the problem. `inhibit-changing-match-data' just seems like a bad interface to me. Wouldn't it be better to change `looking-at' and `string-match' to allow taking a parameter to not change the match data? (And then just use that in `looking-at-p'/`string-match-p'.) That would avoid all these weirdnesses... Any opinions? Debugger entered--Lisp error: (wrong-type-argument stringp nil) regexp-quote(nil) find-auto-coding("/home/larsi/src/emacs/trunk/lisp/emacs-lisp/cl-loa..." 48494) set-auto-coding("/home/larsi/src/emacs/trunk/lisp/emacs-lisp/cl-loa..." 48494) insert-file-contents("/home/larsi/src/emacs/trunk/lisp/emacs-lisp/cl-loa...") load-with-code-conversion("/home/larsi/src/emacs/trunk/lisp/emacs-lisp/cl-loa..." "/home/larsi/src/emacs/trunk/lisp/emacs-lisp/cl-loa..." t t) load("cl-loaddefs" noerror quiet) byte-code(... [provide cl-lib load "cl-loaddefs" noerror quiet require cl-macs cl-seq] 4) require(cl-lib) (debug) (let ((inhibit-changing-match-data t)) (debug)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 04 14:39:54 2021 Received: (at 33414) by debbugs.gnu.org; 4 Sep 2021 18:39:54 +0000 Received: from localhost ([127.0.0.1]:48564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMaa2-0004Hf-Cd for submit@debbugs.gnu.org; Sat, 04 Sep 2021 14:39:54 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:45954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMaa1-0004HU-Dg for 33414@debbugs.gnu.org; Sat, 04 Sep 2021 14:39:53 -0400 Received: by mail-wm1-f54.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so1817733wms.4 for <33414@debbugs.gnu.org>; Sat, 04 Sep 2021 11:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w5xsH6d6l9AjPw3KgTX8GdutxGOy/ckU1UNAu+XmGYs=; b=JUvcnl0Qwug0ISydzc4YV61ObWAK1EmqZ7pkvgSUhn1Jw3uaXMMTVWyGrLMS2Pniu/ r+Hlop1oFZ3HbiJA58A6/2EUagjeLBjBXPHWTWZaQHCmnDlXH2xrjS89yORypaoQBQx4 lEc5dd72ZZ9xO6MmdKJ2+8blISuP0sZ5ELOQpRHC2+JLJMEZqv1JQr9ttZCk44GVS0JG pCw7yqb82MbyEh14M/PXuKVTJUQ02M7mct85obqibR4yjRpUJPvrHQzjAqHIF6wO16NK 1Nrbv/40lKPH0zZZpuKDd226byQcQyHs+UShuH+gzFj4MbqYstnOPHhG3PczWq/H3cnr d0ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w5xsH6d6l9AjPw3KgTX8GdutxGOy/ckU1UNAu+XmGYs=; b=JDG9pxIwBByaBP/V2Ch/5IO+VOU62vGAHr9P4OxIReCwTp4oRAU/gPBPkq9rblIda+ ygEHxMzhYH1MxB/AmHXd1/oTsUAxp+bPph+tHSSCyFC4qhErvVsjHIlcQk7FMZSz4rCB eDuTc4nw+O1NJ+GLpmuMzQwnGXbh6tWcCizTCoYX2r9kk35/2aWvY7UxCfzxjEoc1F1I xp30PR76JM2ZD/nPAGh8HB0ssycUApR858ywEFqdxPgmBSLmKDinSeCVn/zgoZQvMVcw bDwgCqs0x7S5fReB9AyQJhDdknajPbDuWstXpqFqCCq4BbQhljQUU1j1H1bxbIMfSe1I LT2A== X-Gm-Message-State: AOAM5325GCcPYnY6NZFCGZ7e06tXCYLrGfTBDeco+wHyO+1pf+uTCTqx u8LRWciGDYh48OybxIRLkbc= X-Google-Smtp-Source: ABdhPJyOT9trs2t+9h31S+uWtR+Ch9RwmfiYwks6XWGTt2rFnfMy5ITANXBANdF/bjwS7VGkoVMHLw== X-Received: by 2002:a7b:c351:: with SMTP id l17mr4130998wmj.120.1630780787505; Sat, 04 Sep 2021 11:39:47 -0700 (PDT) Received: from smtpclient.apple ([46.128.209.111]) by smtp.gmail.com with ESMTPSA id s13sm2667629wmc.47.2021.09.04.11.39.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Sep 2021 11:39:47 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at From: Philipp In-Reply-To: <87r1eylsea.fsf@gnus.org> Date: Sat, 4 Sep 2021 20:39:46 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> To: Lars Ingebrigtsen X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33414 Cc: Eli Zaretskii , 33414@debbugs.gnu.org, Pip Cet X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > Am 12.08.2021 um 15:11 schrieb Lars Ingebrigtsen : >=20 >=20 > `inhibit-changing-match-data' just seems like a bad interface to me. Yes, using a public dynamic variable (i.e., public global mutable state) = to influence the behavior of a function is normally a bad idea. = Effectively, the dynamic variable becomes a hidden parameter to the = function, and robust code has to bind it explicitly do override any = surprising binding up the call stack. You normally don't see such a = coding style in other programming languages, and ELisp would be better = off without it, too. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 04 15:33:56 2021 Received: (at 33414) by debbugs.gnu.org; 4 Sep 2021 19:33:56 +0000 Received: from localhost ([127.0.0.1]:48666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMbQK-0005jo-8G for submit@debbugs.gnu.org; Sat, 04 Sep 2021 15:33:56 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:11478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMbQI-0005jg-KK for 33414@debbugs.gnu.org; Sat, 04 Sep 2021 15:33:55 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 184EnOYf028130; Sat, 4 Sep 2021 19:33:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=QQ36W/zvdh2XNcYI0nsUyF26JEqhNKxjy4w7bFt1o4k=; b=HTG7WYF2iJ8M+O9717yWV83pX7CQ7pAx85BrU+1GiYdFHsQ8bJUfARBpwuX27s1IAwxj BOLrMLysk81b+x9lJk4LGwxcE3YNqkAtVfIes6cTFVYsc/3Z61uzt3nn7qHC7cxTZ8E4 MtiQ6PMzf6zFZO0x3lsKJzErIXZxjLyk13LUJ8jtHAEIsGWQBDWfl4Csr3Mn69iRG+bT yyAylrG4p4OfD8i7dYKCunGeLIAn1PJdmE1TluMxaAsr8j6amKYKCLm/C2cv87OF0rDc NRKHACNDsqN32dGfGOHnMVsmqFT644nIbzK3ybM48p52mQJp3taG2dF8yakGLraCuzFK Xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=QQ36W/zvdh2XNcYI0nsUyF26JEqhNKxjy4w7bFt1o4k=; b=OZyVtFBWnK4INf0QsTj1lMVodQB9hZZ1t39oOKOuR36R4E+DHYr+Qu1THTUbNR6+6lHG cXqudsrDGRSKuhOXfX8XxumgAu9xn1WP/uRBz8YlT86h634DCeiAw+TBqPSPJJlQXnzD 6yTjLel1jiZOdWindvU6tb2c6E5++IXZnlqy0skru5RcSfC1nDsGpuHijIj3hlAm9Ytn cKF5SOEBYCns/FjVZ0oecG9RnKqljHPvkju45EOE/j1XB9pxHmDdE2fydVcfuUoqEXEu 2f5vR9X+nx2As8mQzuRlwqTdySa9K6ERzCdf3zQB5pghC8IYFGCJJqPUv9YvQ8HGgn6V 4A== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3av0dt98ue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 04 Sep 2021 19:33:53 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 184JEfkF065283; Sat, 4 Sep 2021 19:33:52 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by userp3030.oracle.com with ESMTP id 3auwwtbmut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 04 Sep 2021 19:33:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JP94cgvh+KgPBBVyl2uYpqMB8ZMu5tCV/ohiUAJkjVUXPC2ACypd3FLz9yHTB5dj2NOwmF6w1roWi5Y2FrPgTO7AixD6bc8rLtL067lM0f23b7hPD6dhg9u3zy882c+RXj3y/FcywFBeiShRxKE6oS/3uruGVrDzmOiF5IdU6YidIUSYOifCJM1p7ZwmeIephK0GHOedeYIIYJrUEI1iI5eJyY37TsqHiV9aUNGhSCNZ9NTXATyj+TsmSKIJIsJqC48YnXMzv541xAVIhe8ZbcbrG8GTF/psdrgD32TTOC2yvDbBXWBVuIEatL1EC8rCw6PCpGB/ufsT9mIpQBjoBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QQ36W/zvdh2XNcYI0nsUyF26JEqhNKxjy4w7bFt1o4k=; b=NKkMpUfufh9J8fucWWO+F4FditHngPi0iPJxTz2tgdhT6mpKgHaTpqZ8CwBJ7RNel+JXnpWFv8dUjEXsCKYuzQZBI8+gFS0gVWPx+4BoBeiqSSdWWRYwmlFm/jj8MzwiDemGC2Lpu1f4gp14WQ99TgokLiRIcQheV8JwHO1+hS8JnDfXDSgK+IyGPAkKcuhItl14zhvLM4H1EVMcr+gxBO9dFrnzkeNkJx5PoV/pfAzbIj+E6acelEhZDD5F6Nw6A1g1c9+htEjjUveBpGDzBU4kOLtfrG9VJzLkeG78dGBs8xfUxnfp8L0W9hUuW+VqB+tc3StnCk/6wOej/5zP6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QQ36W/zvdh2XNcYI0nsUyF26JEqhNKxjy4w7bFt1o4k=; b=oAfJ/7mpKc01j7ZdyhcRWHbnbcJWQM2dWUg5Uxu9p+nTgH3r4nohW6wrQtNwxop1ZqvJRBPstVI6r4jVcvFHIdfFE+NWHaNE8MHB/g/eVqcT2vIP6VfASYqwHT456Z4FHUkJ/5LUoyUNBYQu4yEIzOk+zITX/drqvFcZruS4GB0= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BY5PR10MB4387.namprd10.prod.outlook.com (2603:10b6:a03:211::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20; Sat, 4 Sep 2021 19:33:50 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%8]) with mapi id 15.20.4478.025; Sat, 4 Sep 2021 19:33:49 +0000 From: Drew Adams To: Philipp , Lars Ingebrigtsen Subject: RE: [External] : bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Thread-Topic: [External] : bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Thread-Index: AQHXobxK7Bq9oGUICUmj/QQTRr6uhquUP7Ug Date: Sat, 4 Sep 2021 19:33:49 +0000 Message-ID: References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> In-Reply-To: <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 93dfa5f2-5787-4447-cd6e-08d96fdaebd4 x-ms-traffictypediagnostic: BY5PR10MB4387: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Et+0tF+GR6l0TlxblHiRpZsdzoAzNTYVymPCAI/iFnlif9tF6RK9kVJG/R6bukJ3lJPj35juZqcWv3Jgh4RbCp08Ss6aE7KaD9N7FjRAqGKvb+7wOaGVfqqReUTyJPLyjSjAsvirwxWa5mAEIlU/r0sdXxRaiKXeO5BNXmS5SXt6B28A1asW2+n94xlP5598qpBPfij+VsOvIWPcjgOofDvdHnv9zlBJ7jLH8DoJqjCQrRfx+Kx3uVMQDp0lRkraaGg1AkfhsUt7WcO4rGNtgnCdZrXYV3ge9sg86+6bKKYH4HK/uejHVJvXmVamKTREGcOO84hVby3npYJNFC7pLg9rR4GSc9TTB8I3ctd11jGUqPbhEVFLQXK7hpi5dSBLg/J1gSgKIfrsh1bm1h3u0z3/zilQo8Ueukmfohep7qGLkHux+h27UeOHyWqOwtne/uLupem190FUrw44H7TRpzwHYXBZ6JsBHGVhY/5ZBGbDwGMKGKYzxa9VjLA3BVgCDwocrPwBP2pxxiTYHikFnQr12lTpzCKHKdAFOPf2Ku32jYQNO5I2ol6ubVTAHk4Gzn53SQh2PluEsknWALp3g/LwE2qY93LNq4A4RVHkyc51bT7Pw2DuLcxYw4jM5+/xpG9QKx97h19mqj5hdO6kbjLpdu++93ofBQpefFmzJiPnobj6pRXxsv0FEK67gu8RYtpU88NuQBtFmga2tXaoLHfWOUsJXqnL/7/2eG50im1HnDD9Yt8mQHH05HfESgcRgKN9vDZioMineAoPDJlX32RUoztnmf44RsG4mshPEpl9e+ny9fV939j+RT/866embIA5feRTrUxwxYlgpN3c1Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(39860400002)(346002)(136003)(366004)(54906003)(2906002)(316002)(110136005)(4326008)(186003)(8936002)(26005)(55016002)(122000001)(38070700005)(7696005)(5660300002)(38100700002)(52536014)(9686003)(66556008)(76116006)(6506007)(64756008)(71200400001)(66446008)(8676002)(66476007)(66946007)(478600001)(966005)(33656002)(44832011)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pOIQ29pFqA8azE07KT5XXd0HVBgdINdSrwMDIBpMayaOCLQ3EKKitTBQUqbY?= =?us-ascii?Q?8oj544oDzYxALpaWp96lCPDjnSjvzepNNAJCm4IV3RmwXHq9NUy1PqUoHoni?= =?us-ascii?Q?NS5BEsY6Hg67r0MjI4mTDoo4MUp7bM34ss3RLPnb60lLbd/+qUMk58suWcrf?= =?us-ascii?Q?Xx0/1gQM1yzbkHLMTgCbS0wfXfb9zzzBnq1QmPP6UyWhOzB29HwCSx4D5Wf1?= =?us-ascii?Q?paKzRRva+CorXAnGWFH5TJ3x97uXLm/3aEgQInAUVM9gwbGohidmoDgcnFF8?= =?us-ascii?Q?ogVfgV9QyTi18M1pez7qkBVsZJ0S3wwv2coZX16kHOMXv/cTd9S6UOmbC9nW?= =?us-ascii?Q?1CThvFIzRZSL/KANg0gaZNrU16NUxPqJ44X9jFtWnQEwAYiLn96tU14bltTZ?= =?us-ascii?Q?lzxW+TV4v2aNIup5o9jPV0oXu2y8/rhDEne0h7Lsvx52ANNpuvV5Yb0twfnX?= =?us-ascii?Q?f+RwtbGNqasLt1mZEhUFDbluO9jVQimd5FKqlCitcIAOxl+PwM23MtzPNVxa?= =?us-ascii?Q?NZd1zn5t8AaqbbhGO2h1VLWPqdHP33QlYZsJJ5UmAb/SLiUdGAp3eVasisJf?= =?us-ascii?Q?D7SaQj/f8ozKnLSJl3y9tD6pKVSY+mkwSo0NVQYj1W9YJbIaBu5jYx48bWDO?= =?us-ascii?Q?BtIm03UKy+WW3BmYHUWsQP1DvCc1gtXreg7irZyy3m4zatQ71AqgU9Gn3tHq?= =?us-ascii?Q?9JlXR/m+oYHBGKq0vas3G2e3vCcpyk6TPJ38cvTEnQMDgxQp9F3ukeExQd0j?= =?us-ascii?Q?neepvNMoWioDdsduKxdoAcj8uCEdCbAySxqWsVYADrNDedx5L6Zzn01ng83b?= =?us-ascii?Q?ZlY8pHmj20MOhx12zUT+w9+DJaGNmHoarz9M8ikXYV7OhYOQrar8M2d8/mxY?= =?us-ascii?Q?ig8MWhnlkKDBP7eM6AKAj8E3R4FC1S/rIYK2LIvkJ6UqwWhlR9eZV3lVBYpb?= =?us-ascii?Q?ktxMSy30xZiKDYdRH0H9YldD4V0tw2BeHfmElfqAeEVFR0xw1DU4HNLVAXL4?= =?us-ascii?Q?Qo55zx68SqPAln5zJLH5RsurOgIHLsD7Vxsfvbd3dEIYOobxn/0TJK4ZD0wS?= =?us-ascii?Q?rRs3BRkgtpq5/StDlYlhZ7gEsJz0YPNce5Ev+/XmNK4+YwiILtUrZ3NjMMvN?= =?us-ascii?Q?kYS8NVyAnqi2LQKdxf8CLve/OyJlRdU+nk63JBRFUjmfelV1DVxU5PsFTmuu?= =?us-ascii?Q?pP0U+qgdMTTk6aeItSUQWXSNkfZ/OsKMQYnyNXtgb18wY65M3d677BeqaTZc?= =?us-ascii?Q?6QTlRs+4q0P8qvzkeTVGaXEXOQyHMO31ezFGyrpX9Mn7mDAQejFN5xxUjBx0?= =?us-ascii?Q?JtZ5+pSUb6S7uQdRyh6rtzh7?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93dfa5f2-5787-4447-cd6e-08d96fdaebd4 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2021 19:33:49.8845 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ruHQWGxwZqZjPecoPWZ2GmaV6MIAXTTSnEmLTOTqKtNGSQ7glUtmrmCp941VohxZr3YbPGMGQFmUq2h/PfUKhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4387 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10097 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 mlxlogscore=916 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109040139 X-Proofpoint-ORIG-GUID: asO6Nin9XmZX4Bk31VYaav2C4VuCWRdf X-Proofpoint-GUID: asO6Nin9XmZX4Bk31VYaav2C4VuCWRdf X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33414 Cc: "33414@debbugs.gnu.org" <33414@debbugs.gnu.org>, Pip Cet 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 (-) > Yes, using a public dynamic variable (i.e., public global mutable > state) to influence the behavior of a function is normally a bad idea. Define "normally". Yes, it presents problems. Lots of things in a language like Lisp present problems. > Effectively, the dynamic variable becomes a hidden parameter to the > function, and robust code has to bind it explicitly do override any > surprising binding up the call stack. Correct. > You normally don't see such a coding style in > other programming languages, You don't see _lots_ of Lisp things in most other programming languages. > and ELisp would be better off without it, too. Even Common Lisp is better off _having_ it. For Elisp that's 1000 times truer. Users of Emacs as an interactive application, an editor (and more) _use Lisp_, including to customize out-of-the-box behavior. Elisp's designer - and Emacs's designer - pointed out the reasons why dynamic binding is important for Emacs Lisp, _in particular_. https://www.gnu.org/software/emacs/emacs-paper.html#SEC17 https://www.gnu.org/software/emacs/emacs-paper.html#SEC18 Those reasons are as important today as they were when that was written. Elisp invites and encourages user tweaking - with Lisp - the OOTB code. Monkey patching is part of that, in spite of its negative connotation, and in spite of the (quite real) drawbacks. Lisp (even for batch uses) has a ton of things that offer both possibilities and drawbacks. Lisp isn't Haskell. (Even Scheme isn't Haskell.) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 05:29:52 2021 Received: (at 33414) by debbugs.gnu.org; 5 Sep 2021 09:29:52 +0000 Received: from localhost ([127.0.0.1]:49213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMoTH-0003HA-8y for submit@debbugs.gnu.org; Sun, 05 Sep 2021 05:29:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMoTE-0003Gw-J8 for 33414@debbugs.gnu.org; Sun, 05 Sep 2021 05:29:49 -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=jcvsLQo4hantZRXixCDC4q6nOIXwmu3SC3C1xpWfnqg=; b=ZZ82ndvdDVNpmMqA60bXo38EGP iKOXk0a0uD0ncWIMaaIPhfrDBleuSPiBjTvnX+NuhmqpclQ/pFo1+QOjt1MQZdqknkA5TPvj2UeBR FKSDBF+vthkKntZoOi6D5HIGhOMlGX8J/lWXcPM5gNeTwyzY/prGitZHYDyKQ2dIO5xU=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mMoT5-0003wv-75; Sun, 05 Sep 2021 11:29:41 +0200 From: Lars Ingebrigtsen To: Philipp Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> Date: Sun, 05 Sep 2021 11:29:38 +0200 In-Reply-To: <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> (Philipp's message of "Sat, 4 Sep 2021 20:39:46 +0200") Message-ID: <87eea3nzel.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: >> `inhibit-changing-match-data' just seems like a bad interface to me. > > Yes, using a public dynamic variable (i.e., public global mutable > state) to influence the behavior of a function is normal [...] 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: 33414 Cc: Eli Zaretskii , 33414@debbugs.gnu.org, Pip Cet 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: >> `inhibit-changing-match-data' just seems like a bad interface to me. > > Yes, using a public dynamic variable (i.e., public global mutable > state) to influence the behavior of a function is normally a bad idea. I've now implemented this, but out of an abundance of caution, I'm waiting for the Emacs 29 branch to open before pushing it (which should be in a couple of weeks). I append the work in progress for reference. diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 68061f0b09..0d9defec4d 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1968,7 +1968,7 @@ Regexp Search not worth the trouble of implementing that. @end deffn -@defun string-match regexp string &optional start +@defun string-match regexp string &optional start inhibit-modify This function returns the index of the start of the first match for the regular expression @var{regexp} in @var{string}, or @code{nil} if there is no match. If @var{start} is non-@code{nil}, the search starts @@ -1993,8 +1993,10 @@ Regexp Search The index of the first character of the string is 0, the index of the second character is 1, and so on. -If this function finds a match, the index of the first character beyond -the match is available as @code{(match-end 0)}. @xref{Match Data}. +By default, if this function finds a match, the index of the first +character beyond the match is available as @code{(match-end 0)}. +@xref{Match Data}. If @var{inhibit-modify} is non-@code{nil}, the +match data isn't modified. @example @group @@ -2015,16 +2017,17 @@ Regexp Search avoids modifying the match data. @end defun -@defun looking-at regexp +@defun looking-at regexp &optional inhibit-save This function determines whether the text in the current buffer directly following point matches the regular expression @var{regexp}. ``Directly following'' means precisely that: the search is ``anchored'' and it can succeed only starting with the first character following point. The result is @code{t} if so, @code{nil} otherwise. -This function does not move point, but it does update the match data. -@xref{Match Data}. If you need to test for a match without modifying -the match data, use @code{looking-at-p}, described below. +This function does not move point, but it does update the match data +(if @var{inhibit-modify} is @code{nil} or missing, which is the +default). @xref{Match Data}. If you need to test for a match without +modifying the match data, use @code{looking-at-p}, described below. In this example, point is located directly before the @samp{T}. If it were anywhere else, the result would be @code{nil}. @@ -2131,13 +2134,13 @@ POSIX Regexps matching. @end deffn -@defun posix-looking-at regexp +@defun posix-looking-at regexp &optional inhibit-modify This is like @code{looking-at} except that it performs the full backtracking specified by the POSIX standard for regular expression matching. @end defun -@defun posix-string-match regexp string &optional start +@defun posix-string-match regexp string &optional start inhibit-modify This is like @code{string-match} except that it performs the full backtracking specified by the POSIX standard for regular expression matching. diff --git a/lisp/auth-source.el b/lisp/auth-source.el index 6919738398..450a97a7ed 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -1447,12 +1447,13 @@ auth-source-netrc-saver `auth-source-netrc-cache' to avoid prompting more than once." (let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add))) (cached (assoc key auth-source-netrc-cache))) - + (message "hello 2 %s" cached) (if cached (auth-source-do-trivia "auth-source-netrc-saver: found previous run for key %s, returning" key) (with-temp-buffer + (message "hello 3 %s" file) (when (file-exists-p file) (insert-file-contents file)) (when auth-source-gpg-encrypt-to @@ -1472,8 +1473,11 @@ auth-source-netrc-saver (done (not (eq auth-source-save-behavior 'ask))) (bufname "*auth-source Help*") k) + (message "hello 3 %s %s" auth-source-save-behavior done) (while (not done) + (message "hello 3.5") (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) + (message "hello 4 %s" k) (cl-case k (?y (setq done t)) (?? (save-excursion diff --git a/lisp/subr.el b/lisp/subr.el index 7426dcce50..983a127594 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1746,6 +1746,7 @@ log10 (make-obsolete 'window-redisplay-end-trigger nil "23.1") (make-obsolete 'set-window-redisplay-end-trigger nil "23.1") (make-obsolete-variable 'operating-system-release nil "28.1") +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1") (make-obsolete 'run-window-configuration-change-hook nil "27.1") @@ -4715,14 +4716,12 @@ looking-back (defsubst looking-at-p (regexp) "\ Same as `looking-at' except this function does not change the match data." - (let ((inhibit-changing-match-data t)) - (looking-at regexp))) + (looking-at regexp t)) (defsubst string-match-p (regexp string &optional start) "\ Same as `string-match' except this function does not change the match data." - (let ((inhibit-changing-match-data t)) - (string-match regexp string start))) + (string-match regexp string start t)) (defun subregexp-context-p (regexp pos &optional start) "Return non-nil if POS is in a normal subregexp context in REGEXP. diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 4a64caa36b..c8d8913afe 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -673,7 +673,6 @@ vc-hg--raw-dirstate-search (let* ((result nil) (flen (length fname)) (case-fold-search nil) - (inhibit-changing-match-data t) ;; Find a conservative bound for the loop below by using ;; Boyer-Moore on the raw dirstate without parsing it; we ;; know we can't possibly find fname _after_ the last place @@ -977,10 +976,9 @@ vc-hg--ignore-patterns-ignored-p "Test whether the ignore pattern set HGIP says to ignore FILENAME. FILENAME must be the file's true absolute name." (let ((patterns (vc-hg--ignore-patterns-ignore-patterns hgip)) - (inhibit-changing-match-data t) (ignored nil)) (while (and patterns (not ignored)) - (setf ignored (string-match (pop patterns) filename))) + (setf ignored (string-match-p (pop patterns) filename))) ignored)) (defvar vc-hg--cached-ignore-patterns nil @@ -1044,7 +1042,8 @@ vc-hg--cached-dirstate-search (equal size (pop cache)) (equal ascii-fname (pop cache))) (pop cache) - (let ((result (vc-hg--raw-dirstate-search dirstate ascii-fname))) + (let ((result (save-match-data + (vc-hg--raw-dirstate-search dirstate ascii-fname)))) (setf vc-hg--dirstate-scan-cache (list dirstate mtime size ascii-fname result)) result)))) diff --git a/src/minibuf.c b/src/minibuf.c index c9134eff67..725c4ceeb9 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1679,7 +1679,7 @@ DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); } - tem = Fstring_match (XCAR (regexps), eltstring, zero); + tem = Fstring_match (XCAR (regexps), eltstring, zero, Qnil); if (NILP (tem)) break; } @@ -1943,7 +1943,7 @@ DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0, specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); } - tem = Fstring_match (XCAR (regexps), eltstring, zero); + tem = Fstring_match (XCAR (regexps), eltstring, zero, Qnil); if (NILP (tem)) break; } @@ -2155,7 +2155,7 @@ DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0, { /* We can test against STRING, because if we got here, then the element is equivalent to it. */ - if (NILP (Fstring_match (XCAR (regexps), string, Qnil))) + if (NILP (Fstring_match (XCAR (regexps), string, Qnil, Qnil))) return unbind_to (count, Qnil); } unbind_to (count, Qnil); diff --git a/src/search.c b/src/search.c index 14adeb58e9..eca4413f83 100644 --- a/src/search.c +++ b/src/search.c @@ -260,7 +260,7 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp, static Lisp_Object -looking_at_1 (Lisp_Object string, bool posix) +looking_at_1 (Lisp_Object string, bool posix, bool modify_data) { Lisp_Object val; unsigned char *p1, *p2; @@ -278,11 +278,11 @@ looking_at_1 (Lisp_Object string, bool posix) CHECK_STRING (string); /* Snapshot in case Lisp changes the value. */ - bool preserve_match_data = NILP (Vinhibit_changing_match_data); + bool modify_match_data = NILP (Vinhibit_changing_match_data) && modify_data; struct regexp_cache *cache_entry = compile_pattern ( string, - preserve_match_data ? &search_regs : NULL, + modify_match_data ? &search_regs : NULL, (!NILP (BVAR (current_buffer, case_fold_search)) ? BVAR (current_buffer, case_canon_table) : Qnil), posix, @@ -316,7 +316,7 @@ looking_at_1 (Lisp_Object string, bool posix) re_match_object = Qnil; i = re_match_2 (&cache_entry->buf, (char *) p1, s1, (char *) p2, s2, PT_BYTE - BEGV_BYTE, - preserve_match_data ? &search_regs : NULL, + modify_match_data ? &search_regs : NULL, ZV_BYTE - BEGV_BYTE); if (i == -2) @@ -326,7 +326,7 @@ looking_at_1 (Lisp_Object string, bool posix) } val = (i >= 0 ? Qt : Qnil); - if (preserve_match_data && i >= 0) + if (modify_match_data && i >= 0) { for (i = 0; i < search_regs.num_regs; i++) if (search_regs.start[i] >= 0) @@ -343,35 +343,37 @@ looking_at_1 (Lisp_Object string, bool posix) return unbind_to (count, val); } -DEFUN ("looking-at", Flooking_at, Slooking_at, 1, 1, 0, +DEFUN ("looking-at", Flooking_at, Slooking_at, 1, 2, 0, doc: /* Return t if text after point matches regular expression REGEXP. -This function modifies the match data that `match-beginning', -`match-end' and `match-data' access; save and restore the match -data if you want to preserve them. */) - (Lisp_Object regexp) +By default, this function modifies the match data that +`match-beginning', `match-end' and `match-data' access. If +INHIBIT-MODIFY is non-nil, don't modify the match data. */) + (Lisp_Object regexp, Lisp_Object inhibit_modify) { - return looking_at_1 (regexp, 0); + return looking_at_1 (regexp, 0, NILP (inhibit_modify)); } -DEFUN ("posix-looking-at", Fposix_looking_at, Sposix_looking_at, 1, 1, 0, +DEFUN ("posix-looking-at", Fposix_looking_at, Sposix_looking_at, 1, 2, 0, doc: /* Return t if text after point matches REGEXP according to Posix rules. Find the longest match, in accordance with Posix regular expression rules. -This function modifies the match data that `match-beginning', -`match-end' and `match-data' access; save and restore the match -data if you want to preserve them. */) - (Lisp_Object regexp) + +By default, this function modifies the match data that +`match-beginning', `match-end' and `match-data' access. If +INHIBIT-MODIFY is non-nil, don't modify the match data. */) + (Lisp_Object regexp, Lisp_Object inhibit_modify) { - return looking_at_1 (regexp, 1); + return looking_at_1 (regexp, 1, NILP (inhibit_modify)); } static Lisp_Object string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, - bool posix) + bool posix, bool modify_data) { ptrdiff_t val; struct re_pattern_buffer *bufp; EMACS_INT pos; ptrdiff_t pos_byte, i; + bool modify_match_data = NILP (Vinhibit_changing_match_data) && modify_data; if (running_asynch_code) save_search_regs (); @@ -400,8 +402,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, BVAR (current_buffer, case_eqv_table)); bufp = &compile_pattern (regexp, - (NILP (Vinhibit_changing_match_data) - ? &search_regs : NULL), + (modify_match_data ? &search_regs : NULL), (!NILP (BVAR (current_buffer, case_fold_search)) ? BVAR (current_buffer, case_canon_table) : Qnil), posix, @@ -410,18 +411,17 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, val = re_search (bufp, SSDATA (string), SBYTES (string), pos_byte, SBYTES (string) - pos_byte, - (NILP (Vinhibit_changing_match_data) - ? &search_regs : NULL)); + (modify_match_data ? &search_regs : NULL)); /* Set last_thing_searched only when match data is changed. */ - if (NILP (Vinhibit_changing_match_data)) + if (modify_match_data) last_thing_searched = Qt; if (val == -2) matcher_overflow (); if (val < 0) return Qnil; - if (NILP (Vinhibit_changing_match_data)) + if (modify_match_data) for (i = 0; i < search_regs.num_regs; i++) if (search_regs.start[i] >= 0) { @@ -434,32 +434,42 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, return make_fixnum (string_byte_to_char (string, val)); } -DEFUN ("string-match", Fstring_match, Sstring_match, 2, 3, 0, +DEFUN ("string-match", Fstring_match, Sstring_match, 2, 4, 0, doc: /* Return index of start of first match for REGEXP in STRING, or nil. Matching ignores case if `case-fold-search' is non-nil. If third arg START is non-nil, start search at that index in STRING. -For index of first char beyond the match, do (match-end 0). -`match-end' and `match-beginning' also give indices of substrings -matched by parenthesis constructs in the pattern. -You can use the function `match-string' to extract the substrings -matched by the parenthesis constructions in REGEXP. */) - (Lisp_Object regexp, Lisp_Object string, Lisp_Object start) +If INHIBIT-MODIFY is non-nil, match data is not changed. + +If INHIBIT-MODIFY is nil or missing, match data is changed, and +`match-end' and `match-beginning' give indices of substrings matched +by parenthesis constructs in the pattern. You can use the function +`match-string' to extract the substrings matched by the parenthesis +constructions in REGEXP. For index of first char beyond the match, do +(match-end 0). */) + (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, + Lisp_Object inhibit_modify) { - return string_match_1 (regexp, string, start, 0); + return string_match_1 (regexp, string, start, 0, NILP (inhibit_modify)); } -DEFUN ("posix-string-match", Fposix_string_match, Sposix_string_match, 2, 3, 0, +DEFUN ("posix-string-match", Fposix_string_match, Sposix_string_match, 2, 4, 0, doc: /* Return index of start of first match for Posix REGEXP in STRING, or nil. Find the longest match, in accord with Posix regular expression rules. Case is ignored if `case-fold-search' is non-nil in the current buffer. -If third arg START is non-nil, start search at that index in STRING. -For index of first char beyond the match, do (match-end 0). -`match-end' and `match-beginning' also give indices of substrings -matched by parenthesis constructs in the pattern. */) - (Lisp_Object regexp, Lisp_Object string, Lisp_Object start) + +If INHIBIT-MODIFY is non-nil, match data is not changed. + +If INHIBIT-MODIFY is nil or missing, match data is changed, and +`match-end' and `match-beginning' give indices of substrings matched +by parenthesis constructs in the pattern. You can use the function +`match-string' to extract the substrings matched by the parenthesis +constructions in REGEXP. For index of first char beyond the match, do +(match-end 0). */) + (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, + Lisp_Object inhibit_modify) { - return string_match_1 (regexp, string, start, 1); + return string_match_1 (regexp, string, start, 1, NILP (inhibit_modify)); } /* Match REGEXP against STRING using translation table TABLE, -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 05:40:31 2021 Received: (at 33414) by debbugs.gnu.org; 5 Sep 2021 09:40:31 +0000 Received: from localhost ([127.0.0.1]:49244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mModb-0003Zv-Ci for submit@debbugs.gnu.org; Sun, 05 Sep 2021 05:40:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mModZ-0003Zh-Ld for 33414@debbugs.gnu.org; Sun, 05 Sep 2021 05:40:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59002) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mModT-0001Ix-Uh; Sun, 05 Sep 2021 05:40:24 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1585 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mModR-0007bD-Iu; Sun, 05 Sep 2021 05:40:23 -0400 Date: Sun, 05 Sep 2021 12:40:25 +0300 Message-Id: <83v93ftl6e.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87eea3nzel.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 05 Sep 2021 11:29:38 +0200) Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 33414 Cc: p.stephani2@gmail.com, 33414@debbugs.gnu.org, pipcet@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 (---) > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , Pip Cet , > 33414@debbugs.gnu.org > Date: Sun, 05 Sep 2021 11:29:38 +0200 > > Philipp writes: > > >> `inhibit-changing-match-data' just seems like a bad interface to me. > > > > Yes, using a public dynamic variable (i.e., public global mutable > > state) to influence the behavior of a function is normally a bad idea. FWIW, I don't share the above view. We bind variables to affect behavior of functions all over the place, and that is perfectly okay, IMO. > -@defun looking-at regexp > +@defun looking-at regexp &optional inhibit-save ^^^^^^^^^^^^ A typo? > --- a/lisp/auth-source.el > +++ b/lisp/auth-source.el > @@ -1447,12 +1447,13 @@ auth-source-netrc-saver > `auth-source-netrc-cache' to avoid prompting more than once." > (let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add))) > (cached (assoc key auth-source-netrc-cache))) > - > + (message "hello 2 %s" cached) > (if cached > (auth-source-do-trivia > "auth-source-netrc-saver: found previous run for key %s, returning" > key) > (with-temp-buffer > + (message "hello 3 %s" file) > (when (file-exists-p file) > (insert-file-contents file)) > (when auth-source-gpg-encrypt-to > @@ -1472,8 +1473,11 @@ auth-source-netrc-saver > (done (not (eq auth-source-save-behavior 'ask))) > (bufname "*auth-source Help*") > k) > + (message "hello 3 %s %s" auth-source-save-behavior done) > (while (not done) > + (message "hello 3.5") > (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) > + (message "hello 4 %s" k) > (cl-case k > (?y (setq done t)) > (?? (save-excursion Debugging code left-overs? > +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1") Really? why obsolete it? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 05:46:02 2021 Received: (at 33414) by debbugs.gnu.org; 5 Sep 2021 09:46:03 +0000 Received: from localhost ([127.0.0.1]:49261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMoiv-0004er-SG for submit@debbugs.gnu.org; Sun, 05 Sep 2021 05:46:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMoit-0004YX-Sr for 33414@debbugs.gnu.org; Sun, 05 Sep 2021 05:46:00 -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=4kt5oS7sZ9c7odvi/oA9EvjXXjQlXiqzloJx/yUWOdg=; b=YbiOEcxMpOFISJYEWmo8ioy2wy cusVUrlE6VS7zm4zfpGxl//u8IxJvMnnapQRez0dscnz85qHGojA3y7WZx69qRWp2FXrgWHzFzMR6 schWY7JWTfnf1pzPMlbhRkycO8ALNEafbBDYVXFpSZVEhflMibpV0wf8YZrKmooaMGyw=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mMoil-00042u-6S; Sun, 05 Sep 2021 11:45:53 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> <83v93ftl6e.fsf@gnu.org> Date: Sun, 05 Sep 2021 11:45:50 +0200 In-Reply-To: <83v93ftl6e.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Sep 2021 12:40:25 +0300") Message-ID: <87v93fmk35.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Eli Zaretskii writes: > FWIW, I don't share the above view. We bind variables to affect > behavior of functions all over the place, and that is perfectly okay, > IMO. This one leads to really hard to debug problems, though. 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: 33414 Cc: p.stephani2@gmail.com, 33414@debbugs.gnu.org, pipcet@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 (---) Eli Zaretskii writes: > FWIW, I don't share the above view. We bind variables to affect > behavior of functions all over the place, and that is perfectly okay, > IMO. This one leads to really hard to debug problems, though. >> -@defun looking-at regexp >> +@defun looking-at regexp &optional inhibit-save > ^^^^^^^^^^^^ > A typo? Yup. I changed the name of these parameters five times while writing the patch. >> +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1") > > Really? why obsolete it? Because it's not used (and shouldn't be used). `save-match-data' is the proper way to achieve this in normal code. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 05 05:55:06 2021 Received: (at 33414) by debbugs.gnu.org; 5 Sep 2021 09:55:06 +0000 Received: from localhost ([127.0.0.1]:49277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMori-000680-1F for submit@debbugs.gnu.org; Sun, 05 Sep 2021 05:55:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMorf-00067M-Vu for 33414@debbugs.gnu.org; Sun, 05 Sep 2021 05:55:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59192) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMora-0005H9-BB; Sun, 05 Sep 2021 05:54:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2648 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMorZ-0000Uv-Va; Sun, 05 Sep 2021 05:54:58 -0400 Date: Sun, 05 Sep 2021 12:55:00 +0300 Message-Id: <83r1e3tki3.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87v93fmk35.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 05 Sep 2021 11:45:50 +0200) Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> <83v93ftl6e.fsf@gnu.org> <87v93fmk35.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 33414 Cc: p.stephani2@gmail.com, 33414@debbugs.gnu.org, pipcet@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 (---) > From: Lars Ingebrigtsen > Cc: p.stephani2@gmail.com, pipcet@gmail.com, 33414@debbugs.gnu.org > Date: Sun, 05 Sep 2021 11:45:50 +0200 > > >> +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1") > > > > Really? why obsolete it? > > Because it's not used (and shouldn't be used). `save-match-data' is the > proper way to achieve this in normal code. It's a variable we had since Emacs 23. The proposed replacements are only useful if your Lisp program actually calls the APIs you propose to extend, but it won't do if you call higher-level APIs. We can recommend not to use the variable where the extended APIs could be used instead with the new optional argument, but I don't think we should obsolete it, let alone remove it in the future. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 14:49:59 2021 Received: (at 33414) by debbugs.gnu.org; 7 Oct 2021 18:49:59 +0000 Received: from localhost ([127.0.0.1]:48443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYSs-0000HG-R0 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 14:49:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYSr-0000H3-Ck for 33414@debbugs.gnu.org; Thu, 07 Oct 2021 14:49:57 -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=isXeqEh0QKyAfYlOs8K09NUSTNHt3FawC+44D0hbnlQ=; b=WxDY4cVj2WQ0DxHo9X8YALgrwG quyMjU3xHMwmrdtjB/mWU16ALPrP91cA1Vk/ZHuzRVfmHfAuqDrsJ2dXlKEVHj7FQthkaqzVlkMRD XUULPAQrxX0Tj3TvCb7mCSkwAFuyVSOc51NpBQ1yNfSWNIuFFgUl4ajpqFdHJJ5x8ywc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYYSh-00029g-Ra; Thu, 07 Oct 2021 20:49:50 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> <83v93ftl6e.fsf@gnu.org> <87v93fmk35.fsf@gnus.org> <83r1e3tki3.fsf@gnu.org> X-Now-Playing: Tuxedomoon's _Desire_: "Music #1" Date: Thu, 07 Oct 2021 20:49:47 +0200 In-Reply-To: <83r1e3tki3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Sep 2021 12:55:00 +0300") Message-ID: <87mtnksm9g.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: Eli Zaretskii writes: > It's a variable we had since Emacs 23. The proposed replacements are > only useful if your Lisp program actually calls the APIs you propose > to extend, but it won't do if you call higher-level APIs [...] 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: 33414 Cc: p.stephani2@gmail.com, pipcet@gmail.com, 33414@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 (---) Eli Zaretskii writes: > It's a variable we had since Emacs 23. The proposed replacements are > only useful if your Lisp program actually calls the APIs you propose > to extend, but it won't do if you call higher-level APIs. That's true, but the variable was only used a single place (in addition to in looking-at-p and string-match-p) so it seems unlikely that anybody is going to miss it. So I've made it obsolete in Emacs 29. We'll see whether anybody complains. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 14:50:04 2021 Received: (at control) by debbugs.gnu.org; 7 Oct 2021 18:50:04 +0000 Received: from localhost ([127.0.0.1]:48447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYSy-0000I0-1z for submit@debbugs.gnu.org; Thu, 07 Oct 2021 14:50:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYSw-0000H9-NY for control@debbugs.gnu.org; Thu, 07 Oct 2021 14:50:03 -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=tNsYVMAICkEkmqZdowvlH90iDVe0T+l+/8E2s2juP38=; b=n5nvLaY/ROzv7eB+cRylPn0kFr fNPnbUyPVcBq0DnoN/VLM5CO2BYvXjq99jSkWvUyjReJUC1zAESVNk2981+5PF2O0j6Jbmnrcxaww Fere+aY5l/Yij9uj3f3XlA9goo4GND5fxOvLgd//SAFMDK+8voB9bDBdximVopGA59kg=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYYSo-00029s-Tn for control@debbugs.gnu.org; Thu, 07 Oct 2021 20:49:56 +0200 Date: Thu, 07 Oct 2021 20:49:54 +0200 Message-Id: <87lf34sm99.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #33414 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 33414 29.1 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 33414 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 15:08:03 2021 Received: (at 33414) by debbugs.gnu.org; 7 Oct 2021 19:08:03 +0000 Received: from localhost ([127.0.0.1]:48468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYkM-0002t4-O9 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 15:08:02 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:22140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYkH-0002sc-MO for 33414@debbugs.gnu.org; Thu, 07 Oct 2021 15:08:01 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 197IHvob014733; Thu, 7 Oct 2021 19:07:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=n2LJb2gGbQMVONL4jRUZm/818iFRVpMVgLCbD5Xlyg0=; b=I8Lklp52bbQwYxZHzaoaftcbFosOah/sgaAPWiz9bpcYa4vK/0KJF5O1btErsNKTeiEd biKUFTbP3iFyNDVFFtS9fC8vOdlfCb35pnAOjdahtTL8eU1TKebcubQNGYNNiDeG5ff8 EVY0Ir9KdAoPCzRu2AIVilrie8k1mDG7oU7GoJ9PP/tqCpsxIliU/kV4/OGBr8q8TuTt 4L7LNBbyzp+pYAcdW/e7F1g/bUiL0NHciMmtD6ls9dkC5foBxGOEZPMP4pxzXIoAEqOd t/sFH5S9XB9byxJhgPT5C039/IB8HvgOkEar7xvGN7I7wsNtB8P+jWIeus0x4X2LokYD 6A== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bj02jk5us-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 19:07:55 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 197J0Seu002219; Thu, 7 Oct 2021 19:07:54 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by aserp3020.oracle.com with ESMTP id 3bev91f9h2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Oct 2021 19:07:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=An8KRqZ31Rz0QwkocKOXVFIopQDLCfe2qgN4vy4fWq6hlgPQVPztpv2aJXcj92OoFtL8SMlKpckWk74DJLkT8tFuVjOiohnU3jBO+et4vcUMckHAWZbeuF6yZHVx+cgTBRq5JoNCgGowbw8Z09jer+C8tSG/IuDaF3h0o7KguM9o1n/60HclSWylf5yzAZJfY47eunDF71DjbmvSPnwtBZPWuJqQYYxd7hRM0RioURT9JJNBcvdwzHgbDrChKW7sAVX1/OVEr4FzonfysemaPpGUo6L+7cNkEzhcQr+V1kH9GQcg5aR/gtysrvBxKoXrzf9QpeMqbQOg7HUDDQA4pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=n2LJb2gGbQMVONL4jRUZm/818iFRVpMVgLCbD5Xlyg0=; b=F9p7iX+f9lA0dYgq5jFdhVuNKisBkAju+QOf7tWuooMgQ9u3/Jam6T5ZDtX23mc+YGgWZp+x0HoEWTltsyBqS9Gx1ihOC51sxk6sIwLmUjqqtR/4U0CVjY1LB5MqmGroSaYsFRJeEtNdzqJhCRn8HPKk/xxqgUqleS3m5IQnnAG4D0G2uMc6C/sC06pWZnP9OWCzpi7z45vhgxx6XDJoYjZQZSXb/DHAdcsKIDQmOlJWmFhQjMfoSfgb1aWGG6Zmiumgu8hh+YsJu5SXFl6o7NXzMUXkksDEYtmF8ybG6Tz1ZXj8n/AXjzG5HAsYJa47gjtCCTzoG4/AjI2OEKCJKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n2LJb2gGbQMVONL4jRUZm/818iFRVpMVgLCbD5Xlyg0=; b=Icif5CphioizYAcLpUAkK6jQ87ONME4nRlSSIXSCoAX5wWV0KqOYlyV21AM6mptji9xbgx9O0qu7/t2h/rSGlFHlm/n1DdAylrXAyRcD/VR2AM6PYJqHBMvL61Wo6/d++ULTYLfBBGVq0zqw9JFkWS0n84PHzj4a2IAK973xZiU= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3558.namprd10.prod.outlook.com (2603:10b6:a03:122::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Thu, 7 Oct 2021 19:07:52 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4566.022; Thu, 7 Oct 2021 19:07:52 +0000 From: Drew Adams To: Lars Ingebrigtsen , Eli Zaretskii Subject: RE: [External] : bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Thread-Topic: [External] : bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at Thread-Index: AQHXu6wte3wsnyw7YUCg0jcjRmVil6vH5GNw Date: Thu, 7 Oct 2021 19:07:51 +0000 Message-ID: References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> <83v93ftl6e.fsf@gnu.org> <87v93fmk35.fsf@gnus.org> <83r1e3tki3.fsf@gnu.org> <87mtnksm9g.fsf@gnus.org> In-Reply-To: <87mtnksm9g.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnus.org; dkim=none (message not signed) header.d=none;gnus.org; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dcbd4422-ff93-4bad-4b90-08d989c5c2dc x-ms-traffictypediagnostic: BYAPR10MB3558: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: G+boN6+Fx1xh6RrOAJ1C1lMNH4oKvPhS7aHSqe/Go1KhBMqmT2nQJ69IAlPc5NV898fitJ/pflXboYp3+6cCWlJbW+t0S5ScjZ/8aC8nXQatz3var3woMagEZNmG5CbT6ixjSyVmeY8nIb1HaKpNuU4Zgwp+1jIvajwOpDvFwKfo9B+Fa3z7OcPQ0/uGapvp4JEPws4XHITCru7mER55D3JL7fRtzR2cSipHTzAzr5q4+YFWIY/4bct9hUOQ9EkUH6D8yQGfK2hGMwYcfDLAw8gKHZy4xvi8EnNVwFyLEzfeuZNTLokRN/wh7QVolElKMFJWECFEunHHZs1i6pBiuXROyEcnP1OMCjGjxGTU7zaV0WVCTlOtOag/441FjUciyCoLbetaeQdeYBuLUc7EztPpP/tcfLOBpdwI0scQ8zXZnbtXJH5Ta8Vv7e/9KEWFTME5QyaOlngGwFOqkHwEGyCoYhJXkH5mTjk3/TToNmtcra5zhwi9tnKCRp060ybyS1bSLh8RIZpzClZ/Ftr5w2I7r5Topsmcwq6MFUDiC9rwNGrvd9tLmclH6s00DUxiGnZ9O/kgLB7f6TOiEa8wNg63artRyCRoIhYHTg21mhb7ciewhJUTWBy01e/+b4Q6EnH9Ve+/T5twIX+EVGaZkk2CdLaZNYO8IWk3eq4S6L9Px8nR8t0UlPx2cOMI7oaQpFWo5hRWY2NyhfAZm27agQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8676002)(33656002)(54906003)(316002)(52536014)(110136005)(8936002)(38070700005)(186003)(4744005)(26005)(4326008)(2906002)(86362001)(9686003)(55016002)(122000001)(5660300002)(38100700002)(508600001)(66446008)(64756008)(66946007)(66556008)(71200400001)(7696005)(76116006)(66476007)(6506007)(44832011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2Tf7o5CeuFFmvBAX1m7BUTfW/89wYEHSgmwdQIi5gE07FAASMBtl04LXk0TG?= =?us-ascii?Q?y57KIDtMMDTHD6QwaCXxkGT/HN8ROeWqrNROEtHczKX6TTSrjE6X1CQmq+eV?= =?us-ascii?Q?HnUzGeO7fcli9q7gg7+hUz8E2WhuUzlx+l/YdYCzVX3OCtE887HGNLIb2w8I?= =?us-ascii?Q?MxVXYA67Z/1gZI8yvudXanu987Ryd2AW8tf6Jgwa7YzJHhi6vy1c7X3iqNRa?= =?us-ascii?Q?Gt7qbbtUv0309LFaZRSolcOuq460h2pUsyOgZpzuN+ftrH8zYH4wF8iCHCJI?= =?us-ascii?Q?ZL9esOCOQVqORrDiot7JcBg9tsLAQzsqN6zqqA/ZGy7UK5/TIZHW4KBXEeW7?= =?us-ascii?Q?8tcxGE+O0ud1Mz4QQOFZJAjCqpWPSmlTz03yAWuV1pwjH/ISxib2hw+689YK?= =?us-ascii?Q?ksSwpBGQ+VxXZzAmDBVvaih80k8rf3zoDSx7bTtn+CQL49U4L/6owPc9Rh/v?= =?us-ascii?Q?dkFwLZmQDGOi4nvUp8rIzm8O8rgT9WZ1Xn7sytsvxfizrcWCdrAuonTuHUIm?= =?us-ascii?Q?kkkhCXYmzF97GAbbdeXPdGOjChYzQZ1cCHtpkNig5F7CGoxwhh8sLOkPT1O+?= =?us-ascii?Q?dm858jqh3YUy95gk+oqkH0uHZ7Q2O7EZAdacUPq0PwsWdernsJpd9wH4pT74?= =?us-ascii?Q?Q11QWEKa18YMCv8V4imtj4PdE6yazxQgC45BX/WH5xLUJxmCXgMCTf6kJ9EU?= =?us-ascii?Q?ZegC/ZoXXtFQxYAUuYg6F7BJRRSMWO6dUsfFvM3CKvcvYRDZTV48VzBx4OfW?= =?us-ascii?Q?cjKYG0fBvTM5Tv8cI+JDgKvmgBC/CWy8Cs/nt/gUZF5Bog8njtBZdblbkGb2?= =?us-ascii?Q?bAJbTszepX9Fp1QDLpKi+F6+ngRZR5I5/2qSAqMfkCzMYxt/KFXsgmaUatWZ?= =?us-ascii?Q?K3b3IFRglcK2a1qltpofXQ+LheTgW5RUgoXEQavi34uh+1MrXrD+S0+pxa6d?= =?us-ascii?Q?i9FNk4R4T6TkRV087tSueG5F1c0Pm0mMe0adfaGkz2e6y2kh1FuhyY8f1cbW?= =?us-ascii?Q?FUZHrrjEn3S4Tsses0zYgt4TIYG1V3UPOQ4HENPRFStZ8G82rziOHeO5X+Qg?= =?us-ascii?Q?Chzm2g9tg4tzngKa38OOadL12fgJqXzFehHhWpoBua2RvK17dIoN0u4ooz1i?= =?us-ascii?Q?4fhNvnc1vaYtEdI/LenlY7Mnnd1npe6Ypo6G2djFlPFYNE70+GxCOmdGMhuE?= =?us-ascii?Q?r0hKp6s9gk/otffp/l1Me3SlTf+y5/GWKtLqWQ9sOc4Gi1KwZLJxdizorg2x?= =?us-ascii?Q?rCmOXlqsmwJbSFz2E/A5yr49iiymQ+oKhrGDXekSFcSnsLgQ3k7yEnkCmJbK?= =?us-ascii?Q?zWbQ0XnW6VxPXGnDGuXL46q5?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcbd4422-ff93-4bad-4b90-08d989c5c2dc X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2021 19:07:51.9131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7ymsAJEMkhikF99f78y6yvYxjXt211YDHVvRO/4P1hngcQDsjtolmvKSgguON1Y4u10iHGpIdNsOfJDpbbL+xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3558 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10130 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=671 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110070123 X-Proofpoint-ORIG-GUID: WZnIyWegAm_ZqTThmttFYgARfrocBEKC X-Proofpoint-GUID: WZnIyWegAm_ZqTThmttFYgARfrocBEKC X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33414 Cc: "p.stephani2@gmail.com" , "pipcet@gmail.com" , "33414@debbugs.gnu.org" <33414@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 (-) > > It's a variable we had since Emacs 23. The proposed replacements are > > only useful if your Lisp program actually calls the APIs you propose > > to extend, but it won't do if you call higher-level APIs. >=20 > That's true, but the variable was only used a single place (in addition > to in looking-at-p and string-match-p) so it seems unlikely that > anybody is going to miss it. >=20 > So I've made it obsolete in Emacs 29. We'll see whether anybody > complains. Why suppose that it's sufficient to search Emacs's own source code, and then proclaim that somthing isn't used anywhere "only used in a single place"? FWIW, I use it. I'll need to know what the replacement is. (I presume it's just `save-match-data'.) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 15:11:18 2021 Received: (at 33414) by debbugs.gnu.org; 7 Oct 2021 19:11:18 +0000 Received: from localhost ([127.0.0.1]:48472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYnW-0002xj-9n for submit@debbugs.gnu.org; Thu, 07 Oct 2021 15:11:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYYnQ-0002xR-H7 for 33414@debbugs.gnu.org; Thu, 07 Oct 2021 15:11:17 -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=OTD+fsOK0CiqlO5yIJUCHam4KLptnxm2tO7V6lvCnEk=; b=LP86FRF1CaWFII7h4xzpenJy2K ro16G34+3H2Xim++4AMMF7M+Tv9W12WE/UQYxpxEBGG8bLxeRYFi8VdHVwjAY69nQ9bxt4B3AYeO7 QBzWp/eA2kbeFJsKHXiN/AiNWiygkOf1LTNJthMalkB21at1Kpbhbn4QXQzHdmhVYSEo=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYYnG-0002JH-0i; Thu, 07 Oct 2021 21:11:05 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: [External] : bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at References: <83lg5ru88i.fsf@gnu.org> <83k1lbu5xj.fsf@gnu.org> <87r1eylsea.fsf@gnus.org> <22C40A08-9611-4925-B840-8F3795175B0F@gmail.com> <87eea3nzel.fsf@gnus.org> <83v93ftl6e.fsf@gnu.org> <87v93fmk35.fsf@gnus.org> <83r1e3tki3.fsf@gnu.org> <87mtnksm9g.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUZKTEZKTIkOkUt SVdNU2JJc4v////jk2ZGAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UKBxI3MPRG5w8AAAG6SURBVDjL lZNNkhoxDIVl4ACWMgdoyxwgWMwesDlAKvT9rzKS7G7oYbKIiuqFPz/9WA8A4lzYgiJsgkmYRWoi ZJp2EeK0m/R8l1QgIn+v5SYfUuRWc5HrpILMWUG9nv6U/eGSW91fjucISJZfQZMsR9HbWT+/JkDM DiQjEMbDbxXsLwyQhkIYrZVju7Xc2g2AnKxAPq6H1upFFcheXIHNcaz13Ko0AEwdFEaThEi7PuiS iDm5JPjPBnfACwjaZnwB/loYgycLAb8BtDyKY3QgJS+59BA1VsDSNdqXA5cq8LaMJAQc0WuMQZTE odDOeBTRjyULq4T6g4iM6VeAG5D+BTgtuXQfBnhh6UXhgy+At+AZRSW0gPxKVEKsWzWXrIe2u6K3 bWZT8BO0nsvBWKG2aqDKBvSQdp8ftbyDfL7PcxsSCOMUEzp4SJk6oL5VDRIFc5WTXX4HXmULMH8q mFvVKk8AagQ6z060PkP/D/qWYYCHnAzgSGVey/cOigPivjiT2PA6vSQCL5LMBObcvL6xefIJujWK Ld+AEregVfHEaqQEneh1B2BWhNGL+zVCQHiLfj3AT/Hz6X/FFzD4giiy6Z5hAAAAJXRFWHRkYXRl OmNyZWF0ZQAyMDIxLTEwLTA3VDE4OjU1OjQ4KzAwOjAwZP3UgQAAACV0RVh0ZGF0ZTptb2RpZnkA MjAyMS0xMC0wN1QxODo1NTo0OCswMDowMBWgbD0AAAAASUVORK5CYII= X-Now-Playing: Tuxedomoon's _Desire_: "Again" Date: Thu, 07 Oct 2021 21:11:01 +0200 In-Reply-To: (Drew Adams's message of "Thu, 7 Oct 2021 19:07:51 +0000") Message-ID: <878rz4sla2.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: Drew Adams writes: > FWIW, I use it. I'll need to know what the replacement > is. (I presume it's just `save-match-data'.) Yup. 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: 33414 Cc: "pipcet@gmail.com" , Eli Zaretskii , "p.stephani2@gmail.com" , "33414@debbugs.gnu.org" <33414@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 (---) Drew Adams writes: > FWIW, I use it. I'll need to know what the replacement > is. (I presume it's just `save-match-data'.) Yup. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 14:24:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Nov 2021 11:24:05 +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