From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65797: 29.0.92; func-arity should not return (0 . many) with apply-partially Date: Mon, 11 Sep 2023 09:57:51 -0700 Message-ID: <87o7i8k57u.fsf@breatheoutbreathe.in> References: <87v8cmct9b.fsf@breatheoutbreathe.in> <87cyytwa14.fsf@breatheoutbreathe.in> <83fs3pxivc.fsf@gnu.org> <83fs3owmqq.fsf@gnu.org> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30843"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 65797@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 11 19:09:41 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfkPt-0007of-0g for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Sep 2023 19:09:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfkPI-0000v1-N8; Mon, 11 Sep 2023 13:09:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfkPH-0000uU-BA for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 13:09:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfkPC-0007Pr-HJ for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 13:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfkPG-0002Ex-3G for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 13:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2023 17:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65797 X-GNU-PR-Package: emacs Original-Received: via spool by 65797-submit@debbugs.gnu.org id=B65797.16944521368600 (code B ref 65797); Mon, 11 Sep 2023 17:09:02 +0000 Original-Received: (at 65797) by debbugs.gnu.org; 11 Sep 2023 17:08:56 +0000 Original-Received: from localhost ([127.0.0.1]:54662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfkP6-0002EY-Ri for submit@debbugs.gnu.org; Mon, 11 Sep 2023 13:08:56 -0400 Original-Received: from out-226.mta0.migadu.com ([91.218.175.226]:54664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfkP2-0002EL-9B for 65797@debbugs.gnu.org; Mon, 11 Sep 2023 13:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1694452122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eBGWfmLxxLKIonULeyUoxl/65ZYl1SIKl06MMgAQdKs=; b=b1z8AJoquKAWTalmD88CarvrpBejWf6hI6Y7zIt0UCySTu0K8x40+88q65JYfjCwVPtpTG SgOeZUqS2qiHUzEm5GyOWuybx1UnruFuSqMv8OAw7dOkXDV4e50S8emiPFTphT92bQmc9I txVdsgmSlQyauygo9RyQINczfDr42sE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <83fs3owmqq.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270063 Archived-At: Eli Zaretskii writes: > I think one of the alternatives you proposed was backward-compatible > (albeit not very elegant). So my vote is for that alternative. I'm in favor of the solution in the patch (from Stefan's suggestion): > - Replace `&optional arg` with `&rest args` and pass those args via > `apply`, so the number of args passed doesn't depend on the function > but on the caller. The "&rest args" solution is clean and hack-free. It breaks compatibility, but in unlikely cases: - CONDITION pred accepts only a buffer argument, but additional ARG was passed (why would you do this?) - CONDITION pred accepts two arguments, and no ARG was passed (this code would be broken anyway, right?) Since buffer-match-p is new in Emacs 29, is it acceptable to assume that code affected by this breakage can be updated? Joseph