From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#58839: [Patch] Re: bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running Date: Tue, 01 Nov 2022 14:00:54 +0000 Message-ID: <87edumg4fd.fsf@posteo.net> References: <87sfj8umwb.fsf@posteo.net> <8e31a89d-e35e-6dd0-a8e3-f0b9684c8bfa@yandex.ru> <87v8o3wgq1.fsf@gmail.com> <87ilk2x1si.fsf@gmail.com> <871qqq7l9p.fsf@posteo.net> <87eduqwekz.fsf@gmail.com> <87wn8invbx.fsf@posteo.net> <877d0iw8iq.fsf@gmail.com> <837d0hhlke.fsf@gnu.org> <46ff0065-5645-ef1e-2621-242fb6a73f98@yandex.ru> <87v8o0uxn5.fsf@gmail.com> <787a4362-7ff5-7dbb-9118-16e4bee5f328@yandex.ru> <87edunvhf2.fsf@gmail.com> <6d4d9e72-1bae-4d64-b7c1-c2b9c11e396f@yandex.ru> <87tu3jgdbv.fsf@posteo.net> <87h6zihq3q.fsf@posteo.net> <877d0ehlnb.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25623"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , manuel.uberti@inventati.org, 58839@debbugs.gnu.org, Dmitry Gutov To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 01 18:23:12 2022 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 1opuym-0006US-Km for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Nov 2022 18:23:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oprqW-0006cQ-Re; Tue, 01 Nov 2022 10:02:28 -0400 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 1oprq9-0006ap-EC for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 10:02:27 -0400 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 1oprq6-0006HF-KV for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 10:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oprq6-0003HR-33 for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 10:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Nov 2022 14:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58839 X-GNU-PR-Package: emacs Original-Received: via spool by 58839-submit@debbugs.gnu.org id=B58839.166731126412541 (code B ref 58839); Tue, 01 Nov 2022 14:02:02 +0000 Original-Received: (at 58839) by debbugs.gnu.org; 1 Nov 2022 14:01:04 +0000 Original-Received: from localhost ([127.0.0.1]:43941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oprpA-0003GD-5e for submit@debbugs.gnu.org; Tue, 01 Nov 2022 10:01:04 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:60671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oprp7-0003FZ-7I for 58839@debbugs.gnu.org; Tue, 01 Nov 2022 10:01:02 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 73BF0240104 for <58839@debbugs.gnu.org>; Tue, 1 Nov 2022 15:00:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667311255; bh=5EVYzVr8SRK6BFjdPIb5C+crEl8LXYBRXsj8pIZCzjA=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=HXrPloGg8+e5vWftbVpxYsAcoGWG2HkTZsYADL9qhG4oF3zWxh7X8HNrssq8Ogxvx K4OhKrqCE821EOm2eH8wJpn/W7MqHnlahfAw7xuI8JdRxYNs7GPhz8mfqn7p8iu/qg g4fBG4u3OUyjrar0naSmEVuCPU9SQW3/KAF0s2rJt+uVx+EUKcU7dgfacHIE1yGUO3 fj+f/qIw2i884xseTyYb/vhuMx78Q8ZbAgfqHlDs3CrBmIjDRYdOiZ6Zk16ZI29FAx +3FRW0/L1B+qlBuZE3UliZfLH2ZIxzPZg0UagZohnhFP0nUIcPENq97LAWbwIvpp/w yd+uVUxef6dgA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N1s9y3196z9rxY; Tue, 1 Nov 2022 15:00:54 +0100 (CET) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Tue, 1 Nov 2022 13:37:58 +0000") Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246788 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > I haven't studied your code in depth, but it seems like you're giving > `match-buffers/compiled` benchmark 10 times the work you're giving to > the other function, which would explain why it's 10x slower. > You are absolutely right, I re-ran the tests the right way and got these results: --8<---------------cut here---------------start------------->8--- (benchmark-run 1000 (match-buffers sample-condition)) ;; =3D> (25.052781603 265 16.678798381999997) (benchmark-run 1000 (match-buffers/compiled sample-condition)) ;; (30.021295067 335 21.01291473699999) --8<---------------cut here---------------end--------------->8--- > The byte-compiler (or the native compiler) can't really optimize the > mini-language more magically. It can only optimize elisp. Of course, I don't get why it should? > My idea of using the byte-compiler to do this is different: it entails > translating the mini-language to elisp first and then byte-compiling > that. But it is a technique that I think your code isn't applying > or at least not correctly (though I haven't read all of it: I will soon). What I am doing is translating it into lambda expressions, but I could also try out translating it into an s-expression and passing that to `eval'... > You can see eglot's "glob matching" section for the application of > such a technique the "glob" minilanguage that is required by LSP (iow > it wasn't "invented by me" ;-) )