all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "João Távora" <joaotavora@gmail.com>, 62417@debbugs.gnu.org
Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit
Date: Mon, 27 Mar 2023 19:26:35 +0000	[thread overview]
Message-ID: <874jq6f11w.fsf@posteo.net> (raw)
In-Reply-To: <83r0ta86jr.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Mar 2023 20:09:44 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Date: Mon, 27 Mar 2023 16:42:05 +0000
>> Cc: philipk@posteo.net, 62417@debbugs.gnu.org
>> 
>> On Mon, Mar 27, 2023 at 5:33 PM Eli Zaretskii <eliz@gnu.org> wrote:
>> >
>> > To make a long story short: here's how the call to
>> > display-buffer-assq-regexp looked like in Emacs 28:
>> >
>> >       (let* ((user-action
>> >               (display-buffer-assq-regexp
>> >                (buffer-name buffer) display-buffer-alist action))
>> >
>> > And here's how it looks like in Emacs 29:
>> >
>> >     (let* ((user-action
>> >             (display-buffer-assq-regexp
>> >              buffer display-buffer-alist action))
>> >
>> > Your change modified display-buffer-assq-regexp to pass to
>> > buffer-match-p the name of the buffer if display-buffer-assq-regexp
>> > was called with a buffer object.  This is not TRT, since, among other
>> > issues, it changes the API of display-buffer-assq-regexp, which is a
>> > public function.
>> 
>> Is it?  Not documented in the manual.  Looked a lot like bog-standard
>> generic data-accessing implementation detail to me, and I can't
>> see any advantage of using it directly.
>> 
>> But don't let that stop you from doing this change, which, if it
>> works (I've given a super simple recipe to check), is 120% percent
>> fine by me.
>
> OK.  Philip, any objections to the following change:

No objections from my side.

> diff --git a/lisp/window.el b/lisp/window.el
> index 4bdc265..016d53f 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -7556,19 +7556,16 @@ display-buffer-fallback-action
>  `display-buffer'.")
>  (put 'display-buffer-fallback-action 'risky-local-variable t)
>  
> -(defun display-buffer-assq-regexp (buffer-or-name alist action)
> -  "Retrieve ALIST entry corresponding to buffer specified by BUFFER-OR-NAME.
> +(defun display-buffer-assq-regexp (buffer-name alist action)
> +  "Retrieve ALIST entry corresponding to buffer whose name is BUFFER-NAME.
>  This returns the cdr of the alist entry ALIST if the entry's
>  key (its car) and the name of the buffer designated by
> -BUFFER-OR-NAME satisfy `buffer-match-p', using the key as
> +BUFFER-NAME satisfy `buffer-match-p', using the key as
>  CONDITION argument of `buffer-match-p'.  ACTION should have the
>  form of the action argument passed to `display-buffer'."
>    (catch 'match
>      (dolist (entry alist)
> -      (when (buffer-match-p (car entry) (if (stringp buffer-or-name)
> -                                            buffer-or-name
> -                                          (buffer-name buffer-or-name))
> -                                          action)
> +      (when (buffer-match-p (car entry) buffer-name action)
>          (throw 'match (cdr entry))))))
>  
>  (defvar display-buffer--same-window-action
> @@ -7727,6 +7724,9 @@ display-buffer
>    (let ((buffer (if (bufferp buffer-or-name)
>  		    buffer-or-name
>  		  (get-buffer buffer-or-name)))
> +        (buf-name (if (bufferp buffer-or-name)
> +                      (buffer-name buffer-or-name)
> +                    buffer-or-name))
>  	;; Make sure that when we split windows the old window keeps
>  	;; point, bug#14829.
>  	(split-window-keep-point t)
> @@ -7735,7 +7735,7 @@ display-buffer
>      (unless (listp action) (setq action nil))
>      (let* ((user-action
>              (display-buffer-assq-regexp
> -             buffer display-buffer-alist action))
> +             buf-name display-buffer-alist action))
>             (special-action (display-buffer--special-action buffer))
>             ;; Extra actions from the arguments to this function:
>             (extra-action

-- 
Philip Kaludercic





  reply	other threads:[~2023-03-27 19:26 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
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 [this message]
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=874jq6f11w.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.