GNU logs - #59820, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: daanturo <daanturo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 04 Dec 2022 17:16:02 +0000
Resent-Message-ID: <handler.59820.B.167017410417253 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 59820 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.167017410417253
          (code B ref -1); Sun, 04 Dec 2022 17:16:02 +0000
Received: (at submit) by debbugs.gnu.org; 4 Dec 2022 17:15:04 +0000
Received: from localhost ([127.0.0.1]:58762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p1sZz-0004SX-BX
	for submit <at> debbugs.gnu.org; Sun, 04 Dec 2022 12:15:04 -0500
Received: from lists.gnu.org ([209.51.188.17]:54822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <daanturo@HIDDEN>) id 1p1sZu-0004Nc-Kt
 for submit <at> debbugs.gnu.org; Sun, 04 Dec 2022 12:15:02 -0500
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 <daanturo@HIDDEN>)
 id 1p1sZu-0004CB-Fm
 for bug-gnu-emacs@HIDDEN; Sun, 04 Dec 2022 12:14:58 -0500
Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <daanturo@HIDDEN>)
 id 1p1sZr-0001QZ-Cj
 for bug-gnu-emacs@HIDDEN; Sun, 04 Dec 2022 12:14:58 -0500
Received: by mail-pg1-x530.google.com with SMTP id h33so8509136pgm.9
 for <bug-gnu-emacs@HIDDEN>; Sun, 04 Dec 2022 09:14:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:content-language:subject:to:user-agent:mime-version:date
 :message-id:from:to:cc:subject:date:message-id:reply-to;
 bh=q7uy+EZBVqUUSBcQP5NIXYnku7ZxmRnRAzo+gbbr4ME=;
 b=aokCFyMIZHPfXfTPRn7zBv0hVvUNNNjk7e9XZ5lmy/y0z1bjKdA9t6lm0bjL4BUqhx
 e+z20XVLOcJWCgd+rQ3UqejcnX0q3UzG0ZvpFE8IeHm/r4LXWNxODHRjKD/2T3kTvRds
 3LFU5S2oLpsNREIo70tIKqC4/cnkoRO8bYdkB91rLS93mouzgcWQuNglQa9J+3ChoHsW
 bJvg85y3jR2OzNbt5f89aSJ71aoC3knGfx9q9N6V9nuWScy3UNJHK4UQCn2MRdkevyEg
 fAZ45Eie8xqy1OqQrp7SB80Lg7v8U3kfp5H3DQf27z8QCiAJc5hwoj4aJiGD9GjVxApA
 H1Rg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=from:content-language:subject:to:user-agent:mime-version:date
 :message-id:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=q7uy+EZBVqUUSBcQP5NIXYnku7ZxmRnRAzo+gbbr4ME=;
 b=wDFE4/M5fGV2mADnRdXj8WZTOgNc6mlLM/Inw19m3OD1nGexWfztMynqLIJw6hRwO2
 z+oELSi3UEKnbuGorv4cHyoKXS7e5g3K/FEIbkhdUoCEQkIiXmVH0XCVMPiDsfeq5iUq
 psRV4jCJc9HX1qAxQ1h/OxqH21VwSMv//qYPP00X2esHsdZyp1D4SvBZI+6qv3M9rbx6
 7cHIxxPCWnVj5KhVJQV85v//JXIQhbVrpIHiqwC1OudpZOO88rDG0Q7d6gS1ChoeJ007
 yQtVA5pqb1WE9iJrxItw6wdfoHlr/Gkrnh9z6K4JrA/Ell/Mad0rBqtffrsykjvw5GdX
 Vlug==
X-Gm-Message-State: ANoB5pndptztrDXHLQq3uBym4lWCjbcwqlR8u8jtX40LL+FYhHoFP8q/
 Q7nhl6wN/5S6LakxHQc3nq0Q/SAha2w=
X-Google-Smtp-Source: AA0mqf6slyvhQlZE8tFbEolvsEdURNe5MuzqLZCwRp4v2N2wRNsCy8imX2Bfy9SQlt1/10+4/gWuAw==
X-Received: by 2002:aa7:928f:0:b0:56d:2e71:449 with SMTP id
 j15-20020aa7928f000000b0056d2e710449mr62197615pfa.46.1670174092997; 
 Sun, 04 Dec 2022 09:14:52 -0800 (PST)
Received: from ?IPV6:2001:ee0:4f4c:7ae0:addd:ebe1:9a59:e278?
 ([2001:ee0:4f4c:7ae0:addd:ebe1:9a59:e278])
 by smtp.gmail.com with ESMTPSA id
 y2-20020a623202000000b00574740c99e9sm8301452pfy.129.2022.12.04.09.14.51
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 04 Dec 2022 09:14:52 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------a9wGvp0ysz0oFX8IpfmGmKCG"
Message-ID: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
Date: Mon, 5 Dec 2022 00:14:49 +0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.5.1
Content-Language: en-US
From: daanturo <daanturo@HIDDEN>
Received-SPF: pass client-ip=2607:f8b0:4864:20::530;
 envelope-from=daanturo@HIDDEN; helo=mail-pg1-x530.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This is a multi-part message in MIME format.
--------------a9wGvp0ysz0oFX8IpfmGmKCG
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch provides the ELPA version (for Emacs < 24.4) of nadvice.el's
advice-add the ability to handle anonymous advices.

I have tested with a simple example:


```emacs-lisp

(let* ((sym (make-symbol "nadvice λ")))
  (defalias sym (lambda (&rest args) '(1)))
  (advice-add sym :around (lambda (func &rest args)
                            (append (apply func args) '(2))))
  (vector
   ;; advised returned value
   (funcall sym)
   (progn
     (advice-remove sym (lambda (func &rest args)
                          (append (apply func args) '(2))))
     ;; unadvised returned value
     (funcall sym))))

;; => [(1 2) (1)]

```


In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.30)
 of 2020-04-04 on x86-01.bsys.centos.org
Windowing system distributor `The X.Org Foundation', version
 11.0.12201005
 
Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
 -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''


-- 
Daanturo.

--------------a9wGvp0ysz0oFX8IpfmGmKCG
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-nadvice-nadvice.el-support-non-symbol-advices.patch"
Content-Disposition: attachment;
 filename="0001-nadvice-nadvice.el-support-non-symbol-advices.patch"
Content-Transfer-Encoding: base64

RnJvbSBiMDdmZDY5N2UwOTdlZDBjYTYwNDA3ODE4MzBhZDQyYmUyYTlhYzg2IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBEYWFudHVybyA8ZGFhbnR1cm9AZ21haWwuY29tPgpE
YXRlOiBTdW4sIDQgRGVjIDIwMjIgMjE6MzQ6NTIgKzA3MDAKU3ViamVjdDogW1BBVENIXSAq
IG5hZHZpY2UvbmFkdmljZS5lbDogc3VwcG9ydCBub24tc3ltYm9sIGFkdmljZXMKCihhZHZp
Y2UtYWRkKTogYnkgYWxpYXNpbmcgdGhlIGZ1bmN0aW9uIHRvIGEgbmV3IHN5bWJvbAotLS0K
IG5hZHZpY2UuZWwgfCA1MyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDMxIGluc2VydGlvbnMoKyksIDIy
IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL25hZHZpY2UuZWwgYi9uYWR2aWNlLmVsCmlu
ZGV4IDU4NTIzZjYuLjQ0M2E1ZDAgMTAwNjQ0Ci0tLSBhL25hZHZpY2UuZWwKKysrIGIvbmFk
dmljZS5lbApAQCAtNTIsMzAgKzUyLDM4IEBACiAoZGVmdW4gYWR2aWNlLW1lbWJlci1wIChh
ZHZpY2Ugc3ltYm9sKQogICAoYWQtZmluZC1hZHZpY2Ugc3ltYm9sICdhcm91bmQgYWR2aWNl
KSkKIAorCisoZGVmdW4gYWR2aWNlLS1lbnN1cmUtc3ltYm9sIChmdW5jKQorICAoaWYgKHN5
bWJvbHAgZnVuYykKKyAgICAgIGZ1bmMKKyAgICAobGV0KiAoKHN5bSAoaW50ZXJuIChmb3Jt
YXQgIiVTIiBmdW5jKSkpKQorICAgICAgKHVubGVzcyAoZmJvdW5kcCBzeW0pCisgICAgICAg
IChkZWZhbGlhcyBzeW0gZnVuYykpCisgICAgICBzeW0pKSkKKwogOzs7IyMjYXV0b2xvYWQK
IChkZWZ1biBhZHZpY2UtYWRkIChzeW1ib2wgd2hlcmUgZnVuY3Rpb24gJm9wdGlvbmFsIHBy
b3BzKQogICAod2hlbiBwcm9wcwogICAgIChlcnJvciAiVGhpcyB2ZXJzaW9uIG9mIG5hZHZp
Y2UuZWwgZG9lcyBub3Qgc3VwcG9ydCBQUk9QUyIpKQotICAodW5sZXNzIChzeW1ib2xwIGZ1
bmN0aW9uKQotICAgIChlcnJvciAiVGhpcyB2ZXJzaW9uIG9mIG5hZHZpY2UuZWwgcmVxdWly
ZXMgRlVOQ1RJT04gdG8gYmUgYSBzeW1ib2wiKSkKLSAgKGxldCAoKGJvZHkgKGNvbmQKLSAg
ICAgICAgICAgICAgICgoZXEgd2hlcmUgOmJlZm9yZSkKLSAgICAgICAgICAgICAgICBgKHBy
b2duIChhcHBseSAjJyxmdW5jdGlvbiAoYWQtZ2V0LWFyZ3MgMCkpIGFkLWRvLWl0KSkKLSAg
ICAgICAgICAgICAgICgoZXEgd2hlcmUgOmFmdGVyKQotICAgICAgICAgICAgICAgIGAocHJv
Z24gYWQtZG8taXQgKGFwcGx5ICMnLGZ1bmN0aW9uIChhZC1nZXQtYXJncyAwKSkpKQotICAg
ICAgICAgICAgICAgKChlcSB3aGVyZSA6b3ZlcnJpZGUpCi0gICAgICAgICAgICAgICAgYChz
ZXRxIGFkLXJldHVybi12YWx1ZSAoYXBwbHkgIycsZnVuY3Rpb24gKGFkLWdldC1hcmdzIDAp
KSkpCi0gICAgICAgICAgICAgICAoKGVxIHdoZXJlIDphcm91bmQpCi0gICAgICAgICAgICAg
ICAgYChzZXRxIGFkLXJldHVybi12YWx1ZQotICAgICAgICAgICAgICAgICAgICAgICAoYXBw
bHkgIycsZnVuY3Rpb24KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEg
KCZyZXN0IG5hZHZpY2UtLXJlc3QtYXJnKQotICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAoYWQtc2V0LWFyZ3MgMCBuYWR2aWNlLS1yZXN0LWFyZykKLSAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgYWQtZG8taXQpCi0gICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAoYWQtZ2V0LWFyZ3MgMCkpKSkKLSAgICAgICAgICAgICAgICh0IChlcnJvciAiVGhp
cyB2ZXJzaW9uIG9mIG5hZHZpY2UuZWwgZG9lcyBub3QgaGFuZGxlICVTIgotICAgICAgICAg
ICAgICAgICAgICAgICAgIHdoZXJlKSkpKSkKKyAgKGxldCogKChhZHZpY2UtZm4gKGFkdmlj
ZS0tZW5zdXJlLXN5bWJvbCBmdW5jdGlvbikpCisgICAgICAgICAoYm9keSAoY29uZAorICAg
ICAgICAgICAgICAgICgoZXEgd2hlcmUgOmJlZm9yZSkKKyAgICAgICAgICAgICAgICAgYChw
cm9nbiAoYXBwbHkgIycsYWR2aWNlLWZuIChhZC1nZXQtYXJncyAwKSkgYWQtZG8taXQpKQor
ICAgICAgICAgICAgICAgICgoZXEgd2hlcmUgOmFmdGVyKQorICAgICAgICAgICAgICAgICBg
KHByb2duIGFkLWRvLWl0IChhcHBseSAjJyxhZHZpY2UtZm4gKGFkLWdldC1hcmdzIDApKSkp
CisgICAgICAgICAgICAgICAgKChlcSB3aGVyZSA6b3ZlcnJpZGUpCisgICAgICAgICAgICAg
ICAgIGAoc2V0cSBhZC1yZXR1cm4tdmFsdWUgKGFwcGx5ICMnLGFkdmljZS1mbiAoYWQtZ2V0
LWFyZ3MgMCkpKSkKKyAgICAgICAgICAgICAgICAoKGVxIHdoZXJlIDphcm91bmQpCisgICAg
ICAgICAgICAgICAgIGAoc2V0cSBhZC1yZXR1cm4tdmFsdWUKKyAgICAgICAgICAgICAgICAg
ICAgICAgIChhcHBseSAjJyxhZHZpY2UtZm4KKyAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAobGFtYmRhICgmcmVzdCBuYWR2aWNlLS1yZXN0LWFyZykKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIChhZC1zZXQtYXJncyAwIG5hZHZpY2UtLXJlc3QtYXJnKQor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWQtZG8taXQpCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKGFkLWdldC1hcmdzIDApKSkpCisgICAgICAgICAgICAg
ICAgKHQgKGVycm9yICJUaGlzIHZlcnNpb24gb2YgbmFkdmljZS5lbCBkb2VzIG5vdCBoYW5k
bGUgJVMiCisgICAgICAgICAgICAgICAgICAgICAgICAgIHdoZXJlKSkpKSkKICAgICAoYWQt
YWRkLWFkdmljZSBzeW1ib2wKLSAgICAgICAgICAgICAgICAgICBgKCxmdW5jdGlvbiBuaWwg
dCAoYWR2aWNlIGxhbWJkYSAoKSAsYm9keSkpCisgICAgICAgICAgICAgICAgICAgYCgsYWR2
aWNlLWZuIG5pbCB0IChhZHZpY2UgbGFtYmRhICgpICxib2R5KSkKICAgICAgICAgICAgICAg
ICAgICAnYXJvdW5kCiAgICAgICAgICAgICAgICAgICAgbmlsKQogICAgIChhZC1hY3RpdmF0
ZSBzeW1ib2wpKSkKQEAgLTg0LDkgKzkyLDEwIEBACiAoZGVmdW4gYWR2aWNlLXJlbW92ZSAo
c3ltYm9sIGZ1bmN0aW9uKQogICA7OyBKdXN0IHJldHVybiBuaWwgaWYgdGhlcmUgaXMgbm8g
YWR2aWNlLCByYXRoZXIgdGhhbiBzaWduYWxpbmcgYW4KICAgOzsgZXJyb3IuCi0gICh3aGVu
IChhZHZpY2UtbWVtYmVyLXAgZnVuY3Rpb24gc3ltYm9sKQotICAgIChhZC1yZW1vdmUtYWR2
aWNlIHN5bWJvbCAnYXJvdW5kIGZ1bmN0aW9uKQotICAgIChhZC1hY3RpdmF0ZSBzeW1ib2wp
KSkKKyAgKGxldCogKChhZHZpY2UtZm4gKGFkdmljZS0tZW5zdXJlLXN5bWJvbCBmdW5jdGlv
bikpKQorICAgICh3aGVuIChhZHZpY2UtbWVtYmVyLXAgYWR2aWNlLWZuIHN5bWJvbCkKKyAg
ICAgIChhZC1yZW1vdmUtYWR2aWNlIHN5bWJvbCAnYXJvdW5kIGFkdmljZS1mbikKKyAgICAg
IChhZC1hY3RpdmF0ZSBzeW1ib2wpKSkpCiAKICkKIAotLSAKMi4zOC4xCgo=

--------------a9wGvp0ysz0oFX8IpfmGmKCG--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: daanturo <daanturo@HIDDEN>
Subject: bug#59820: Acknowledgement ([PATCH] * nadvice/nadvice.el: support
 non-symbol (closure/lambda) advices (old Emacs))
Message-ID: <handler.59820.B.167017410417253.ack <at> debbugs.gnu.org>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
X-Gnu-PR-Message: ack 59820
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 59820 <at> debbugs.gnu.org
Date: Sun, 04 Dec 2022 17:16:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 59820 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
59820: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59820
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Stefan Kangas <stefankangas@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 13 Dec 2022 01:05:02 +0000
Resent-Message-ID: <handler.59820.B59820.167089344913691 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: daanturo <daanturo@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.167089344913691
          (code B ref 59820); Tue, 13 Dec 2022 01:05:02 +0000
Received: (at 59820) by debbugs.gnu.org; 13 Dec 2022 01:04:09 +0000
Received: from localhost ([127.0.0.1]:56703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p4tiL-0003Yl-EJ
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2022 20:04:09 -0500
Received: from mail-ot1-f41.google.com ([209.85.210.41]:34695)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1p4tiK-0003YQ-2E
 for 59820 <at> debbugs.gnu.org; Mon, 12 Dec 2022 20:04:08 -0500
Received: by mail-ot1-f41.google.com with SMTP id
 db10-20020a0568306b0a00b0066d43e80118so8440263otb.1
 for <59820 <at> debbugs.gnu.org>; Mon, 12 Dec 2022 17:04:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=BVEU7M7veXjfhI44QvJSqhCIS7b2ZxZJSXQ8Fw5ZvdU=;
 b=lvo5LQRzJsMUAk9xJpeGXwea6RxJ4wg5YVECv0iWgBIyucqCYGbCS9kU6OxUUm6PF0
 R2j19gj7PRPnxoOrZ9rngqxrlALvroRAHjiLpYez2hTvryVGybTMJZyB1Chhyjlwat1l
 Q4S/AJKmd6bZx6T2Jnd7EQaGSI13eRzqqr+elLtgcLp5VBOIoZORenUkQLeMBrfzhthZ
 Wb7+mwDRuoQpr8spDP8jaGJILMe3vivUjFMNoJmOv/y8MN0AgksHXNEjt1eo7Q+9WaIV
 /xWuJrgM3AVDDhADRusEMlJk1HHkoKXyTFVq8JP98RAqtPRzjhM2VUMn1PdxOKCSFhtC
 dXow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=BVEU7M7veXjfhI44QvJSqhCIS7b2ZxZJSXQ8Fw5ZvdU=;
 b=fsAYr0aShEtbNQT0mxEqUe6v67HZlnk6xuZJH0l+8omODCovJo08bZQNxz+5qbyCvO
 PFYpWFZ5EIf6+rV8jGNnssETVPbuWuM1VScpQCbSWCeU2DEhBunw/yZs1O93gTDoDWw5
 7LXWHbzlm6A6w9BB5X0BmUX+kwWDF4LOMEMuDPpk5u7S0W9Lf4mTyUmjO4PY2f1mnks/
 bwNYnSlU3wCwXTkZkOO6WvpnSM81MMZh5tDDpquZU67fFUFw6GKdEhQNABKS6unr7Xif
 q264ehexPDk5D0tzykVAot6qeruQbjvXCNE25glXihCggKGHIz0RAwGSRYGQHOFFRJST
 wWIw==
X-Gm-Message-State: ANoB5pmNWZgFlijzG0SUwoEP5LsKFrD9GWgsjfjx7I6Iw7B6TrnVfNGf
 s2reWRhS19EnQSeuguBrSYI1R1PaqmIFNv1AVzE=
X-Google-Smtp-Source: AA0mqf6sQrdNZYitIkFgBh/WZ3pMMVy3bO3CVJ1RFyc+/1JulL/z6oOTc2/gIN0fAvlvxxFRmwZEocS8yZZc/Z5ISng=
X-Received: by 2002:a05:6830:11cd:b0:66e:7741:ed1d with SMTP id
 v13-20020a05683011cd00b0066e7741ed1dmr11475131otq.224.1670893442444; Mon, 12
 Dec 2022 17:04:02 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 12 Dec 2022 17:04:02 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 (daanturo@HIDDEN's message of "Mon, 5 Dec 2022 00:14:49 +0700")
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
X-Hashcash: 1:20:221213:monnier@HIDDEN::327T+xEHGwEfSueh:4wbA
MIME-Version: 1.0
Date: Mon, 12 Dec 2022 17:04:01 -0800
Message-ID: <CADwFkmkWhaNogsX4kYcEtfiO2aho61NH37aWy+VVWt5qajBWCA@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

daanturo <daanturo@HIDDEN> writes:

> This patch provides the ELPA version (for Emacs < 24.4) of nadvice.el's
> advice-add the ability to handle anonymous advices.
>
> I have tested with a simple example:
>
> ```emacs-lisp
>
> (let* ((sym (make-symbol "nadvice =CE=BB")))
> =C2=A0 (defalias sym (lambda (&rest args) '(1)))
> =C2=A0 (advice-add sym :around (lambda (func &rest args)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 (append (apply func args) '(2))))
> =C2=A0 (vector
> =C2=A0=C2=A0 ;; advised returned value
> =C2=A0=C2=A0 (funcall sym)
> =C2=A0=C2=A0 (progn
> =C2=A0=C2=A0=C2=A0=C2=A0 (advice-remove sym (lambda (func &rest args)
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 (append (apply func args) '(2))))
> =C2=A0=C2=A0=C2=A0=C2=A0 ;; unadvised returned value
> =C2=A0=C2=A0=C2=A0=C2=A0 (funcall sym))))
>
> ;; =3D> [(1 2) (1)]
>
> ```

Stefan, any comments here?




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 13 Dec 2022 01:04:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 12 20:04:20 2022
Received: from localhost ([127.0.0.1]:56711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p4tiV-0003ZK-VN
	for submit <at> debbugs.gnu.org; Mon, 12 Dec 2022 20:04:20 -0500
Received: from mail-ot1-f43.google.com ([209.85.210.43]:46697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1p4tiU-0003Yy-J0
 for control <at> debbugs.gnu.org; Mon, 12 Dec 2022 20:04:18 -0500
Received: by mail-ot1-f43.google.com with SMTP id
 m7-20020a9d6447000000b0066da0504b5eso8403135otl.13
 for <control <at> debbugs.gnu.org>; Mon, 12 Dec 2022 17:04:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=oAAwtJMQ62Iq5dihAF2kzsPTeDIZVeM8tAhPjPP4TAk=;
 b=W4J+ZZ9qPrco7U33eDN1s7dLNxmFshPCSR7dhkBiaJXsQPpr5WVajnKviPU/AFLYZI
 bG4oluSyDQfak7YaUE01dDWKxP3kqow28JFfLkj4QRDTZiErO72KOXlR48bOz0e7iWRg
 wqszEiYyGscANayhxbL7BKqZuFFh7148k/1t+7nASnhceryjooVHIQsA5BTbssmDHxU0
 DGMI7wHRnCEc1VMQpo1VMW7TUOhw3+fap10Iqnm5RhTwBbI/P68OgCbx38VCKW5YNqmU
 Db1xCn8CsdtRnikznv5QTdO7rvyhw1FWqPn+v1hIv38K/LJkqhsdYSqFawzHv1ziHOjm
 8u0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:mime-version:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=oAAwtJMQ62Iq5dihAF2kzsPTeDIZVeM8tAhPjPP4TAk=;
 b=oB3CD2Ejxxt1A9Yv+PM2HBQryIUS2DkZ8hLD8DMW4i3qFgvn2CyHJRizw3SvBuK/du
 WIeR3oa3ypqLAcE1CcjN1RjKAP3iZAF0IAOGSsksOJKLTPV2+o17Ahf0l1sqmLFE9I8M
 FHyxAasZ6h8T9wBnpfFPQWgjc67QKkgRJOQzZkEsNSoM3rCWokkNdnTlHnXS1BVcEyjd
 Z0wSvWm61uV4AA/KJ02Tm1gteMMKObi5TCigFhzGLMBOHVDOso4Aq4kNWSclk68E8RKb
 ImoJPynZ5praLs2ZYxMCBf6On5XptY6+3OylLDEF6qUtOuSNojL7zxlZYnWU12h2bPZl
 xtnA==
X-Gm-Message-State: ANoB5pn+Psk3krBUInBrVoDzLZ3dBLgRN4HLl/FLLzMGT218P/C5Yhjz
 TJjSNsKrITG7hYLZq3Y/GzA1MTvf9EPVj+6i6jbwLwGS
X-Google-Smtp-Source: AA0mqf5zN2VRpK90SE5Abn245bTOiiCkf3LIxYZ+3cJX5Mtl+Bh/Q/g1Uy+DqqRBDuF9Da0kYZOK2zKmjfu6aij5D0A=
X-Received: by 2002:a05:6830:11cd:b0:66e:7741:ed1d with SMTP id
 v13-20020a05683011cd00b0066e7741ed1dmr11475147otq.224.1670893453190; Mon, 12
 Dec 2022 17:04:13 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 12 Dec 2022 17:04:12 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
X-Hashcash: 1:20:221213:control <at> debbugs.gnu.org::jIBIyEJA402b0SCo:2SG
MIME-Version: 1.0
Date: Mon, 12 Dec 2022 17:04:12 -0800
Message-ID: <CADwFkm=y3L7fNNbkhNYUDkp59p5pbuBs7QLz2r9+n+ck4ajqXw@HIDDEN>
Subject: control message for bug #59820
To: control <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

severity 59820 wishlist
quit




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 13 Dec 2022 13:51:02 +0000
Resent-Message-ID: <handler.59820.B59820.167093943915570 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: daanturo <daanturo@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.167093943915570
          (code B ref 59820); Tue, 13 Dec 2022 13:51:02 +0000
Received: (at 59820) by debbugs.gnu.org; 13 Dec 2022 13:50:39 +0000
Received: from localhost ([127.0.0.1]:60543 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p55g7-000434-CF
	for submit <at> debbugs.gnu.org; Tue, 13 Dec 2022 08:50:39 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39099)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1p55g5-00042x-AJ
 for 59820 <at> debbugs.gnu.org; Tue, 13 Dec 2022 08:50:37 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4343110010B;
 Tue, 13 Dec 2022 08:50:31 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C0C511000F4;
 Tue, 13 Dec 2022 08:50:29 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1670939429;
 bh=3Nuaq0HFxl8z9gAog8JyRM5+WwPKCPjF5XBxkv8JquQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=acrxQRYRuWon9ZM3gsZaDsvXAX3aVSGLA0CPRwPU7QXmOijKa40LY2/Z1zX4ziqyJ
 D1NSWyb37Dg2aVWZ8hVCV7BZxWRSKTyHmovzusmk45imOMYFQDEbScw6aq1SxZn8wR
 Nmh9m+5/EG5Kx51/g2KFF+ITKbizE3pRDWvWMMRjZ7jwQUTI0y3v7h+MYtvWvE3ljW
 HJcwOL62My6XHylahzf2s8pVGaWaiovkCtFsYpvx4KDWUXDGnGqPbyIS37EfO1i1eb
 10Au7B9dUrXsSvQetRqL//QnbEf1LiONnxeoweU31PMQqODdWP9zYYAkDGB9TwvDXF
 8IgJY+bZ+qPSA==
Received: from pastel (unknown [45.72.193.52])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9CF14120206;
 Tue, 13 Dec 2022 08:50:29 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 (daanturo@HIDDEN's message of "Mon, 5 Dec 2022 00:14:49 +0700")
Message-ID: <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
Date: Tue, 13 Dec 2022 08:50:27 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.414 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This patch provides the ELPA version (for Emacs < 24.4) of nadvice.el's
> advice-add the ability to handle anonymous advices.
[...]
> +(defun advice--ensure-symbol (func)
> +  (if (symbolp func)
> +      func
> +    (let* ((sym (intern (format "%S" func))))
> +      (unless (fboundp sym)
> +        (defalias sym func))
> +      sym)))

I'm not a big fan of this approach, and I usually recommend to use named
functions for advice anyway (avoids all kinds of problems like the
`advice-remove` failing to remove, or the equality test taking too much
time, ...).

IOW I'd rather align the "real nadvice.el" with the one in GNU ELPA than
the other way around in this respect.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: daanturo <daanturo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 13 Dec 2022 15:00:02 +0000
Resent-Message-ID: <handler.59820.B59820.167094358718790 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Stefan Monnier <monnier@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.167094358718790
          (code B ref 59820); Tue, 13 Dec 2022 15:00:02 +0000
Received: (at 59820) by debbugs.gnu.org; 13 Dec 2022 14:59:47 +0000
Received: from localhost ([127.0.0.1]:60934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p56l0-0004t0-Oj
	for submit <at> debbugs.gnu.org; Tue, 13 Dec 2022 09:59:47 -0500
Received: from mail-pj1-f51.google.com ([209.85.216.51]:50983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <daanturo@HIDDEN>) id 1p56ky-0004sq-E6
 for 59820 <at> debbugs.gnu.org; Tue, 13 Dec 2022 09:59:44 -0500
Received: by mail-pj1-f51.google.com with SMTP id fy4so3721720pjb.0
 for <59820 <at> debbugs.gnu.org>; Tue, 13 Dec 2022 06:59:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=in-reply-to:fcc:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=/uzTV9dy5vTIl+GZ6SQY6jZcwFh3eQAKI8uhLnxXwWs=;
 b=TkitLYyG+FRNH7DvyAb5vw5OyeTpIYoU7ORbmsingr71y2CPvVJ6/6i2+d4Hvd/csw
 GwXoX3zOfN2JC/62XA8FDgWvLblLcSz/uO3WoH5EnHQuzxCmjf3tmM+UFcyj266RUfSl
 g1hYvwd1q127kqFkYSvje7beCVbBo2TJQvvhDThUK2bEzsszEkbWNsVKS51Hd9TMTcy1
 utBWb8f4Y+6QCU08lzSDkTIEyY9/pUnaH3ZK/xF/rE9RbasXxUcL14neFAZDx0v6BqHu
 v0eLZXyCZDkZbdJ6NF9b8TzAtBhjHn31xBHRr9t4VasWmmrIJ2iOUbms47CwrrNQeTJ1
 HTyg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=in-reply-to:fcc:from:content-language:references:cc:to:subject
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=/uzTV9dy5vTIl+GZ6SQY6jZcwFh3eQAKI8uhLnxXwWs=;
 b=RYW8Kj1rWk4ZIgHIZVF9wSIHNORbvOzE5kvQ8CsOTYVcl/9VAZl65LUL3TQVdEo5M1
 IagxqE11Rs281xuScqbzaTLFOtL40J2PhxYP4k3B10TwBhEhcST9coz8rSAo1KKnBjRR
 ddWGeRhkg0tdIfrb5pzSptYfCnLBiigarSTL7bnFklpn04YzI8JFcntL/ZxEjO51doDJ
 sVzKIAWHgtUtcdcZDnRRn6Qw8YoLJTpg87K8384ZNL45lPlBXaRcXGxY3yqrfWoDx0ZK
 bLtf00tve4KP7b/ErKU+RuHpP31jJ+OMeXUU+7mjH6iWtmcQ4PSIdd6pXs/xlm+xuR1p
 /HZw==
X-Gm-Message-State: ANoB5plq5eZJf+Gh0ryBG7nTi/5e0xZUwlllcC5LbdRQT9D+CUnoY5Lz
 VeY5d+TTJV0NCTD/HBPkoDY=
X-Google-Smtp-Source: AA0mqf4v4Et6y9Ns+TFHRqsQGxeW3ON2EuiKku63EfGX82Yf7sOhj47j1kpBO88R/WVZffQd0J8EMg==
X-Received: by 2002:a05:6a20:d387:b0:aa:42ab:a3bb with SMTP id
 iq7-20020a056a20d38700b000aa42aba3bbmr27597060pzb.40.1670943578422; 
 Tue, 13 Dec 2022 06:59:38 -0800 (PST)
Received: from [192.168.1.15] ([14.169.66.97])
 by smtp.gmail.com with ESMTPSA id
 f12-20020a170902684c00b00189ed861791sm8584160pln.266.2022.12.13.06.59.36
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 13 Dec 2022 06:59:37 -0800 (PST)
Content-Type: multipart/mixed; boundary="------------UoikLx0q1DAfGuZ3P0tVdw0z"
Message-ID: <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
Date: Tue, 13 Dec 2022 21:59:23 +0700
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.5.1
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
Content-Language: en-US
From: daanturo <daanturo@HIDDEN>
X-Enigmail-Draft-Status: N00200
X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0;
 attachmentreminder=0; deliveryformat=0
X-Identity-Key: id8
Fcc: imap://daanturo%40gmail.com@HIDDEN/[Gmail]/Sent Mail
In-Reply-To: <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This is a multi-part message in MIME format.
--------------UoikLx0q1DAfGuZ3P0tVdw0z
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

> I usually recommend to use named
> functions for advice anyway

How about we still allow but warn against such problematic usage?


On 13/12/2022 20:50, Stefan Monnier wrote:
>> This patch provides the ELPA version (for Emacs < 24.4) of nadvice.el's
>> advice-add the ability to handle anonymous advices.
> [...]
>> +(defun advice--ensure-symbol (func)
>> +  (if (symbolp func)
>> +      func
>> +    (let* ((sym (intern (format "%S" func))))
>> +      (unless (fboundp sym)
>> +        (defalias sym func))
>> +      sym)))
> I'm not a big fan of this approach, and I usually recommend to use named
> functions for advice anyway (avoids all kinds of problems like the
> `advice-remove` failing to remove, or the equality test taking too much
> time, ...).
>
> IOW I'd rather align the "real nadvice.el" with the one in GNU ELPA than
> the other way around in this respect.
>
>
>         Stefan
>
-- 
Daanturo.

--------------UoikLx0q1DAfGuZ3P0tVdw0z
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-nadvice-nadvice.el-warn-against-non-symbol-FUNCTIONs.patch"
Content-Disposition: attachment;
 filename*0="0002-nadvice-nadvice.el-warn-against-non-symbol-FUNCTIONs.pa";
 filename*1="tch"
Content-Transfer-Encoding: base64

RnJvbSBiZjEwYTE5MTQ1ZTNmMDhhY2I3ZDY1ZmEyNjMxNmZiZGJlYjZmZDE3IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBEYWFudHVybyA8ZGFhbnR1cm9AZ21haWwuY29tPgpE
YXRlOiBUdWUsIDEzIERlYyAyMDIyIDIxOjI4OjAzICswNzAwClN1YmplY3Q6IFtQQVRDSF0g
KiBuYWR2aWNlL25hZHZpY2UuZWw6IHdhcm4gYWdhaW5zdCBub24tc3ltYm9sIEZVTkNUSU9O
cwoKLS0tCiBuYWR2aWNlLmVsIHwgMiArKwogMSBmaWxlIGNoYW5nZWQsIDIgaW5zZXJ0aW9u
cygrKQoKZGlmZiAtLWdpdCBhL25hZHZpY2UuZWwgYi9uYWR2aWNlLmVsCmluZGV4IDQ0M2E1
ZDAuLmU0NGJmZTEgMTAwNjQ0Ci0tLSBhL25hZHZpY2UuZWwKKysrIGIvbmFkdmljZS5lbApA
QCAtNTcsNiArNTcsOCBAQAogICAoaWYgKHN5bWJvbHAgZnVuYykKICAgICAgIGZ1bmMKICAg
ICAobGV0KiAoKHN5bSAoaW50ZXJuIChmb3JtYXQgIiVTIiBmdW5jKSkpKQorICAgICAgKG1l
c3NhZ2UgIlRoaXMgdmVyc2lvbiBvZiBuYWR2aWNlLmVsIHJlY29tbWVuZHMgdGhhdCBcCitG
VU5DVElPTjogJVMgaXMgYSBuYW1lZCBzeW1ib2wgaW5zdGVhZC4iIGZ1bmMpCiAgICAgICAo
dW5sZXNzIChmYm91bmRwIHN5bSkKICAgICAgICAgKGRlZmFsaWFzIHN5bSBmdW5jKSkKICAg
ICAgIHN5bSkpKQotLSAKMi4zOS4wCgo=

--------------UoikLx0q1DAfGuZ3P0tVdw0z--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Daan Ro <daanturo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 13 Dec 2022 15:04:01 +0000
Resent-Message-ID: <handler.59820.B59820.167094379019037 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Stefan Monnier <monnier@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org, Stefan Kangas <stefankangas@HIDDEN>
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.167094379019037
          (code B ref 59820); Tue, 13 Dec 2022 15:04:01 +0000
Received: (at 59820) by debbugs.gnu.org; 13 Dec 2022 15:03:10 +0000
Received: from localhost ([127.0.0.1]:60951 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p56oI-0004wz-Ch
	for submit <at> debbugs.gnu.org; Tue, 13 Dec 2022 10:03:10 -0500
Received: from mail-lf1-f54.google.com ([209.85.167.54]:37492)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <daanturo@HIDDEN>) id 1p56oH-0004wp-2t
 for 59820 <at> debbugs.gnu.org; Tue, 13 Dec 2022 10:03:09 -0500
Received: by mail-lf1-f54.google.com with SMTP id 1so5367000lfz.4
 for <59820 <at> debbugs.gnu.org>; Tue, 13 Dec 2022 07:03:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=hVZ9yQ7JsvMSp3kCgXDRwge5Ql2mS+CBUMbQEKujHtM=;
 b=Xw7TABMBuzDZgrF8lKMVBypZarkCViyz0LMxla/HmdWZVzb7WY2oCPvx/spqwznUX9
 bexYZ6g/YCg2pt1CA37+Wi0lBghneX1Vg6UYKRyk/Tz6qaAm1zYU2CYyRj2Xue/2Z6RK
 Vxs4tpfzhL7Svq0RjzzIB4nPCMlLJXqMqLTOGW4wClRTk8JYkMYDyzro12SGX+MHi/ZG
 7ou9Jdg4J3/Vh8XEgmG7hbvKdS6kNMmBage3Ev62qafwHUfee01m1uEbZ/3NL3uO2xgx
 2q0A3KfQHoGTkIBh0fdc4SVYg8S5obriFKwXz6A3WRXLVq5QEUQE/LWGAZ6DkcqVOJcH
 MJIw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=hVZ9yQ7JsvMSp3kCgXDRwge5Ql2mS+CBUMbQEKujHtM=;
 b=Hnh6ro95WVbDS2JMrOw+vwQNmuRbE7+f/GeV1QAuuHqvtxPU1csffMf8JMmZ0+nt72
 rfhFTZEwWQm1dDrmLrJ9dyb2zBSwEDvj7Y7wCRzhS0RuMwzMElTm9JktfyMNOHPKn9Zf
 OP6PPiYcc2qm9lcMUfyR4uaYxya5157Bo8b6fDLaEg966Nm+im5kZ4MP746M8KFtTry3
 VClqEc4sgRLWWg6FWu2OQvEsGjCExIYDIb8dKZ2nEScA6SPMSBph5wQUdrqNmXrimPaa
 rNhcfmqrF408lDMoh0vopXl5Wg3OjZ8bE9Xws2bO0WUGOysyYMFQNRk7b+DWbtJ/yMSp
 WIsA==
X-Gm-Message-State: ANoB5pmR0WplX+8NECBphssNLXO9KYnj9YOw6KsKDLzh+UybWaQK7Gl+
 o8CsFC0ZLzlzk57kK/C73jaA2bK2LXgUHl44Gng=
X-Google-Smtp-Source: AA0mqf4j1uHPms18SlP0jabFYxkBjxp5JuPC3ZLE/u/KFH3FwRt+n7CeeBS5RYGd1F51UEmgLcKd5ltnVMYORAR29k8=
X-Received: by 2002:a05:6512:3762:b0:4ac:5faa:654d with SMTP id
 z2-20020a056512376200b004ac5faa654dmr30030159lft.684.1670943782764; Tue, 13
 Dec 2022 07:03:02 -0800 (PST)
MIME-Version: 1.0
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
 <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
In-Reply-To: <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
From: Daan Ro <daanturo@HIDDEN>
Date: Tue, 13 Dec 2022 22:02:51 +0700
Message-ID: <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000009cb77c05efb6ea83"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000009cb77c05efb6ea83
Content-Type: multipart/alternative; boundary="0000000000009cb77a05efb6ea81"

--0000000000009cb77a05efb6ea81
Content-Type: text/plain; charset="UTF-8"

Use `warn` instead of `message`.

On Tue, Dec 13, 2022 at 9:59 PM daanturo <daanturo@HIDDEN> wrote:

> > I usually recommend to use named
> > functions for advice anyway
>
> How about we still allow but warn against such problematic usage?
>
>
> On 13/12/2022 20:50, Stefan Monnier wrote:
> >> This patch provides the ELPA version (for Emacs < 24.4) of nadvice.el's
> >> advice-add the ability to handle anonymous advices.
> > [...]
> >> +(defun advice--ensure-symbol (func)
> >> +  (if (symbolp func)
> >> +      func
> >> +    (let* ((sym (intern (format "%S" func))))
> >> +      (unless (fboundp sym)
> >> +        (defalias sym func))
> >> +      sym)))
> > I'm not a big fan of this approach, and I usually recommend to use named
> > functions for advice anyway (avoids all kinds of problems like the
> > `advice-remove` failing to remove, or the equality test taking too much
> > time, ...).
> >
> > IOW I'd rather align the "real nadvice.el" with the one in GNU ELPA than
> > the other way around in this respect.
> >
> >
> >         Stefan
> >
> --
> Daanturo.
>


-- 
Daanturo.

--0000000000009cb77a05efb6ea81
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Use `warn` instead of `message`.<br></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 13, 2022=
 at 9:59 PM daanturo &lt;<a href=3D"mailto:daanturo@HIDDEN">daanturo@gma=
il.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex">&gt; I usually recommend to use named<br>
&gt; functions for advice anyway<br>
<br>
How about we still allow but warn against such problematic usage?<br>
<br>
<br>
On 13/12/2022 20:50, Stefan Monnier wrote:<br>
&gt;&gt; This patch provides the ELPA version (for Emacs &lt; 24.4) of nadv=
ice.el&#39;s<br>
&gt;&gt; advice-add the ability to handle anonymous advices.<br>
&gt; [...]<br>
&gt;&gt; +(defun advice--ensure-symbol (func)<br>
&gt;&gt; +=C2=A0 (if (symbolp func)<br>
&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 func<br>
&gt;&gt; +=C2=A0 =C2=A0 (let* ((sym (intern (format &quot;%S&quot; func))))=
<br>
&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 (unless (fboundp sym)<br>
&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (defalias sym func))<br>
&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 sym)))<br>
&gt; I&#39;m not a big fan of this approach, and I usually recommend to use=
 named<br>
&gt; functions for advice anyway (avoids all kinds of problems like the<br>
&gt; `advice-remove` failing to remove, or the equality test taking too muc=
h<br>
&gt; time, ...).<br>
&gt;<br>
&gt; IOW I&#39;d rather align the &quot;real nadvice.el&quot; with the one =
in GNU ELPA than<br>
&gt; the other way around in this respect.<br>
&gt;<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Stefan<br>
&gt;<br>
-- <br>
Daanturo.<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr">Daanturo.<br></div></div>

--0000000000009cb77a05efb6ea81--

--0000000000009cb77c05efb6ea83
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0002-nadvice-nadvice.el-warn-against-non-symbol-FUNCTIONs.patch"
Content-Disposition: attachment; 
	filename="0002-nadvice-nadvice.el-warn-against-non-symbol-FUNCTIONs.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_lbmcr5d20>
X-Attachment-Id: f_lbmcr5d20

RnJvbSBmMzBhMWY2ZDgxNWEwMzhkZGU1MWVhMDkwODllOWFhMjE1NWM4YzYyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBEYWFudHVybyA8ZGFhbnR1cm9AZ21haWwuY29tPgpEYXRlOiBU
dWUsIDEzIERlYyAyMDIyIDIxOjI4OjAzICswNzAwClN1YmplY3Q6IFtQQVRDSF0gKiBuYWR2aWNl
L25hZHZpY2UuZWw6IHdhcm4gYWdhaW5zdCBub24tc3ltYm9sIEZVTkNUSU9OcwoKLS0tCiBuYWR2
aWNlLmVsIHwgMiArKwogMSBmaWxlIGNoYW5nZWQsIDIgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdp
dCBhL25hZHZpY2UuZWwgYi9uYWR2aWNlLmVsCmluZGV4IDQ0M2E1ZDAuLmM2NjY2ZDAgMTAwNjQ0
Ci0tLSBhL25hZHZpY2UuZWwKKysrIGIvbmFkdmljZS5lbApAQCAtNTcsNiArNTcsOCBAQAogICAo
aWYgKHN5bWJvbHAgZnVuYykKICAgICAgIGZ1bmMKICAgICAobGV0KiAoKHN5bSAoaW50ZXJuIChm
b3JtYXQgIiVTIiBmdW5jKSkpKQorICAgICAgKHdhcm4gIlRoaXMgdmVyc2lvbiBvZiBuYWR2aWNl
LmVsIHJlY29tbWVuZHMgdGhhdCBcCitGVU5DVElPTjogJVMgaXMgYSBuYW1lZCBzeW1ib2wgaW5z
dGVhZC4iIGZ1bmMpCiAgICAgICAodW5sZXNzIChmYm91bmRwIHN5bSkKICAgICAgICAgKGRlZmFs
aWFzIHN5bSBmdW5jKSkKICAgICAgIHN5bSkpKQotLSAKMi4zOS4wCgo=
--0000000000009cb77c05efb6ea83--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Stefan Kangas <stefankangas@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 09 Oct 2023 09:46:02 +0000
Resent-Message-ID: <handler.59820.B59820.169684474928280 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Daan Ro <daanturo@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.169684474928280
          (code B ref 59820); Mon, 09 Oct 2023 09:46:02 +0000
Received: (at 59820) by debbugs.gnu.org; 9 Oct 2023 09:45:49 +0000
Received: from localhost ([127.0.0.1]:59336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qpmph-0007M4-5q
	for submit <at> debbugs.gnu.org; Mon, 09 Oct 2023 05:45:49 -0400
Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:42031)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qpmpf-0007Lj-Gd
 for 59820 <at> debbugs.gnu.org; Mon, 09 Oct 2023 05:45:47 -0400
Received: by mail-lj1-x22b.google.com with SMTP id
 38308e7fff4ca-2c3e23a818bso10433441fa.0
 for <59820 <at> debbugs.gnu.org>; Mon, 09 Oct 2023 02:45:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1696844721; x=1697449521; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=M24ny1Ekz+jx/MF1PyixBlUELfNWUJrY3OC29ar7iac=;
 b=kQAUjT9w/xHWOcLgbYsuVddDklN623m+U3LKfSOzxBkGvnDWCqg0LGlXQNLQn2s1J8
 SOcjf8yXXrWhLvGUM9PXNjw8A7LuZBLBNiRGC+wD652b2C6A2cuzVtC4W0/sUeG9dXKo
 KjtM5xyhY2n2+N55SYkhhDsEDx6tTzKLJAYVwKVLVX3UMKGkDcexYXHhnTEaitEz9PvK
 dKDVbbBl1weFRZs5vs37LhOsTAZPy4RrO7HjLq7SBElfw+mg5MlajjXfmLx1q+mA4VhO
 WwCUbpWINZqwJZIJByRcGtUpragHcr4BGvWuhocxBddD2EF0Az6TImekG/k/lfdmHDl/
 JoDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696844721; x=1697449521;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=M24ny1Ekz+jx/MF1PyixBlUELfNWUJrY3OC29ar7iac=;
 b=fCZyE5+Pq7Hqko1qQADBigJCpEb/ISf1hMR20VR8JNyu/4RebDQrKlCge0aWmMkI7+
 xKHV9bPcLZ+mQ5wN9O8Xh4IcVLrKJyJ4cW8gSYL88WNmpaGRXo8Sl5V00roBQc8Yur/S
 Bj4gFDZwDclIU9aaQX0iQCWCl9MtkkiHxMBfyqOBaSlVhYOxKlIpr4bnhcYIJc6DwCIK
 o467BuERTxcM7ja4W7LGSFB81gAdY8hxYrpFwdf7DTqaKVkLtVnla/tbASNXGS1dYkAT
 wxcOE4qIauwRwiR5r0eDwcXGIaBSLMWWXAvDRMdeODIh2er5WxWStdKxKjhZPLp6sulM
 bp9g==
X-Gm-Message-State: AOJu0Yw+Ixv3ExWYCn86vIgF7qjEoqUlTDl/TNDXOkRnb4qyFXdaYtCN
 nrSZySujBRGywT6y7YY0+88qZSyHB2AP7EmGWgg=
X-Google-Smtp-Source: AGHT+IFHtONuywQSmwYLIIrZ4EQl1amyG8ZkiQR5NQZI8p2Ef2SrKr9Jr79sJ+bdqTcWwSzYJ6YDcTB1QS/kJpOS9NA=
X-Received: by 2002:a05:651c:230b:b0:2be:58a8:1ac with SMTP id
 bi11-20020a05651c230b00b002be58a801acmr8448953ljb.1.1696844720966; Mon, 09
 Oct 2023 02:45:20 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 9 Oct 2023 09:45:20 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
 <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
 <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
MIME-Version: 1.0
Date: Mon, 9 Oct 2023 09:45:20 +0000
Message-ID: <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 59820 + patch
thanks

Daan Ro <daanturo@HIDDEN> writes:

> Use `warn` instead of `message`.

Stefan, what do you think?  Should the below patch be installed?

> From f30a1f6d815a038dde51ea09089e9aa2155c8c62 Mon Sep 17 00:00:00 2001
> From: Daanturo <daanturo@HIDDEN>
> Date: Tue, 13 Dec 2022 21:28:03 +0700
> Subject: [PATCH] * nadvice/nadvice.el: warn against non-symbol FUNCTIONs
>
> ---
>  nadvice.el | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/nadvice.el b/nadvice.el
> index 443a5d0..c6666d0 100644
> --- a/nadvice.el
> +++ b/nadvice.el
> @@ -57,6 +57,8 @@
>    (if (symbolp func)
>        func
>      (let* ((sym (intern (format "%S" func))))
> +      (warn "This version of nadvice.el recommends that \
> +FUNCTION: %S is a named symbol instead." func)
>        (unless (fboundp sym)
>          (defalias sym func))
>        sym)))
> --
> 2.39.0




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 09 Oct 2023 22:08:02 +0000
Resent-Message-ID: <handler.59820.B59820.16968892393742 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Stefan Kangas <stefankangas@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org, Daan Ro <daanturo@HIDDEN>
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.16968892393742
          (code B ref 59820); Mon, 09 Oct 2023 22:08:02 +0000
Received: (at 59820) by debbugs.gnu.org; 9 Oct 2023 22:07:19 +0000
Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qpyPH-0000yI-9A
	for submit <at> debbugs.gnu.org; Mon, 09 Oct 2023 18:07:19 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qpyPB-0000xs-IE
 for 59820 <at> debbugs.gnu.org; Mon, 09 Oct 2023 18:07:17 -0400
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==
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)
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)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@HIDDEN>
 (Stefan Kangas's message of "Mon, 9 Oct 2023 09:45:20 +0000")
Message-ID: <jwvwmvvo3yh.fsf-monnier+emacs@HIDDEN>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
 <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
 <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
 <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@HIDDEN>
Date: Mon, 09 Oct 2023 18:06:40 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.008 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> 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





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol (closure/lambda) advices (old Emacs)
Resent-From: Stefan Kangas <stefankangas@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 10 Oct 2023 10:45:01 +0000
Resent-Message-ID: <handler.59820.B59820.169693469228541 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 59820
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Stefan Monnier <monnier@HIDDEN>
Cc: 59820 <at> debbugs.gnu.org, Daan Ro <daanturo@HIDDEN>
Received: via spool by 59820-submit <at> debbugs.gnu.org id=B59820.169693469228541
          (code B ref 59820); Tue, 10 Oct 2023 10:45:01 +0000
Received: (at 59820) by debbugs.gnu.org; 10 Oct 2023 10:44:52 +0000
Received: from localhost ([127.0.0.1]:34079 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qqAEO-0007QH-42
	for submit <at> debbugs.gnu.org; Tue, 10 Oct 2023 06:44:52 -0400
Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:58570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qqAEI-0007Pj-G3
 for 59820 <at> debbugs.gnu.org; Tue, 10 Oct 2023 06:44:49 -0400
Received: by mail-lj1-x22d.google.com with SMTP id
 38308e7fff4ca-2c1886777d9so65692031fa.0
 for <59820 <at> debbugs.gnu.org>; Tue, 10 Oct 2023 03:44:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1696934659; x=1697539459; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=iJ+mH/Urfmo7hnbLq8edfKu87QEzKh9CfC5wVFRqGd0=;
 b=Mo3tUWtBLupiRQwmrBN/RoQBXRKmmzlSRipVVLHF0eqtsEeY/KzVLEiHFepG3N31jM
 dfns/X/a1dMsnyP5uVgsy/tpY+3e9TpGFGDbVOrKx99KvhNmZ4t18RPhuZhgOn1kxKro
 CKMe2GzLSH7UGcI8/czjDlk5GHDTAMN8IxxwCHj1ZCtKVauEQp6Zg98lNF3MjSvMK9uZ
 7dbMtWAWEiqCUManXqZyJU0KUmrg0/u8CJXtXyapdy5O5xYNYYXeM3EMcvGBFbyoeTBB
 D9EhMuxJTZaX5K7g6n1wum1RyLwBZvqBt4S8xBewN2xeG/blKX37JGSJtE2WkxwCpg1C
 l/Kg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696934659; x=1697539459;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=iJ+mH/Urfmo7hnbLq8edfKu87QEzKh9CfC5wVFRqGd0=;
 b=q0emygIXMJX4p3vaVCF8tzVVN9aWgH9SbwXAawml/VBcEkQfHBsODik94aj+yfSu+g
 KjVg24lZ8Wnu/kuc/cIlk8TXzk6etO4vNrfsfGIA7e1MQLKdqvjxzroXi7hgzVdhDuEw
 5DCRRPB68PqK3+ykvDbj3v7/5gTBTUoMDLgQWfdx5DCBuTkNR9p6WrLht9bxzG7zAvvu
 kWiELhPHxNRiKR23MXQUfFupejX+jrBIRycPeBIxcfXx+NwcEHAvYwZOuk/eNC33COzc
 cAkXvBNGtLW7TiQSvqwvN59643Jx0cY/TUhLYjEWd0GkJmZYz+lKQQanttekNEOvLfQA
 JnHg==
X-Gm-Message-State: AOJu0Yzbi85xmlJ9f598eL2uKf9rLcPndkA/DVYMf0/M9PuUcX6ko8iU
 4+rKJAm3qehjpsntB91VP8MFW4TvmfDYZ/w1Qz4=
X-Google-Smtp-Source: AGHT+IGYGs7JY6eXC96FLCY2/9ehnZITZg6XYoaAJ+iIc0IJku0qvmiDfTcxHYGz/Xs5usVJKL8gfU5bClWHEfVYX/Q=
X-Received: by 2002:a2e:7d08:0:b0:2bb:bfa5:b72c with SMTP id
 y8-20020a2e7d08000000b002bbbfa5b72cmr14001936ljc.15.1696934658896; Tue, 10
 Oct 2023 03:44:18 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Tue, 10 Oct 2023 10:44:18 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwvwmvvo3yh.fsf-monnier+emacs@HIDDEN>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
 <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
 <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
 <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@HIDDEN>
 <jwvwmvvo3yh.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Tue, 10 Oct 2023 10:44:18 +0000
Message-ID: <CADwFkmn3erxje_yTSVcMp4WoTu__HP06Hf9eB6qB5eqizaCo4A@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 59820 + moreinfo
thanks

Stefan Monnier <monnier@HIDDEN> writes:

>>> 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.

Makes sense.  I've tagged the bug as moreinfo for now, but barring a
compelling use case I'm also leaning towards closing this as wontfix.




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 10 Oct 2023 10:44:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 10 06:44:49 2023
Received: from localhost ([127.0.0.1]:34077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qqAEK-0007Pz-Q2
	for submit <at> debbugs.gnu.org; Tue, 10 Oct 2023 06:44:49 -0400
Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:59757)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qqAEI-0007Pi-Gk
 for control <at> debbugs.gnu.org; Tue, 10 Oct 2023 06:44:47 -0400
Received: by mail-lj1-x230.google.com with SMTP id
 38308e7fff4ca-2c007d6159aso65445391fa.3
 for <control <at> debbugs.gnu.org>; Tue, 10 Oct 2023 03:44:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1696934659; x=1697539459; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=iJ+mH/Urfmo7hnbLq8edfKu87QEzKh9CfC5wVFRqGd0=;
 b=Mo3tUWtBLupiRQwmrBN/RoQBXRKmmzlSRipVVLHF0eqtsEeY/KzVLEiHFepG3N31jM
 dfns/X/a1dMsnyP5uVgsy/tpY+3e9TpGFGDbVOrKx99KvhNmZ4t18RPhuZhgOn1kxKro
 CKMe2GzLSH7UGcI8/czjDlk5GHDTAMN8IxxwCHj1ZCtKVauEQp6Zg98lNF3MjSvMK9uZ
 7dbMtWAWEiqCUManXqZyJU0KUmrg0/u8CJXtXyapdy5O5xYNYYXeM3EMcvGBFbyoeTBB
 D9EhMuxJTZaX5K7g6n1wum1RyLwBZvqBt4S8xBewN2xeG/blKX37JGSJtE2WkxwCpg1C
 l/Kg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696934659; x=1697539459;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=iJ+mH/Urfmo7hnbLq8edfKu87QEzKh9CfC5wVFRqGd0=;
 b=M6SawWGB9Vn6oiyJwFezuVUhFDAlwrt0MRjBhZBG+JRmy51Qj4dbGnCQidtsBuG+W/
 SzzD/R1+uU4VJ79smDJq3Nbk5WcnvbpfM7COFRhJXOLlfrdvqekRlqDzMVfLX9cHho+u
 bSIS/hXhzC8Yzjsr/WnoJ+xcrqw/+4kh+M/LVcS18Ttv08OIbvVmPn23BXQl8vpUTyYo
 iR1EtZrkmduKgSomca3jgZTN4b2CWfUODOrUqPEK6VeTRzn4A0y8Z3ZH/kGJZPct7pRQ
 UycGqsAAk+2jWQoCcV/7q/69UatdrPpP3DbpLgnmeQf22GubyugpOAZCmIljdHBcYejM
 W2pg==
X-Gm-Message-State: AOJu0YzXlQsEQFYMye4Xm+EqRNlw7M4RK9ttVp51FItuHw1b3703GhdJ
 HwuKcHet/aADh9m0Xf0m2Q0Tyw4Foq0No42hDsw=
X-Google-Smtp-Source: AGHT+IGYGs7JY6eXC96FLCY2/9ehnZITZg6XYoaAJ+iIc0IJku0qvmiDfTcxHYGz/Xs5usVJKL8gfU5bClWHEfVYX/Q=
X-Received: by 2002:a2e:7d08:0:b0:2bb:bfa5:b72c with SMTP id
 y8-20020a2e7d08000000b002bbbfa5b72cmr14001936ljc.15.1696934658896; Tue, 10
 Oct 2023 03:44:18 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Tue, 10 Oct 2023 10:44:18 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwvwmvvo3yh.fsf-monnier+emacs@HIDDEN>
References: <93f01864-6cdf-2d04-d08c-d0b52dc7773f@HIDDEN>
 <jwvwn6vctd0.fsf-monnier+emacs@HIDDEN>
 <a157dccd-eb0f-bd28-55f8-55ae6a6e336f@HIDDEN>
 <CAGNN0nDNa2o4ngakELSvd_2w5NFzsyf=wH-W280T3NK9v_QdLg@HIDDEN>
 <CADwFkmk0pcRrSR04nwv7tiuB9uVFKNVDW6w6nRCRsDt+QjSaYw@HIDDEN>
 <jwvwmvvo3yh.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Tue, 10 Oct 2023 10:44:18 +0000
Message-ID: <CADwFkmn3erxje_yTSVcMp4WoTu__HP06Hf9eB6qB5eqizaCo4A@HIDDEN>
Subject: Re: bug#59820: [PATCH] * nadvice/nadvice.el: support non-symbol
 (closure/lambda) advices (old Emacs)
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Bcc: control <at> debbugs.gnu.org
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
Cc: 59820 <at> debbugs.gnu.org, Daan Ro <daanturo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 59820 + moreinfo
thanks

Stefan Monnier <monnier@HIDDEN> writes:

>>> 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.

Makes sense.  I've tagged the bug as moreinfo for now, but barring a
compelling use case I'm also leaning towards closing this as wontfix.





Last modified: Tue, 10 Oct 2023 11:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.