From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit Date: Sun, 26 Mar 2023 21:22:14 +0100 Message-ID: <87a5zzuutl.fsf@gmail.com> References: <87sfducmrc.fsf@gmail.com> <87o7oicgy4.fsf@gmail.com> <87wn365e3t.fsf@posteo.net> <87pm8yaq24.fsf_-_@gmail.com> <83fs9tc7o9.fsf@gnu.org> <83cz4xc6hg.fsf@gnu.org> <83zg80c40u.fsf@gnu.org> 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="32518"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: philipk@posteo.net, 62417@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 26 22:21: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 1pgWrj-0008B5-Ti for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Mar 2023 22:21:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgWrR-0001O5-I1; Sun, 26 Mar 2023 16:21:05 -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 1pgWrP-0001Ng-9q for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 16:21:03 -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 1pgWrP-0002Fw-1j for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 16:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgWrO-0005kB-Hg for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 16:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Mar 2023 20:21:02 +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.167986202222009 (code B ref 62417); Sun, 26 Mar 2023 20:21:02 +0000 Original-Received: (at 62417) by debbugs.gnu.org; 26 Mar 2023 20:20:22 +0000 Original-Received: from localhost ([127.0.0.1]:45913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgWqk-0005iv-Ck for submit@debbugs.gnu.org; Sun, 26 Mar 2023 16:20:22 -0400 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:33645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgWqi-0005ic-Ne for 62417@debbugs.gnu.org; Sun, 26 Mar 2023 16:20:21 -0400 Original-Received: by mail-ed1-f48.google.com with SMTP id i5so28001286eda.0 for <62417@debbugs.gnu.org>; Sun, 26 Mar 2023 13:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679862014; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0ttUJTHUGCH4IQLYoXgxO7G7NlSJpTCL0XM8Er3azdc=; b=IqZhuMLemi1WlMLOMejL8vYPxKcLeGxzvtoiosw+CWE0vpQKoLitAsyEh7RhivUcLK R+nL8wxpOh1aQaM2be/VUaaMF2gfRycjpbkE02TGdpn+ta5QN62Oot5VugDsKjesQkZi xB5D0tVamvWN5Eo6fY8OW1llvfBqpfWlXXKp86jYTzamYGgoMTXTbh4X1fBiFSrWrXdb rIQGFMZGIfUgkb6KVfQe2dm8b4raTrrP+m9nv7MQ0zC/hzJc81aX5jqiOaCBbo3qiCcD EnFZ8ErV2R2L2zczFneHlDWnpq0vhs9ngz72RjWfLAFWsSfaaf3LDvORiG3OW2ret6LC Eatg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679862014; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0ttUJTHUGCH4IQLYoXgxO7G7NlSJpTCL0XM8Er3azdc=; b=ouS4y8f+FFyTB+3A3biQqVu6QQfhhwIzYEr9bJQX8mmOoWkEpA3NYix2sxRt1B/aYG BecshDIa1aHJKXtG/0lqgo6Ju51iV5nw6iI1ZKqN34sVEmsK+oF/Dyoazy4ivkew1pBb Ve6ta0D2ztgTyPDTnw8NWhKegy704nZOXhA4xrj+2br/a6VkF96pW+UYoZhbu0SZTI7H gNYff+FBR/ogSutRcO/SsHnDSgjwSuEf61E4bwe+IHY4sDtB3kVqalL8Jwojas0BW98B LH6Et+khrlonK9Wv+ZCCN3BzvMorwX1zV55fnu5iKr0ZjHVION2pAigEihy7IGoDqDV9 ld/g== X-Gm-Message-State: AAQBX9cSww1cvmIte/h0Vc0ySOyuv/q2JtsaogANsowXLNIvlZj8cCcZ rcReQ8DNx0nKHkNmdCc+uP6plZp4Q1M= X-Google-Smtp-Source: AKy350Z5lLqZMjKcWBiSa5XG6VtxlUkZ7t/5RVuXrBVzH1hCWb/buakPT1a9h6g40xFbLHb5QmJyog== X-Received: by 2002:aa7:d291:0:b0:4fb:59bb:ce7c with SMTP id w17-20020aa7d291000000b004fb59bbce7cmr9582353edq.32.1679862014576; Sun, 26 Mar 2023 13:20:14 -0700 (PDT) Original-Received: from krug (87-196-74-168.net.novis.pt. [87.196.74.168]) by smtp.gmail.com with ESMTPSA id a13-20020a509e8d000000b00501d73cfc86sm8847836edf.9.2023.03.26.13.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 13:20:13 -0700 (PDT) In-Reply-To: <83zg80c40u.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Mar 2023 17:13:53 +0300") 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:258698 Archived-At: Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Date: Sat, 25 Mar 2023 13:56:40 +0000 >> Cc: "Philip K." , 62417@debbugs.gnu.org >>=20 >> But you're confused: this is not about buffer-match-p's arguments. It's = about the arguments to the function >> that you may also pass to buffer-match-p in it's first CONDITION argumen= t. Use my simple recipe in both >> Emacs 28 and 29. > > The function should be called with the same BUFFER-OR-NAME argument > with which buffer-match-p was called. Here's your idea in a patch. It fixes the issue. Propose this be pushed to emacs-29. Jo=C3=A3o diff --git a/lisp/subr.el b/lisp/subr.el index 99ddd813867..39866dd7acb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7114,7 +7114,7 @@ buffer-match-p - the symbol t, to always match, - the symbol nil, which never matches, - a regular expression, to match a buffer name, -- a predicate function that takes a buffer object and ARG as +- a predicate function that takes BUFFER-OR-NAME and ARG as arguments, and returns non-nil if the buffer matches, - a cons-cell, where the car describes how to interpret the cdr. The car can be one of the following: @@ -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-or-name) + (funcall condition buffer-or-name arg))) (`(major-mode . ,mode) (eq (buffer-local-value 'major-mode buffer) diff --git a/lisp/window.el b/lisp/window.el index 08ce8498655..e8daa0383ec 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7510,8 +7510,8 @@ display-buffer-alist If non-nil, this is an alist of elements (CONDITION . ACTION), where: =20 - CONDITION is passed to `buffer-match-p', along with the buffer - that is to be displayed and the ACTION argument of + CONDITION is passed to `buffer-match-p', along with the name of + the buffer that is to be displayed and the ACTION argument of `display-buffer', to check if ACTION should be used. =20 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an