all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: joaotavora@gmail.com, 62417@debbugs.gnu.org
Subject: bug#62417: ; Regression: 59ecf25fc860 is the first bad commit
Date: Sat, 25 Mar 2023 16:29:24 +0300	[thread overview]
Message-ID: <83a601c62z.fsf@gnu.org> (raw)
In-Reply-To: <878rfl3r7v.fsf@posteo.net> (message from Philip Kaludercic on Sat, 25 Mar 2023 13:17:40 +0000)

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: João Távora <joaotavora@gmail.com>,
>   62417@debbugs.gnu.org
> Date: Sat, 25 Mar 2023 13:17:40 +0000
> 
> We would have to call the function with the buffer name instead of the
> buffer object.  So the `buffer-match-p' fix would look like this:
> 
> diff --git a/lisp/subr.el b/lisp/subr.el
> index 99ddd813867..3210ab05702 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -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-name buffer))
> +                         (funcall condition (buffer-name buffer) arg)))
>                        (`(major-mode . ,mode)
>                         (eq
>                          (buffer-local-value 'major-mode buffer)

No, I think we should pass to the function the original buffer-or-name
argument.  It makes no sense to me to have buffer-match-p second-guess
what a caller-defined function should get as its argument.

> I don't think I am a fan of this, as most of the time a buffer is more
> immediately useful.  Perhaps João's initial change would be better in
> that case, for the sake of backwards compatibility?  Or does it make
> sense to mention this as an incompatible lisp change?

The best solution is the one that completely removes the backward
incompatibility, and I think what I suggested does just that.





      reply	other threads:[~2023-03-25 13:29 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
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 [this message]

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=83a601c62z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62417@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=philipk@posteo.net \
    /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.