From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit Date: Sat, 25 Mar 2023 16:29:24 +0300 Message-ID: <83a601c62z.fsf@gnu.org> References: <87sfducmrc.fsf@gmail.com> <87o7oicgy4.fsf@gmail.com> <87wn365e3t.fsf@posteo.net> <87pm8yaq24.fsf_-_@gmail.com> <83fs9tc7o9.fsf@gnu.org> <878rfl3r7v.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3363"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, 62417@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 25 14:30:24 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 1pg3yS-0000ft-C1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 14:30:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg3yA-0003yr-KX; Sat, 25 Mar 2023 09:30:06 -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 1pg3y8-0003yQ-7Y for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:30:04 -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 1pg3y7-0004w7-VK for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pg3y7-0006kp-FL for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 09:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Mar 2023 13:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62417 X-GNU-PR-Package: emacs Original-Received: via spool by 62417-submit@debbugs.gnu.org id=B62417.167975097525899 (code B ref 62417); Sat, 25 Mar 2023 13:30:03 +0000 Original-Received: (at 62417) by debbugs.gnu.org; 25 Mar 2023 13:29:35 +0000 Original-Received: from localhost ([127.0.0.1]:42184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg3xe-0006je-Rv for submit@debbugs.gnu.org; Sat, 25 Mar 2023 09:29:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg3xc-0006jT-FP for 62417@debbugs.gnu.org; Sat, 25 Mar 2023 09:29:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pg3xX-0004lR-7F; Sat, 25 Mar 2023 09:29:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Jtn6Z8cJzvvuWXujezVi74Ncr9Potznyqkx2AkbQp7A=; b=ffzZSmlHewhUcVYoLf3t /4wfY5UrgfYNOAbaqao7CGnVC9Z/8VhOYfy6umehzZPKf0eny905mVTbssYQzRA11wGFXbMFyDCLD Xsfq8akUNujG4ifKH2xqYXMTsiHl/YXMj6BB7rCY7jDm6FD8gPcBKpZpZH/Ce71TBE94Mi2qO3l34 czEhIZ8mfQrMikN1G8bfRYsob3o7r6yVvK+2LmFg6Z2dcDPRv2eyt7sbREb4n/1VRzwPk2KEKrWAP b5qKfOP0fZpo198XIbidhVCBNS8Eua8JF+O54pRGiIdw7A9qXjGA8H2qJ5ZG3pifP+kMvOd/CZuma h+425KgdwdtF5A==; Original-Received: from [87.69.77.57] (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 1pg3xW-0008Un-Cf; Sat, 25 Mar 2023 09:29:26 -0400 In-Reply-To: <878rfl3r7v.fsf@posteo.net> (message from Philip Kaludercic on Sat, 25 Mar 2023 13:17:40 +0000) 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:258567 Archived-At: > From: Philip Kaludercic > Cc: João Távora , > 62417@debbugs.gnu.org > Date: Sat, 25 Mar 2023 13:17:40 +0000 > > We would have to call the function with the buffer name instead of the > buffer object. So the `buffer-match-p' fix would look like this: > > diff --git a/lisp/subr.el b/lisp/subr.el > index 99ddd813867..3210ab05702 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -7140,8 +7140,8 @@ buffer-match-p > (string-match-p condition (buffer-name buffer))) > ((pred functionp) > (if (eq 1 (cdr (func-arity condition))) > - (funcall condition buffer) > - (funcall condition buffer arg))) > + (funcall condition (buffer-name buffer)) > + (funcall condition (buffer-name buffer) arg))) > (`(major-mode . ,mode) > (eq > (buffer-local-value 'major-mode buffer) No, I think we should pass to the function the original buffer-or-name argument. It makes no sense to me to have buffer-match-p second-guess what a caller-defined function should get as its argument. > I don't think I am a fan of this, as most of the time a buffer is more > immediately useful. Perhaps João's initial change would be better in > that case, for the sake of backwards compatibility? Or does it make > sense to mention this as an incompatible lisp change? The best solution is the one that completely removes the backward incompatibility, and I think what I suggested does just that.