unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 65797@debbugs.gnu.org, dmitry@gutov.dev, philipk@posteo.net,
	mattias.engdegard@gmail.com, joseph@breatheoutbreathe.in
Subject: bug#65797: `buffer-match-p` should not use `func-arity`
Date: Sun, 15 Oct 2023 09:13:27 +0300	[thread overview]
Message-ID: <831qdwqupk.fsf@gnu.org> (raw)
In-Reply-To: <jwvjzrpl2xh.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 14 Oct 2023 10:31:29 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: dmitry@gutov.dev,  joseph@breatheoutbreathe.in,  philipk@posteo.net,
>   mattias.engdegard@gmail.com,  65797@debbugs.gnu.org
> Date: Sat, 14 Oct 2023 10:31:29 -0400
> 
> > What bad things will happen if we leave emacs-29 with no changes?
> 
> Nothing too serious.
> `buffer-match-p` is new in Emacs-29 and it is documented (in the Texinfo,
> not in the docstring) to provide a behavior we're unable to implement.
> So the main aim of the patch is to "fix" this new API so it can be
> implemented as documented.
> 
> But the problem is somewhat corner-case, so it's not super urgent to fix it.
> 
> OTOH, the change is minor and fairly safe.
> Basically the patch replaces an &optional with a &rest in the API.
> Besides allowing more cases (which is mostly a non-issue in terms of
> backward compatibility), this introduces just 1 potential problem:
> 
> When `buffer-match-p` is called without the formerly optional arg, it
> will call the predicate functions with one fewer arg than before.
> 
> The Emacs-29.1 code has a hack that tries to detect when the predicate
> expects "one fewer arg" and if so calls it without the optional arg, so
> I just extended that hack to also handle that reverse problem (when
> there is one fewer arg than expected by the function).
> 
> If we put it into `master`, I guess we can stick to the original hack
> and hope the above "just 1 potential problem" won't bite us, but it
> seems we may as well use the more backward compliant option and put it
> into `emacs-29`.
> 
> See below my current "safe" choice.

Sigh.  I guess we can install this on emacs-29 and cross the
fingers...





  reply	other threads:[~2023-10-15  6:13 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07  7:53 bug#65797: 29.0.92; func-arity should not return (0 . many) with apply-partially Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 12:35 ` Mattias Engdegård
2023-09-07 15:11   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 15:17     ` Mattias Engdegård
2023-09-07 13:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 15:50 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08  4:40   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08  6:46     ` Eli Zaretskii
2023-09-08 15:52       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 16:37         ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 17:18           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 18:16             ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 18:20         ` Eli Zaretskii
2023-09-11 16:57           ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11 18:58             ` Eli Zaretskii
2023-09-12 18:30           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-08 17:01   ` bug#65797: `buffer-match-p` should not use `func-arity` Philip Kaludercic
2023-09-12 18:28     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-13 21:50       ` Philip Kaludercic
2023-09-14 13:47         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-18  9:12           ` Philip Kaludercic
2023-09-18 11:55             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-18 17:23               ` Philip Kaludercic
2023-09-18 18:05                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-19  8:34                   ` Philip Kaludercic
2023-09-19 10:06                     ` Dmitry Gutov
2023-09-19 13:56                       ` Philip Kaludercic
2023-09-19 16:13                         ` Dmitry Gutov
2023-10-08  9:10                           ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-08 10:25                             ` Dmitry Gutov
2023-10-09 21:40                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-12  4:53                               ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-12 11:34                               ` Dmitry Gutov
2023-10-13 15:57                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14  6:13                                   ` Eli Zaretskii
2023-10-14 14:31                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-15  6:13                                       ` Eli Zaretskii [this message]
2023-10-16 16:33                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-16 20:16                                           ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-19 12:18                                           ` Eli Zaretskii
2023-10-21  2:52                                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15  0:45     ` Dmitry Gutov
2023-09-15  1:38       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15 16:38         ` Dmitry Gutov
2023-09-15 17:54           ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-15 18:00             ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qdwqupk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=65797@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=joseph@breatheoutbreathe.in \
    --cc=mattias.engdegard@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).