bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62417: ; Regression: 59ecf25fc860 is the first bad commit


From: Eli Zaretskii
Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit
Date: Sat, 25 Mar 2023 15:55:02 +0300

> Cc: 62417@debbugs.gnu.org
> From: João Távora <joaotavora@gmail.com>
> Date: Fri, 24 Mar 2023 19:48:35 +0000
> 
> If the previous explanation is somehow hard to understand, here's a
> hopefully simpler one with a repro which doesn't require SLY.  In Emacs
> 28 the docstring for `display-buffer-alist` states (emphasis mine):
> 
>    If non-nil, this is an alist of elements (CONDITION . ACTION),
>    where:
>     
>     CONDITION is either a regexp matching buffer names, or a
>      function that takes two arguments - a buffer name and the
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      ACTION argument of `display-buffer' - and returns a boolean.
> 
> In Emacs 29, the docstring was changed to state:
> 
>     If non-nil, this is an alist of elements (CONDITION . ACTION),
>     where:
>      
>      CONDITION is passed to `buffer-match-p', along with the buffer
>       that is to be displayed and the ACTION argument of
>       `display-buffer', to check if ACTION should be used.
> 
> Any code that was written for the Emacs 28 contract in mind like, for
> example:
> 
>    (defun foop (buffer-name _alist) (string-match "foop" buffer-name))
> 
>    (add-to-list 'display-buffer-alist '(foop . display-buffer-other-frame))
> 
> Will now fail with an obscure error message.  I've checked "Incompatible
> Lisp Changes in Emacs 29.1" in etc/NEWS and could not find a mention to
> this, so I assume it was not intentional.
> 
> So it is most clearly a regression.

There's something missing in the above description, since
buffer-match-p accepts a function as its CONDITION argument, and calls
that function with the buffer and ACTION.  So it sounds like code
written for Emacs 28 should still work.  What is missing here that
explains the breakage?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]