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#54296: Add buffer-matching functionality Date: Wed, 15 Jun 2022 14:54:14 +0300 Message-ID: <155d8f8f-73ef-7aad-9c48-4fed2e6e25a7@yandex.ru> References: <87ee3d4cli.fsf@posteo.net> <87k0d35c82.fsf@gnus.org> <877d92unqn.fsf@posteo.net> <83bkyednvx.fsf@gnu.org> <87cziudmyg.fsf@posteo.net> <838rtheogd.fsf@gnu.org> <87ilskbgul.fsf@posteo.net> <83ilskcp9i.fsf@gnu.org> <87v8whio1a.fsf@posteo.net> <83czipkylw.fsf@gnu.org> <8335g8vk0x.fsf@gnu.org> <9e53bb47-9e20-2465-28e5-0e0a64d7ae44@yandex.ru> <83mtefrr5v.fsf@gnu.org> <61d3ee65-325e-9da6-67cc-c0b0dade5dac@yandex.ru> <83h74mslhi.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="15805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: 54296@debbugs.gnu.org, philipk@posteo.net, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 15 13:56:16 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 1o1Rd9-0003uk-35 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Jun 2022 13:56:15 +0200 Original-Received: from localhost ([::1]:55052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1Rd7-0005IT-KB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Jun 2022 07:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1Rby-0005Hn-Ab for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2022 07:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1Rbx-0007lK-SP for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2022 07:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1Rbx-0006zs-Rk for bug-gnu-emacs@gnu.org; Wed, 15 Jun 2022 07:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Jun 2022 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54296 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54296-submit@debbugs.gnu.org id=B54296.165529406526844 (code B ref 54296); Wed, 15 Jun 2022 11:55:01 +0000 Original-Received: (at 54296) by debbugs.gnu.org; 15 Jun 2022 11:54:25 +0000 Original-Received: from localhost ([127.0.0.1]:36703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1RbM-0006yt-M6 for submit@debbugs.gnu.org; Wed, 15 Jun 2022 07:54:25 -0400 Original-Received: from mail-ed1-f44.google.com ([209.85.208.44]:38838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1RbL-0006yh-E3 for 54296@debbugs.gnu.org; Wed, 15 Jun 2022 07:54:24 -0400 Original-Received: by mail-ed1-f44.google.com with SMTP id c2so15761138edf.5 for <54296@debbugs.gnu.org>; Wed, 15 Jun 2022 04:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Z0dRJyIhHLGv0A0wy88ZFyAPzfKuUK8AckJwUaJsnt0=; b=mOVPdSlUyNZK7O2RXgEJjXgX+FAfLLnEUFJN1Dctm04TUDFKyKJn4WxvS5V6ERV4SD HIpsHeU2Y0yuHjdhxASwJb3QKXsQxnzf7QHGUdSW3LsHk5YPBqxbcMj78o9XsrEXtFyY YKPm/CuLMe8Q0YQXqVEEQAEeX1RguOCzzpWBU2c7Dh147n2V0jo3rz+902K+99Y+tafh GUo26lRsIA9KnpMAkGhoY6iIQIqpBi1gTguNxXVVQ9DNXv8D8VF1YWILiJKTWiakEzO6 fwjj0LlXDR2cTriZ0phZptzemYPGt0MQE7VEO0xggmlYtXOd614sTPawyARNXmcANHD0 YEXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Z0dRJyIhHLGv0A0wy88ZFyAPzfKuUK8AckJwUaJsnt0=; b=lICaes7o8u3O/FtUz4t6fhVzrVBlJTM8JERoXPjZkRq07WS4le6XPVjMocSEU+qB/j +Yp/n4irkw/zPZVM7SQh91AvmA4ahLFOLPKpAFqznPVzoJvTc9pFqz73gcSQ+F+yN711 DzrwGiHP1Mg1k0dLjUbkQaLK+oHa66cAetnvRwoPI7ltqWshw1wck8OY0baw7Qnbxu3v Y4JYtAyW2i53e+W5+qNu6JxUZl55+tOvrQoN2Bofax4wb2H2UPh0oUMRIP+FuA7OP1NV k7uPaJ/EiqB8G8qkZByuL7VJpocY14ZxY5LH88moS/8oTlv4qkSbpfGhq68KOqPy66df UsPw== X-Gm-Message-State: AJIora9Dp5kuuQNSaTrH5qiFL/JmunXs2/9UhAHOo+5dtraojaZ6QvSx 1H7lFqgohTRCgrTuUbvhYIo= X-Google-Smtp-Source: ABdhPJzrGyix+3umj3o1IFs7SM0EY3oA4p+mo+WWoCyjTuJ2x4q7lWzVxY7VvBUueJSj3C/lJgmQEg== X-Received: by 2002:a50:fb99:0:b0:42d:e4fd:c368 with SMTP id e25-20020a50fb99000000b0042de4fdc368mr12260495edq.138.1655294057442; Wed, 15 Jun 2022 04:54:17 -0700 (PDT) Original-Received: from [192.168.236.48] ([173.237.64.48]) by smtp.googlemail.com with ESMTPSA id f22-20020a170906139600b006fec3b2e4f3sm6178937ejc.205.2022.06.15.04.54.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 04:54:17 -0700 (PDT) Content-Language: en-US In-Reply-To: <83h74mslhi.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" Xref: news.gmane.io gmane.emacs.bugs:234566 Archived-At: On 15.06.2022 05:34, Eli Zaretskii wrote: >> Date: Tue, 14 Jun 2022 22:46:49 +0300 >> Cc: 54296@debbugs.gnu.org, philipk@posteo.net, larsi@gnus.org >> From: Dmitry Gutov >> >> On 14.06.2022 22:17, Eli Zaretskii wrote: >>> No, I proposed to use the "predicate function" method (which already >>> exists). >> >> Then the downside is "it's not readable". Or editable, really. >> >> At this point you could say that we need to support lambas anyway (ok), >> and if people use them, we can use it for this purpose too. >> >> But it seems to me that, by not supporting lambdas so far, over the >> couple of years since its introduction, project-kill-buffer-conditions >> has kind of proven its minimal DSL to be viable. >> >> And if by having the 'major-mode eq' matcher we manage to avoid the use >> of lambdas in 99%+ use cases, then that's a win for usability. > > This is all a moot point, since eventually 'major-mode' was left in > the code. Any of the suggestions I had for removing it are therefore > purely academic at this point, nothing to argue about. 'major-mode' that was left works like 'derived-mode' did. If we take your suggestion as-is, though (and rename 'major-mode' back to 'derived-mode'), that would at least fix the main backward compatibility concern. And with that, we could go back to discussing the stuff I wrote above.