From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#58950: [PATCH] * lisp/subr.el (buffer-match-p): Optimise performance Date: Thu, 5 Jan 2023 14:49:17 +0200 Message-ID: <12687b52-fac4-adf9-a135-e203d1b8eb77@yandex.ru> References: <875yfyebi0.fsf@posteo.net> <87a6331xts.fsf@posteo.net> <9614ebe2-4cf1-30d9-55d2-71a0488f0c2e@yandex.ru> <83k021xzio.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: philipk@posteo.net, 58950@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 13:50:41 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDPhh-0006Ub-Mi for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 13:50:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDPhN-0003Cm-Rf; Thu, 05 Jan 2023 07:50:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDPh6-00039S-DR for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 07:50:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDPh5-0006cd-2Y for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 07:50:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDPh4-000620-Fs for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 07:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2023 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58950 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58950-submit@debbugs.gnu.org id=B58950.167292296823135 (code B ref 58950); Thu, 05 Jan 2023 12:50:02 +0000 Original-Received: (at 58950) by debbugs.gnu.org; 5 Jan 2023 12:49:28 +0000 Original-Received: from localhost ([127.0.0.1]:50487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPgV-000614-Vz for submit@debbugs.gnu.org; Thu, 05 Jan 2023 07:49:28 -0500 Original-Received: from mail-ej1-f51.google.com ([209.85.218.51]:45781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPgT-00060p-Tu for 58950@debbugs.gnu.org; Thu, 05 Jan 2023 07:49:26 -0500 Original-Received: by mail-ej1-f51.google.com with SMTP id fc4so89706948ejc.12 for <58950@debbugs.gnu.org>; Thu, 05 Jan 2023 04:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=CQUkgQpKvgKp1yG9uqY+PpLJl+7I8M7fhZ+hW5XlijQ=; b=KWFjy+1BtZrN24jrmep249dOOJ7h63a4yPCsIi3cp0xc+fwzxNBzK/+a/UZmqdiNd8 br42H2ntic2rU06jHYfALUqbigAXCfp1TvcQxQE0lPGATU0ZZMu6wfV0w9QTiDrC9NKa U4GB8pRKmkOScSS1D4EQI1bMU+ywSWhSx8Y0pJ6mArAuo5iTL6OpJ/4T6MCcCOnTCsGd RDfoU1FWxl/NbvYlIDKKaVyTEJ6PKBUHQvFi98GkloBaKXWyrE2Z7HwFXx47ciJHLPtG PTHQtWjp2m4PNAXET+GhLzkR4hl42H6cDBOIzqi0O7Q3/BfNAa+UMg8fADht6AywKkSM 5Shw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CQUkgQpKvgKp1yG9uqY+PpLJl+7I8M7fhZ+hW5XlijQ=; b=GZo+vksSX1yXqt4pE6VlKxr7PG2o4q9BxfYcJDL7Kso9EhuDhDIPe67/H3pKaLn0Wz 3vgsM2QsKdqIFXqz4N2QZ0YdIEfVAyWYl9F4DK2QmxJUyctvYw5ujh3qmXCSywp/Tt98 nraoV1sTa9LYAmOCiWceKIqw4tmOcbWjyMpW8oTpo8i2ZAoQLaMRxVrXCX231cCu+n3p ijeXpfDZIf+MamWK3zrMyo62IR46S/XvRJtEVxU6EjMdOhUBEfqIatS7Osh2mrr1runj qXIMXvoz93BEeGjjmzcg020ysD2MNVv9gWhTniZEn782kxa+1cN9gyuFw2yUrw/TqueJ 6Bmg== X-Gm-Message-State: AFqh2krJgNkwvmmA3MpOrjnjYzY/Tt21QfXi/nU2gFmaQk6aLEPaH8+n tohsXOeKyY4qRLbA8Ab7Q20= X-Google-Smtp-Source: AMrXdXurW7QoQmiCTkmsrTwN7yAuLE9KFVAfNn0gEVE5Nizc0uxnDMKbW7+HmGyzk9jW1jSfHFpbxA== X-Received: by 2002:a17:906:4cd2:b0:7c0:e5c6:2a74 with SMTP id q18-20020a1709064cd200b007c0e5c62a74mr41011712ejt.34.1672922959784; Thu, 05 Jan 2023 04:49:19 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id t15-20020a170906608f00b0078d9cd0d2d6sm16806097ejj.11.2023.01.05.04.49.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Jan 2023 04:49:19 -0800 (PST) Content-Language: en-US In-Reply-To: <83k021xzio.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252594 Archived-At: On 05/01/2023 08:32, Eli Zaretskii wrote: >> Cc:58950@debbugs.gnu.org >> Date: Thu, 5 Jan 2023 02:02:06 +0200 >> From: Dmitry Gutov >> >> On 31/12/2022 15:56, Philip Kaludercic wrote: >>> I'd like to backport the >>> changes from bug#58951 and apply them since they are fixing an actual bug. >> Speaking of backporting, though, could you address Eli's last message in >> bug#58951? Also, he seems to have reverted the change in the code, but >> not in the docstring. > I hoped the problem would be fixed very soon after the revert. If > this is not going to happen, please adjust the doc string, or tell me > how to do that. Looking more into it, it actually seems like the current code and doscstring work okay together. The original description of bug#58951 seems a little confused, given that show-paren-predicate was already written in the style (not CONDITION) and buffer-match-p was apparently working fine with it already. The revert that you did brought the previous (working) code back. The dosctring was problematic because it didn't quite match the behavior, and Philip's change fixed that. The dosctring can say (as it does now) that * `not': the cadr is interpreted as a negation of a condition. or it could more accurately say * `or': the cdr is a list of recursive conditions, of which at least one has to be met as project-kill-buffer-conditions does. These two descriptions are compatible, however, as long as one only puts 1 item in said list. So we can sweep the difference under the rug as "implementation details". And maybe there's nothing more to do in there. Philip's patch in this bug, however, (the "Optimise performance" one) changes the semantics of 'not' in a way that would require us to change show-paren-predicate to '(not . (derived-mode . special-mode)). I'm not sure if it's intended or not. Let's see what he says on that.