From unknown Sat Aug 09 01:05:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13023 <13023@debbugs.gnu.org> To: bug#13023 <13023@debbugs.gnu.org> Subject: Status: 24.3.50; lexical binding does not work within defadvice Reply-To: bug#13023 <13023@debbugs.gnu.org> Date: Sat, 09 Aug 2025 08:05:53 +0000 retitle 13023 24.3.50; lexical binding does not work within defadvice reassign 13023 emacs submitter 13023 Christopher Schmidt severity 13023 normal tag 13023 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 11:19:41 2012 Received: (at submit) by debbugs.gnu.org; 28 Nov 2012 16:19:41 +0000 Received: from localhost ([127.0.0.1]:43862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdkMO-0000lB-TO for submit@debbugs.gnu.org; Wed, 28 Nov 2012 11:19:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52777) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdkMM-0000l3-8H for submit@debbugs.gnu.org; Wed, 28 Nov 2012 11:19:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdkKP-00008s-EO for submit@debbugs.gnu.org; Wed, 28 Nov 2012 11:17:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdkKP-00008o-BE for submit@debbugs.gnu.org; Wed, 28 Nov 2012 11:17:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdkKF-0000iq-P3 for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 11:17:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdkK7-000083-VD for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 11:17:27 -0500 Received: from ristopher.com ([146.185.21.93]:33891 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdkK7-00007m-Ml for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2012 11:17:19 -0500 Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id 502CF214B1; Wed, 28 Nov 2012 16:17:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1354119437; bh=Fz3CW6E4r0iwEYu/RRIRUxzL2MpJ4eVAko+/LX3DWcU=; h=From:To:Subject:Message-ID:MIME-Version:Content-Type:Date; b=C7aIORZETXC15X5HMpEUOR2Y9ofH4iDj5b32qfwts8gZ79dkX0XFa9oZbFMItUk+3 IfSR1IY04VJKFlrEKhA4jf+3INM7kCqPs8g2ocBdalb6m8Xbwg6sExNHkVHnYLQIsN 0yNtW8rHUrue3+H4o+F2CuTm8+VkchFd4K2qhaRI= From: Christopher Schmidt To: bug-gnu-emacs@gnu.org Subject: 24.3.50; lexical binding does not work within defadvice Message-ID: <87zk213do1@ch.ristopher.com> Mail-Followup-To: bug-gnu-emacs@gnu.org MIME-Version: 1.0 Content-Type: text/plain Date: Wed, 28 Nov 2012 16:17:17 +0000 (GMT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) ;; -*- lexical-binding: t -*- (funcall (let ((rms "works")) (lambda () (message "lex-bind %s" rms)))) (defun asdf (b) (funcall b)) (defadvice asdf (before rms (b) activate) (setf b (let ((abc 1) (b b)) (lambda () (print abc) (funcall b))))) (asdf 'ding) I think this code should work fine. It doesn't work with trunk and emacs-24, though: Load test.elc? (y or n) y Loading test.elc... lex-bind works Load error for test.elc: (void-variable abc) Christopher From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 23:34:36 2012 Received: (at 13023) by debbugs.gnu.org; 29 Nov 2012 04:34:36 +0000 Received: from localhost ([127.0.0.1]:44423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdvpc-0003J9-AM for submit@debbugs.gnu.org; Wed, 28 Nov 2012 23:34:36 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23341) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tdvpb-0003J3-Fr for 13023@debbugs.gnu.org; Wed, 28 Nov 2012 23:34:35 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKh9/2dsb2JhbABEsEiDSYEIghUBAQQBVigLCzQSFBgNiEAFugmNJoMeA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208722636" Received: from 69-196-168-125.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.125]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Nov 2012 23:32:37 -0500 Received: by pastel.home (Postfix, from userid 20848) id BB7FA58B5B; Wed, 28 Nov 2012 23:32:36 -0500 (EST) From: Stefan Monnier To: 13023@debbugs.gnu.org Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice Message-ID: References: <87zk213do1@ch.ristopher.com> Date: Wed, 28 Nov 2012 23:32:36 -0500 In-Reply-To: <87zk213do1@ch.ristopher.com> (Christopher Schmidt's message of "Wed, 28 Nov 2012 16:17:17 +0000 (GMT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13023 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > ;; -*- lexical-binding: t -*- > (funcall (let ((rms "works")) > (lambda () > (message "lex-bind %s" rms)))) > (defun asdf (b) (funcall b)) > (defadvice asdf (before rms (b) activate) > (setf b (let ((abc 1) (b b)) (lambda () (print abc) (funcall b))))) > (asdf 'ding) > I think this code should work fine. It doesn't work with trunk and > emacs-24, though: Indeed, it doesn't work. And because of the way advice.el works (building a new function by combining the code chunks from all the pieces of advice applied to that function) it's not easy to fix. This is partly related to the issue mentioned recently that macro calls in pieces of advice are expanded late (typically when the advised function is defined). BTW, this does not affect the new `advice-add' feature in Emacs trunk. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 17:52:10 2012 Received: (at 13023) by debbugs.gnu.org; 29 Nov 2012 22:52:10 +0000 Received: from localhost ([127.0.0.1]:45689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeCxm-0005Q8-01 for submit@debbugs.gnu.org; Thu, 29 Nov 2012 17:52:10 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:49611) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeCxi-0005Q0-Ph for 13023@debbugs.gnu.org; Thu, 29 Nov 2012 17:52:07 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TeCvi-0001rJ-Vf; Thu, 29 Nov 2012 17:50:03 -0500 Date: Thu, 29 Nov 2012 17:50:02 -0500 Message-Id: Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Wed, 28 Nov 2012 23:32:36 -0500) Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice References: <87zk213do1@ch.ristopher.com> X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) Indeed, it doesn't work. And because of the way advice.el works (building a new function by combining the code chunks from all the pieces of advice applied to that function) it's not easy to fix. Would it be possible to fix this by defining a new primitive construct for use in the constructed function that runs the advince? -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 29 22:47:11 2012 Received: (at 13023) by debbugs.gnu.org; 30 Nov 2012 03:47:11 +0000 Received: from localhost ([127.0.0.1]:45832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeHZH-0005WL-79 for submit@debbugs.gnu.org; Thu, 29 Nov 2012 22:47:11 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35561) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeHZC-0005WC-7N for 13023@debbugs.gnu.org; Thu, 29 Nov 2012 22:47:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKh9/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDYhABboJjSaDHgOIQppxgViDBw X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208794368" Received: from 69-196-168-125.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.125]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Nov 2012 22:45:02 -0500 Received: by pastel.home (Postfix, from userid 20848) id C3D1A59069; Thu, 29 Nov 2012 22:45:01 -0500 (EST) From: Stefan Monnier To: rms@gnu.org Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice Message-ID: References: <87zk213do1@ch.ristopher.com> Date: Thu, 29 Nov 2012 22:45:01 -0500 In-Reply-To: (Richard Stallman's message of "Thu, 29 Nov 2012 17:50:02 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > Indeed, it doesn't work. And because of the way advice.el works > (building a new function by combining the code chunks from all the > pieces of advice applied to that function) it's not easy to fix. > Would it be possible to fix this by defining a new primitive construct > for use in the constructed function that runs the advice? I don't think there's a need to add any new primitive. If someone wants to dig into advice.el to try and fix it, it can be fixed there (as evidenced by advice-add). I personally would rather tell people to use advice-add instead. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 30 15:13:25 2012 Received: (at 13023) by debbugs.gnu.org; 30 Nov 2012 20:13:26 +0000 Received: from localhost ([127.0.0.1]:47466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeWxh-0006Gf-O3 for submit@debbugs.gnu.org; Fri, 30 Nov 2012 15:13:25 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:42556) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TeWxg-0006GX-20 for 13023@debbugs.gnu.org; Fri, 30 Nov 2012 15:13:24 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TeWvb-0006lO-Uz; Fri, 30 Nov 2012 15:11:16 -0500 Date: Fri, 30 Nov 2012 15:11:15 -0500 Message-Id: Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Thu, 29 Nov 2012 22:45:01 -0500) Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice References: <87zk213do1@ch.ristopher.com> X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) I don't think there's a need to add any new primitive. If someone wants to dig into advice.el to try and fix it, it can be fixed there (as evidenced by advice-add). I personally would rather tell people to use advice-add instead. That would, in effect, be an incompatible change in interface. Why make the change? Is there something wrong with defadvice? -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 30 23:25:32 2012 Received: (at 13023) by debbugs.gnu.org; 1 Dec 2012 04:25:32 +0000 Received: from localhost ([127.0.0.1]:47752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teedw-0003s4-KG for submit@debbugs.gnu.org; Fri, 30 Nov 2012 23:25:32 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:33975) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teedu-0003rx-Rg for 13023@debbugs.gnu.org; Fri, 30 Nov 2012 23:25:31 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKh9/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDYhABboJjSaDHgOIQppxgViDBw X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208863180" Received: from 69-196-168-125.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.125]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Nov 2012 23:23:19 -0500 Received: by pastel.home (Postfix, from userid 20848) id 7B7BA59069; Fri, 30 Nov 2012 23:23:19 -0500 (EST) From: Stefan Monnier To: rms@gnu.org Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice Message-ID: References: <87zk213do1@ch.ristopher.com> Date: Fri, 30 Nov 2012 23:23:18 -0500 In-Reply-To: (Richard Stallman's message of "Fri, 30 Nov 2012 15:11:15 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > Is there something wrong with defadvice? Yes: complexity. Compare nadvice.el and advice.el. Even after you remove the long comment at the beginning, the difference in code size speaks for itself. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 19:03:20 2012 Received: (at 13023) by debbugs.gnu.org; 2 Dec 2012 00:03:20 +0000 Received: from localhost ([127.0.0.1]:48893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tex1i-0008JV-T7 for submit@debbugs.gnu.org; Sat, 01 Dec 2012 19:03:19 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:32990) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tex1f-0008JN-Q4 for 13023@debbugs.gnu.org; Sat, 01 Dec 2012 19:03:16 -0500 Received: by mail-ee0-f44.google.com with SMTP id b47so1047517eek.3 for <13023@debbugs.gnu.org>; Sat, 01 Dec 2012 16:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=a6EhcgXsXwr68zRNnFChi4A/ZSUTWCyk8eBt+fLv7xw=; b=AhxCh7m2ew6baDQtI5Q9D6RMDWowY/45eaDHGfM+DqdQJS8NGmI1eSG7M1BD6GbAUY hFVb63/K4A9O1vAU3B4ud0EJUukKyrHFI8S7FV17eRXfpR9DVQqZeKA4X8+15DydMS+U T6NmhBwf88Oqq6jle5k2RG3086IgBIYHuOw4YMp3dmtzzmyxQUQaZoXXDih9cxr0YCLi AD+KrU8wiiEvlb7rs0R9nlgjhhbM/2sk/aMH0ZZkCtxO+7YeC3tb1Qnwaxg+ovIrmRMt b8lD7BJpbtRhTHubU2MhS+P2THhCTx2TrRR+YAUC4oOdsSd9v2AO9jqNvNXYVTiYlVTI d5rw== Received: by 10.14.193.136 with SMTP id k8mr20192258een.30.1354406461338; Sat, 01 Dec 2012 16:01:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.4.209 with HTTP; Sat, 1 Dec 2012 16:00:20 -0800 (PST) In-Reply-To: References: <87zk213do1@ch.ristopher.com> From: Juanma Barranquero Date: Sun, 2 Dec 2012 01:00:20 +0100 Message-ID: Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org, Richard Stallman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) > Even after you > remove the long comment at the beginning, the difference in code size > speaks for itself. Exactly 1,000 lines longer, after removing comments and blank lines: 1,305 vs 305. (Bored, moi?) Juanma From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 01 23:18:12 2012 Received: (at 13023) by debbugs.gnu.org; 2 Dec 2012 04:18:13 +0000 Received: from localhost ([127.0.0.1]:49115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tf10O-0000kr-Mk for submit@debbugs.gnu.org; Sat, 01 Dec 2012 23:18:12 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:34024) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tf10N-0000kl-PO for 13023@debbugs.gnu.org; Sat, 01 Dec 2012 23:18:12 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tf0yC-0001kF-EO; Sat, 01 Dec 2012 23:15:56 -0500 Date: Sat, 01 Dec 2012 23:15:56 -0500 Message-Id: Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Fri, 30 Nov 2012 23:23:18 -0500) Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice References: <87zk213do1@ch.ristopher.com> X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) Yes: complexity. Compare nadvice.el and advice.el. The main difference seems to me that part of the arguments of advice.el get pushed into the function that you need to pass to advice-add. So the complexity of using it is no more. Also, you lose the ability to modify the argument values before the advised function's body. The doc string of advice-add is incomplete, so I cannot tell what all its args mean or what it can really do. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 02 19:04:10 2012 Received: (at 13023) by debbugs.gnu.org; 3 Dec 2012 00:04:10 +0000 Received: from localhost ([127.0.0.1]:50568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfJW5-0006Gb-Cy for submit@debbugs.gnu.org; Sun, 02 Dec 2012 19:04:10 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46347) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfJW3-0006GT-9z for 13023@debbugs.gnu.org; Sun, 02 Dec 2012 19:04:08 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TfJTg-0004X2-Hi; Sun, 02 Dec 2012 19:01:40 -0500 Date: Sun, 02 Dec 2012 19:01:40 -0500 Message-Id: Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman to: monnier@iro.umontreal.ca, 13023@debbugs.gnu.org In-reply-to: (message from Richard Stallman on Sat, 01 Dec 2012 23:15:56 -0500) Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice References: <87zk213do1@ch.ristopher.com> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 13023 Cc: rms@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Correction: Yes: complexity. Compare nadvice.el and advice.el. The main difference seems to me that part of the arguments of advice.el get pushed into the function that you need to pass to advice-add. So the complexity of using advice-add is no less. Also, you lose the ability to modify the argument values before the advised function's body. The doc string of advice-add is incomplete, so I cannot tell what all its args mean or what it can really do. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 13:35:49 2016 Received: (at 13023) by debbugs.gnu.org; 2 Feb 2016 18:35:49 +0000 Received: from localhost ([127.0.0.1]:57046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfnp-0008AX-5S for submit@debbugs.gnu.org; Tue, 02 Feb 2016 13:35:49 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:59144) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfnn-0008AM-0S for 13023@debbugs.gnu.org; Tue, 02 Feb 2016 13:35:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 771329D2002; Tue, 2 Feb 2016 19:35:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id leFEikQcT+vf; Tue, 2 Feb 2016 19:35:43 +0100 (CET) Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 2AF0A9D2001; Tue, 2 Feb 2016 19:35:41 +0100 (CET) From: Marcin Borkowski To: Stefan Monnier Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice Date: Tue, 02 Feb 2016 19:35:35 +0100 Message-ID: <87io27dkp4.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2012-11-28, at 23:32, Stefan Monnier wrote: >> ;; -*- lexical-binding: t -*- >> (funcall (let ((rms "works")) >> (lambda () >> (message "lex-bind %s" rms)))) > >> (defun asdf (b) (funcall b)) > >> (defadvice asdf (before rms (b) activate) >> (setf b (let ((abc 1) (b b)) (lambda () (print abc) (funcall b))))) > >> (asdf 'ding) > >> I think this code should work fine. It doesn't work with trunk and >> emacs-24, though: > > Indeed, it doesn't work. And because of the way advice.el works > (building a new function by combining the code chunks from all the > pieces of advice applied to that function) it's not easy to fix. > > This is partly related to the issue mentioned recently that macro calls > in pieces of advice are expanded late (typically when the advised > function is defined). > > BTW, this does not affect the new `advice-add' feature in Emacs trunk. Hi Stefan, hi all, does the above mean that this bug should be closed? AFAIU, new code should (at least usually) use advice-add, and while the "old" advice system is not going to be deleted, it is kind of deprecated. Best, -- Marcin Borkowski http://mbork.pl/en From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 14:42:41 2016 Received: (at 13023) by debbugs.gnu.org; 2 Feb 2016 19:42:41 +0000 Received: from localhost ([127.0.0.1]:57084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQgqX-0001JC-LM for submit@debbugs.gnu.org; Tue, 02 Feb 2016 14:42:41 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:39484) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQgqU-0001J3-R6 for 13023@debbugs.gnu.org; Tue, 02 Feb 2016 14:42:39 -0500 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id u12Jgb1D020094; Tue, 2 Feb 2016 14:42:37 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 548BF661C6; Tue, 2 Feb 2016 14:42:37 -0500 (EST) From: Stefan Monnier To: Marcin Borkowski Subject: Re: bug#13023: 24.3.50; lexical binding does not work within defadvice Message-ID: References: <87io27dkp4.fsf@mbork.pl> Date: Tue, 02 Feb 2016 14:42:37 -0500 In-Reply-To: <87io27dkp4.fsf@mbork.pl> (Marcin Borkowski's message of "Tue, 02 Feb 2016 19:35:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV5569=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5569> : inlines <4260> : streams <1581170> : uri <2131707> X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 13023 Cc: 13023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) > does the above mean that this bug should be closed? To the extent that I don't know of anyone who intends to fix this problem, I guess we could close it as "won't fix". Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 15:15:51 2016 Received: (at control) by debbugs.gnu.org; 2 Feb 2016 20:15:51 +0000 Received: from localhost ([127.0.0.1]:57135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQhMd-00027P-AR for submit@debbugs.gnu.org; Tue, 02 Feb 2016 15:15:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49837) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQhMc-00027C-2c for control@debbugs.gnu.org; Tue, 02 Feb 2016 15:15:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQhMW-0003He-Ak for control@debbugs.gnu.org; Tue, 02 Feb 2016 15:15:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQhMW-0003HZ-7s for control@debbugs.gnu.org; Tue, 02 Feb 2016 15:15:44 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1aQhMV-0006tu-Us for control@debbugs.gnu.org; Tue, 02 Feb 2016 15:15:44 -0500 Subject: control message for bug 13023 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 02 Feb 2016 15:15:43 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) tag 13023 wontfix From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 14:24:56 2019 Received: (at control) by debbugs.gnu.org; 28 Jul 2019 18:24:56 +0000 Received: from localhost ([127.0.0.1]:47124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrnqq-0000ul-6g for submit@debbugs.gnu.org; Sun, 28 Jul 2019 14:24:56 -0400 Received: from quimby.gnus.org ([80.91.231.51]:59678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrnqo-0000ub-HD for control@debbugs.gnu.org; Sun, 28 Jul 2019 14:24:54 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrnql-0006cC-Vg for control@debbugs.gnu.org; Sun, 28 Jul 2019 20:24:53 +0200 Date: Sun, 28 Jul 2019 20:24:51 +0200 Message-Id: <87v9vm9fv0.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #13023 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 13023 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 13023 quit From unknown Sat Aug 09 01:05:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 26 Aug 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator