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#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs) Date: Mon, 09 Oct 2023 18:06:40 -0400 Message-ID: References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@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="17865"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59820@debbugs.gnu.org, Daan Ro To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 10 00:08:08 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 1qpyQ2-0004Qf-NU for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Oct 2023 00:08:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpyPf-0003Nq-07; Mon, 09 Oct 2023 18:07:43 -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 1qpyPd-0003NN-UP for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 18:07:42 -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 1qpyPd-0000fl-Mn for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 18:07:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpyPy-00013b-1b for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 18:08: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: Mon, 09 Oct 2023 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59820 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59820-submit@debbugs.gnu.org id=B59820.16968892393742 (code B ref 59820); Mon, 09 Oct 2023 22:08:02 +0000 Original-Received: (at 59820) by debbugs.gnu.org; 9 Oct 2023 22:07:19 +0000 Original-Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpyPH-0000yI-9A for submit@debbugs.gnu.org; Mon, 09 Oct 2023 18:07:19 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpyPB-0000xs-IE for 59820@debbugs.gnu.org; Mon, 09 Oct 2023 18:07:17 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C2CF81000A3; Mon, 9 Oct 2023 18:06:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1696889201; bh=yaC+N9D6L47Vk4GY41NyXNOuEmKZcsygP5U0UFKA8lw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IZdqMuxbIEwmW/ItIemVuS7ikYOtHfTfTmWBmoX1yEimgzm7mtLPGD7tlRM4uQO6e H5r9YfAHNqhOec1SOspXmGMybLmMOPiHDIclsIjUI5nt0bF/Wnh3LY5N0lBDpx4L/o Ilb23JXVeMp0Ld8T+/imtJynTZqeD9I0p3sXwOgiTwJbGLmF+abcjUMgljh7TmhJs+ OzdUdrrT1zzZKAvuZvCe+RxEwN0RvP9eCZ+8zPIOCH+59J8NEMH7HPfUcVfHvefKlw 1T6n5taop7blnW8mEgxi9y4sR7btVijC1ckqChm+SYDlKCoDXE2MNVeuO0Yfu2ky83 UDU4M9ijEbfSw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B3F74100061; Mon, 9 Oct 2023 18:06:41 -0400 (EDT) Original-Received: from pastel (unknown [216.154.28.175]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8C02F1203DA; Mon, 9 Oct 2023 18:06:41 -0400 (EDT) In-Reply-To: (Stefan Kangas's message of "Mon, 9 Oct 2023 09:45:20 +0000") 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:272176 Archived-At: >> Use `warn` instead of `message`. > Stefan, what do you think? Should the below patch be installed? Still not a fan for the same reasons, plus: - The real `nadvice.el` was added to Emacs-24.4, released 9 years ago, and this forward compatibility was first released 5 years ago, so the need for the library is becoming rare and its functionality proved adequate for 5 years already. - (intern (format "%S" func)) can collide with another library doing something similar, so better use something like (intern (format "nadvice--%S" func)) just to be on the safe side. Daan, is there a specific use-case that motivates you to want to pass an anonymous lambda to this compatibility library? Maybe I could be convinced by a good use-case. Stefan