From: Philip Kaludercic <philipk@posteo.net>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 62417@debbugs.gnu.org
Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit
Date: Sun, 26 Mar 2023 21:23:08 +0000 [thread overview]
Message-ID: <87wn331a2r.fsf@posteo.net> (raw)
In-Reply-To: <87a5zzuutl.fsf@gmail.com> ("João Távora"'s message of "Sun, 26 Mar 2023 21:22:14 +0100")
João Távora <joaotavora@gmail.com> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: João Távora <joaotavora@gmail.com>
>>> Date: Sat, 25 Mar 2023 13:56:40 +0000
>>> Cc: "Philip K." <philipk@posteo.net>, 62417@debbugs.gnu.org
>>>
>>> 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 argument. 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ão
>
> 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:
>
> - 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.
>
> ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
LGTM
--
Philip Kaludercic
next prev parent reply other threads:[~2023-03-26 21:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 13:16 bug#62417: 30.0.50; Regression: 59ecf25fc860 is the first bad commit João Távora
2023-03-24 15:22 ` João Távora
2023-03-24 16:05 ` Philip Kaludercic
2023-03-24 16:07 ` João Távora
2023-03-24 19:48 ` bug#62417: ; " João Távora
2023-03-25 12:55 ` Eli Zaretskii
2023-03-25 13:04 ` João Távora
2023-03-25 13:20 ` Eli Zaretskii
2023-03-25 13:56 ` João Távora
2023-03-25 14:13 ` Eli Zaretskii
2023-03-25 14:15 ` João Távora
2023-03-26 20:22 ` João Távora
2023-03-26 21:23 ` Philip Kaludercic [this message]
2023-03-27 2:24 ` Eli Zaretskii
2023-03-27 12:06 ` João Távora
2023-03-27 13:49 ` Eli Zaretskii
2023-03-27 14:08 ` João Távora
2023-03-27 15:20 ` Eli Zaretskii
2023-03-27 16:33 ` Eli Zaretskii
2023-03-27 16:42 ` João Távora
2023-03-27 17:09 ` Eli Zaretskii
2023-03-27 19:26 ` Philip Kaludercic
2023-03-28 11:11 ` Eli Zaretskii
2023-03-27 16:38 ` João Távora
2023-03-25 13:17 ` Philip Kaludercic
2023-03-25 13:29 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn331a2r.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=62417@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.