From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66908: Exposing more public nadvice API Date: Fri, 03 Nov 2023 18:05:40 -0400 Message-ID: References: <878r7fw802.fsf@posteo.net> <87msvufz8n.fsf@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2311"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Philip Kaludercic , 66908@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 03 23:07:02 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 1qz2Jg-0000M8-IV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Nov 2023 23:07:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qz2JF-0008EP-VH; Fri, 03 Nov 2023 18:06:34 -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 1qz2J9-0008C1-Ln for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:06:27 -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 1qz2J9-0000MI-DF for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:06:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qz2Ji-0002am-CP for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2023 22:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66908 X-GNU-PR-Package: emacs Original-Received: via spool by 66908-submit@debbugs.gnu.org id=B66908.16990491869918 (code B ref 66908); Fri, 03 Nov 2023 22:07:02 +0000 Original-Received: (at 66908) by debbugs.gnu.org; 3 Nov 2023 22:06:26 +0000 Original-Received: from localhost ([127.0.0.1]:59929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz2J8-0002Zu-7L for submit@debbugs.gnu.org; Fri, 03 Nov 2023 18:06:26 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz2J6-0002Zg-CY for 66908@debbugs.gnu.org; Fri, 03 Nov 2023 18:06:25 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CF188100061; Fri, 3 Nov 2023 18:05:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699049142; bh=aCKD7PbhgKA+QCfKszDXkeZ3cdFbpuyXHaJpfhyTvrI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fAFILmhiPHGSdjHzqlVrpdQPIEUJLCUmjwT2kHgD47t7Fm4iGCD/Gd/UD+YaqOqs4 yPjvG1ExmO9v91q7hoA4x9y2Vhu6Z8xOBdt0bwI17UqOGeNG97Wsx+hbkc/ZjTxjlT JNVuU4qVNylM/rpSUKWSaKA6OfqNKSUUmn+ZRz7hGA4CqNuw+wTwWVt2TZXHbotLZ5 Il06ffhBHoYDV1rIgnwvsYLZBYEaovtwzw5aZ9BDzBHXdbXYyNDhky5NWpuRfjUZQ2 XwDOFagfcB+8b+Zt7A1mZCu8M23dB2BvWs1/7/q7mXYF5vqo4UBJhJwPaA08+4mKpS bIekljOgWQjTQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 25239100033; Fri, 3 Nov 2023 18:05:42 -0400 (EDT) Original-Received: from pastel (unknown [45.72.195.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EC6F61201B6; Fri, 3 Nov 2023 18:05:41 -0400 (EDT) In-Reply-To: <87msvufz8n.fsf@gmail.com> (Visuwesh's message of "Sat, 04 Nov 2023 00:20:00 +0530") 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:273729 Archived-At: >> It's clearly the internal function most frequently used outside of >> `nadvice.el`, indeed. >> I think it'd be OK to promote that function to a non-internal name. > It would be nice if you could since it would also provide some guarantee > of it being a fairly stable interface. Could you describe the circumstance where you need it? > The other function that I saw get usage outside of nadvice and bytecomp > was advice--symbol-function. Should we use its return value, or is > indirect-function's return value good enough for advice--cd*r? IIRC, > help-function-arglist uses indirect-function and it also works for our > use case. I don't think `advice--symbol-function` is a good candidate because its semantics is not very clearly defined. E.g. I'd be hard pressed to give a comprehensible documentation of it without either being too vague, or promising things I can't always provide, or getting too much into the the nitty gritty details of the various possible situations. That's why I haven't promoted the comment in its body to an actual docstring :-( Most callers are in only one of the many different situations, in which case they usually don't need that functionality. Stefan