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: Mon, 27 Mar 2023 14:08:17 +0000 Message-ID: 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> <87a5zzuutl.fsf@gmail.com> <83h6u79bjl.fsf@gnu.org> <875yamv1ox.fsf@gmail.com> <838rfi9udc.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="15288"; mail-complaints-to="usenet@ciao.gmane.io" 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 Mon Mar 27 16:07:37 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 1pgnVY-0003jI-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 16:07:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgnVG-0000Zy-I6; Mon, 27 Mar 2023 10:07:18 -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 1pgnV1-0000PI-A2 for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 10:07: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 1pgnV0-0003Ot-Rf for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 10:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgnV0-0003UT-8h for bug-gnu-emacs@gnu.org; Mon, 27 Mar 2023 10:07: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: Mon, 27 Mar 2023 14:07: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.167992599713383 (code B ref 62417); Mon, 27 Mar 2023 14:07:02 +0000 Original-Received: (at 62417) by debbugs.gnu.org; 27 Mar 2023 14:06:37 +0000 Original-Received: from localhost ([127.0.0.1]:47917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgnUb-0003Tn-6s for submit@debbugs.gnu.org; Mon, 27 Mar 2023 10:06:37 -0400 Original-Received: from mail-oa1-f52.google.com ([209.85.160.52]:43678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgnUW-0003TX-LX for 62417@debbugs.gnu.org; Mon, 27 Mar 2023 10:06:36 -0400 Original-Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-17786581fe1so9343809fac.10 for <62417@debbugs.gnu.org>; Mon, 27 Mar 2023 07:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679925986; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fX9a4SKGl6aj/aDLtA/HHpRc1kDSu/W34tozMdF2H1g=; b=Pyge5JguMUJXD8nQcefmgnDakNdm6iYNx1UdziOSwcOner+3mJeUjXqZAhSOzuw6GS QDvLzmW5XBxxX4NkKhaio5pMvm03738cl/d9lY6as9QzLHwABvKt6e/DfckDlChX/dYL d4/csmdVYDHMTjLNlMGFFMrFD6zt0xLavcZILoACfWRR64XdBf/rmmWiM4qLTqCPgBXV xKTii75hBb/1PwC8UNRKb7OmkEkVPaUQvTSMJwcECR0cIMQA2O7TfzCIWosjEn9PpVJX J+VDUprQtxtl4D771y8Ibn+So/dcGYBZ+f1KvR7I8VAGNMWijkFQVoBpavyVeLaxK83j 7xqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679925986; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fX9a4SKGl6aj/aDLtA/HHpRc1kDSu/W34tozMdF2H1g=; b=MdwmE50AhUNavSVfgNOBwZwv8XIssi+dJZoeVkawmKwqPa/BRu+z7OCT8hQVTPu2Jy qzo+L8NDluLJoVR5HMns3YSGfJymf8cckDZJF5G1fouffDP1YkUqz5FH9o+mVHpQUBHw d8ZuKx4VpZvQTYBGDPH532lWP3PgQumYOJ63zKHUsJx0mHFMEgRmsfiI/aRJlgL84/qZ S24krcQ2T+4TFe6VAHTT/boIQgGG8fOGN84Zam1YRBQ+hZkzLQaN12xypxgnVXv2OCQG nPwYBdOH902nC6xX1og2YxUc4AaUdYYr7vguAoT3xsbDMqW1v+bTbZC9xqZ5CN91rDUN PwJA== X-Gm-Message-State: AO0yUKXVTxN7d4LLa3E31s8xBdmWY1nkLKoK7fcKyeVXpQ99ppbqbzGG lp6VOlyhBqOv6CiS3UJL4I3PnXdYfnqiBJTleaw= X-Google-Smtp-Source: AK7set809YAweYKY77QXh8X3EBrzhYQk0cc84YtuGu0/aWIyXWjPeG1uQVYs86mz/AE420A9i+EG6O28eZD0qd9oP9o= X-Received: by 2002:a05:687c:198:b0:17e:3201:41b0 with SMTP id yo24-20020a05687c019800b0017e320141b0mr3750095oab.5.1679925986586; Mon, 27 Mar 2023 07:06:26 -0700 (PDT) In-Reply-To: <838rfi9udc.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:258736 Archived-At: On Mon, Mar 27, 2023 at 2:49=E2=80=AFPM Eli Zaretskii wrote: > > > From: Jo=C3=A3o T=C3=A1vora > > Cc: philipk@posteo.net, 62417@debbugs.gnu.org > > Date: Mon, 27 Mar 2023 13:06:06 +0100 > > > > > Please install on emacs-29, and thanks. > > > > Done. I took the liberty of pushing this additional change to the patch > > I showed, which is essential to make this work. I had forgotten to sho= w > > it. Unless there are objections, we can close this bug. > > I don't understand why is it essential, It's very easy to reproduce this problem. Just see the code snippet I included as part of the commit. Author: Jo=C3=A3o T=C3=A1vora Date: Mon Mar 27 12:25:16 2023 +0100 Fix accidental backward-incompatible change (bug#62417) This code used to work, but with the change of 59ecf25fc860 it stopped working: (defun foop (buffer-name _alist) (string-match "foop" buffer-name)) (add-to-list 'display-buffer-alist '(foop . display-buffer-other-fra= me)) This change makes it work again, restoring compatibility. * lisp/subr.el (buffer-match-p): Fix and adjust docstring. * lisp/window.el (display-buffer-alist): Adjust docstring. (display-buffer-assq-regexp): Make good on promise of display-buffer-al= ist. If you remove the extra part and try that snippet in both emacs-28 and emacs-29, you'll reach the same conclusion as I > since buffer-match-p accepts > both buffers and their names. Please explain. In the patch I showed, which you and Philip approved, the docstring of the variable display-buffer-alist was clarified to state that it is a buffe= r name string, and _not_ a buffer object, that is passed to buffer-match-p. This is absolutely necessary, and we've already been through this. But naturally it's not enough to simply state that fact in a docstring. You have to actually make good on the promise by actually passing a buffer name to buffer-match-p, and not a buffer. Otherwise, the user functions that the user places in display-buffer-alist WILL be called with = a buffer _object_ always. And for people programming against Emacs < 29, those functions are always passed a buffer name _string_. Do you understand? I think there is still confusion. It's understandable, as this new buffer-match-p protocol makes what was previously a relatively simple protocol is much harder to understand, because there's an added level of indirection. Presumably added in the name of flexibility, but that flexibility actually already existed in Emacs 28, the buffer-match-p mini-language just adds so-called syntactic sugar. As I said: there are other perfectly plausible ways to address this problem, including removing buffer-match-p from display-buffer-alist logic and losing this particular sugar. > (And I wish you > explained this before pushing, since there's no special rush anyway.) There are people with broken SLYs in the Emacs 29 builds and master for a long time. See the original link. I wish I didn't let it get this far, that was my bad, but this is hurting users today. Jo=C3=A3o