From debbugs-submit-bounces@debbugs.gnu.org Sun May 19 10:27:04 2013 Received: (at submit) by debbugs.gnu.org; 19 May 2013 14:27:04 +0000 Received: from localhost ([127.0.0.1]:51493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ue4Zk-0004II-9I for submit@debbugs.gnu.org; Sun, 19 May 2013 10:27:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35711) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ue4Ze-0004He-3H for submit@debbugs.gnu.org; Sun, 19 May 2013 10:26:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ue4Z6-0000UA-9P for submit@debbugs.gnu.org; Sun, 19 May 2013 10:26:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50, RCVD_IN_DNSWL_NONE, TO_NO_BRKTS_PCNT,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4Z6-0000U6-5e for submit@debbugs.gnu.org; Sun, 19 May 2013 10:26:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4Z4-0000jU-RG for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:26:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ue4Z3-0000Tk-6n for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:26:22 -0400 Received: from mail-in-01.arcor-online.net ([151.189.21.41]:46615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4Z2-0000Tc-PJ for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:26:21 -0400 Received: from mail-in-11-z2.arcor-online.net (mail-in-11-z2.arcor-online.net [151.189.8.28]) by mx.arcor.de (Postfix) with ESMTP id BCFFC5A5CA for ; Sun, 19 May 2013 16:26:18 +0200 (CEST) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mail-in-11-z2.arcor-online.net (Postfix) with ESMTP id BB1917FF56E for ; Sun, 19 May 2013 16:26:18 +0200 (CEST) X-Greylist: Passed host: 217.235.63.177 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-02.arcor-online.net 6478630770 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nexgo.de; s=mail-in; t=1368973578; bh=PtMQ6+6wAX1dff7fk2Fypn6RLmZt0H1Vc/6PsOmLGZE=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=T8atYD29dc06NLFXw6PwZ7tvXMhCyou7GrB35aee3gg4ydMibNOIkPeNCPOmcI1fM R5fXyNtoJZUnYacTDOA5D4swUfD0TLPihlZ/sm0ZDqCi5kiCR4j+zIVal04lp29vLu 4mO2xppwPOnMXmFnin75Buih6ieWzCC0kZFq70mk= Received: from Rainer.invalid (pD9EB3FB1.dip0.t-ipconnect.de [217.235.63.177]) (Authenticated sender: stromeko@arcor.de) by mail-in-02.arcor-online.net (Postfix) with ESMTPSA id 6478630770 for ; Sun, 19 May 2013 16:26:18 +0200 (CEST) From: Achim Gratz To: bug-gnu-emacs@gnu.org Subject: 24.3; Eager Macro Expansion Date: Sun, 19 May 2013 16:26:10 +0200 Message-ID: <87hahz82rh.fsf@Rainer.invalid> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -5.0 (-----) 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: -6.9 (------) --=-=-= Content-Type: text/plain In GNU Emacs 24.3.1 (i686-suse-linux-gnu, GTK+ Version 3.8.1) of 2013-04-27 Windowing system distributor `The X.Org Foundation', version 11.0.11302000 System Description: openSUSE 12.3/Tumbleweed (i586) The following test case demonstrates a problem that has been distilled from Org's test suite. Org has since switched to use defun instead of defmacro to work around this issue, but it seems that this might be a corner case that eager macro expansion produces or not yet warn about (whatever the intended behaviour might be). --=-=-= Content-Type: text/x-emacs-lisp Content-Disposition: inline; filename=eme.el (require 'ert) (defvar ll nil) (defmacro one (p) `(progn (push ',p ll))) (defmacro two (p) (let (pp) (setq pp (append ll p)) `(progn (push ',pp ll)))) (ert-deftest surprise () (should (equal '((one . two) one) (progn (one one) (two two) ll)))) (ert-run-tests-batch-and-exit 'surprise) --=-=-= Content-Type: text/plain This passes on all Emacs versions until 24.2, but fails on trunk: eme> emacs-24.2 -batch -Q -l eme.el Running 1 tests (2013-05-19 16:16:06+0200) passed 1/1 surprise Ran 1 tests, 1 results as expected (2013-05-19 16:16:06+0200) eme> emacs-24.3.50 -batch -Q -l eme.el Running 1 tests (2013-05-19 16:16:16+0200) Test surprise backtrace: (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-de (let (form-description-4) (if (unwind-protect (setq value-2 (apply f (let ((value-2 (quote ert-form-evaluation-aborted-3))) (let (form-de (let ((fn-0 (function equal)) (args-1 (list (quote ((one . two) one) (lambda nil (let ((fn-0 (function equal)) (args-1 (list (quote ((one #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31 ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc #[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\316\317% funcall(#[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\ ert-run-test([cl-struct-ert-test surprise nil (lambda nil (let ((fn- ert-run-or-rerun-test([cl-struct-ert--stats surprise [[cl-struct-ert ert-run-tests(surprise #[385 "\306\307\"\203D\211\211G\310U\203\ ert-run-tests-batch(surprise) ert-run-tests-batch-and-exit(surprise) eval-buffer(# nil "/eme/eme.el" load-with-code-conversion("/eme/eme.el" "/eme/ load("/eme/eme.el" nil t) command-line-1(("-l" "eme.el")) command-line() normal-top-level() Test surprise condition: (ert-test-failed ((should (equal '... (progn ... ... ll))) :form (equal ((one . two) one) (two one)) :value nil :explanation (list-elt 0 (different-types (one . two) two)))) FAILED 1/1 surprise Ran 1 tests, 0 results as expected, 1 unexpected (2013-05-19 16:16:16+0200) 1 unexpected results: FAILED surprise Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 20 22:21:26 2013 Received: (at 14422) by debbugs.gnu.org; 21 May 2013 02:21:26 +0000 Received: from localhost ([127.0.0.1]:53710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UecCX-0003SQ-KG for submit@debbugs.gnu.org; Mon, 20 May 2013 22:21:26 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:33052) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UecCS-0003S1-1i for 14422@debbugs.gnu.org; Mon, 20 May 2013 22:21:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtji6CXAOkeoFegmop X-IPAS-Result: Av4EABK/CFFFpZoF/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtji6CXAOkeoFegmop X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="13749758" Received: from 69-165-154-5.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.5]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 May 2013 22:20:28 -0400 Received: by pastel.home (Postfix, from userid 20848) id 44B0F67A3C; Mon, 20 May 2013 22:11:15 -0400 (EDT) From: Stefan Monnier To: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Message-ID: References: <87hahz82rh.fsf@Rainer.invalid> Date: Mon, 20 May 2013 22:11:15 -0400 In-Reply-To: <87hahz82rh.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 19 May 2013 16:26:10 +0200") 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.5 (/) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) > The following test case demonstrates a problem that has been distilled > from Org's test suite. % emacs24 -Q --batch -f batch-byte-compile eme.el In toplevel form: eme.el:3:1:Warning: global/dynamic var `ll' lacks a prefix eme.el:13:1:Error: Symbol's value as variable is void: ll % So the code has a problem, since byte-compiling it doesn't work (emacs24 is 24.1, here). No wonder eager macro-expansion also leads to problems. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 11:35:39 2013 Received: (at 14422) by debbugs.gnu.org; 26 May 2013 15:35:39 +0000 Received: from localhost ([127.0.0.1]:35647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ugcyx-0000MJ-I6 for submit@debbugs.gnu.org; Sun, 26 May 2013 11:35:39 -0400 Received: from mail-in-08.arcor-online.net ([151.189.21.48]:41657) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ugcyu-0000Ld-8A for 14422@debbugs.gnu.org; Sun, 26 May 2013 11:35:38 -0400 Received: from mail-in-12-z2.arcor-online.net (mail-in-12-z2.arcor-online.net [151.189.8.29]) by mx.arcor.de (Postfix) with ESMTP id EC26F3AE56D; Sun, 26 May 2013 17:34:22 +0200 (CEST) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-12-z2.arcor-online.net (Postfix) with ESMTP id EBFEF2E6176; Sun, 26 May 2013 17:34:22 +0200 (CEST) X-Greylist: Passed host: 217.235.8.86 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net ADCB99BE5E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nexgo.de; s=mail-in; t=1369582462; bh=JOjLUEWDimRukIT1etj2UPkDudDolNz2aUDs2W0ut7Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=HPODJ9jPt51/Lc0vVMS1iO8B6B1u1et4v63iSWL4J3ApCYtnKvaoG3dt524VinErI OYBX6Xzfc/GehlfcO2TKs3xxoX5fgLpZgyanocA6uMeAOdx2Ak5ak2hpX/cyRefI9D DvN8LKkIGejfRFx65LvSN2fz9oJ3d41wYtnbIg/k= X-Greylist: Passed host: 217.235.8.86 Received: from Rainer.invalid (pD9EB0856.dip0.t-ipconnect.de [217.235.8.86]) (Authenticated sender: stromeko@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTPSA id ADCB99BE5E; Sun, 26 May 2013 17:34:22 +0200 (CEST) From: Achim Gratz To: Stefan Monnier Subject: Re: bug#14422: 24.3; Eager Macro Expansion References: <87hahz82rh.fsf@Rainer.invalid> Date: Sun, 26 May 2013 17:34:10 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 20 May 2013 22:11:15 -0400") Message-ID: <87obbxhi19.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) Stefan Monnier writes: >> The following test case demonstrates a problem that has been distilled >> from Org's test suite. > > % emacs24 -Q --batch -f batch-byte-compile eme.el > > In toplevel form: > eme.el:3:1:Warning: global/dynamic var `ll' lacks a prefix > eme.el:13:1:Error: Symbol's value as variable is void: ll > % > > So the code has a problem, since byte-compiling it doesn't work The code isn't meant to be byte-compiled, but if you want to I'd have to split it into two seperate files. The ERT portion of the code is never byte-compiled in Org and I don't know if it would make sense to do this. > (emacs24 is 24.1, here). No wonder eager macro-expansion also leads > to problems. Well, the code does declare the variable symbol special and initializes it nil, so finding the symbol undefined during compilation and/or macro expansion would constitute a bug in either ERT or Emacs, no? Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 15:30:37 2013 Received: (at 14422) by debbugs.gnu.org; 26 May 2013 19:30:37 +0000 Received: from localhost ([127.0.0.1]:35736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UggeK-0000jL-Tl for submit@debbugs.gnu.org; Sun, 26 May 2013 15:30:37 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:65390) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UggeJ-0000j5-4x for 14422@debbugs.gnu.org; Sun, 26 May 2013 15:30:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpZ3p/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJC6HcAbBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFFpZ3p/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJC6HcAbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="14515335" Received: from 69-165-157-233.dsl.teksavvy.com (HELO pastel.home) ([69.165.157.233]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 May 2013 15:29:16 -0400 Received: by pastel.home (Postfix, from userid 20848) id 70A9D63127; Sun, 26 May 2013 15:29:20 -0400 (EDT) From: Stefan Monnier To: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Message-ID: References: <87hahz82rh.fsf@Rainer.invalid> <87obbxhi19.fsf@Rainer.invalid> Date: Sun, 26 May 2013 15:29:20 -0400 In-Reply-To: <87obbxhi19.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 26 May 2013 17:34:10 +0200") 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: -1.9 (-) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) > Well, the code does declare the variable symbol special and initializes > it nil, so finding the symbol undefined during compilation and/or macro > expansion would constitute a bug in either ERT or Emacs, no? The defvar is only executed at run time (although it does have an effect at compile time, which is to tell the compiler that the variable will exist at run time). So using `ll' during the macro expansion is wrong. If you want `ll' to defined earlier, you can wrap it in `eval-and-compile' (tho it's better not to abuse it). I can't tell what solution I'd recommend in your case, since your distilled test case is "too distilled" to understand what it's trying to do. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 15:59:35 2013 Received: (at submit) by debbugs.gnu.org; 26 May 2013 19:59:35 +0000 Received: from localhost ([127.0.0.1]:35753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ugh6K-0001ef-P1 for submit@debbugs.gnu.org; Sun, 26 May 2013 15:59:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52794) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ugh6I-0001eM-4m for submit@debbugs.gnu.org; Sun, 26 May 2013 15:59:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ugh55-0007kS-03 for submit@debbugs.gnu.org; Sun, 26 May 2013 15:58:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.3 required=5.0 tests=BAYES_50, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugh54-0007kO-Sp for submit@debbugs.gnu.org; Sun, 26 May 2013 15:58:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugh52-0005id-3T for bug-gnu-emacs@gnu.org; Sun, 26 May 2013 15:58:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ugh4y-0007i9-Fo for bug-gnu-emacs@gnu.org; Sun, 26 May 2013 15:58:12 -0400 Received: from plane.gmane.org ([80.91.229.3]:54118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugh4y-0007i3-8x for bug-gnu-emacs@gnu.org; Sun, 26 May 2013 15:58:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ugh4w-0001qT-Fu for bug-gnu-emacs@gnu.org; Sun, 26 May 2013 21:58:06 +0200 Received: from pd9eb4876.dip0.t-ipconnect.de ([217.235.72.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 May 2013 21:58:06 +0200 Received: from Stromeko by pd9eb4876.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 May 2013 21:58:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Date: Sun, 26 May 2013 21:57:54 +0200 Organization: Linux Private Site Lines: 31 Message-ID: <874ndph5tp.fsf@Rainer.invalid> References: <87hahz82rh.fsf@Rainer.invalid> <87obbxhi19.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb4876.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:CpNg4x4SUPFGBnLprMmag5ZoK5M= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) 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: -6.9 (------) Stefan Monnier writes: > The defvar is only executed at run time (although it does have an > effect at compile time, which is to tell the compiler that the variable > will exist at run time). > > So using `ll' during the macro expansion is wrong. That may well be a bug in the original code, although of course the defvar is in a different file that has been loaded before the test definition would expand the macro, so the expectation is that the symbol should exist and have nil value when trying to run the tests. > If you want `ll' to defined earlier, you can wrap it in > `eval-and-compile' (tho it's better not to abuse it). I can't tell what > solution I'd recommend in your case, since your distilled test case is > "too distilled" to understand what it's trying to do. I'll have to check again how things were supposed to have been initialized in Org, but the assumption that the (no longer existing) macro definitions made was clearly that the stand-in for the ll symbol was pre-existing at macro expansion time. I'll try to re-create the test case to match that behaviour and come back to you. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 14:01:30 2013 Received: (at 14422) by debbugs.gnu.org; 30 May 2013 18:01:30 +0000 Received: from localhost ([127.0.0.1]:42685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui7AI-0001dZ-20 for submit@debbugs.gnu.org; Thu, 30 May 2013 14:01:30 -0400 Received: from mail-in-07.arcor-online.net ([151.189.21.47]:36272) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui7AD-0001d8-Qf for 14422@debbugs.gnu.org; Thu, 30 May 2013 14:01:28 -0400 Received: from mail-in-11-z2.arcor-online.net (mail-in-11-z2.arcor-online.net [151.189.8.28]) by mx.arcor.de (Postfix) with ESMTP id 39872108BF7; Thu, 30 May 2013 19:59:49 +0200 (CEST) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by mail-in-11-z2.arcor-online.net (Postfix) with ESMTP id 3DA467FF625; Thu, 30 May 2013 19:59:49 +0200 (CEST) Received: from Rainer.invalid (pD9EB05C3.dip0.t-ipconnect.de [217.235.5.195]) (Authenticated sender: stromeko@arcor.de) by mail-in-01.arcor-online.net (Postfix) with ESMTPSA id CC7885B034; Thu, 30 May 2013 19:59:48 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-01.arcor-online.net CC7885B034 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nexgo.de; s=mail-in; t=1369936789; bh=uRuCzZ+doxErwoywgMCFRjwJRatmYsAdD5DhKQhd8B0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=sFf6YzpyL9FpRRHuIbZCdoGRfcvG01jssFqHdE/sUgnpU5ZiyjsqKCVJC8ELx5x+X o4wlvaIsos2qwWSqGlYO/WatUKb5Ns+Z1ynojjvgbqked1Uh179+/LJ4neb7wyGbkQ 1rKzhC+rUaCg6V1dhVa8oCrm6uZgTnVquiMC9Wvw= From: Achim Gratz To: Stefan Monnier Subject: Re: bug#14422: 24.3; Eager Macro Expansion References: <87hahz82rh.fsf@Rainer.invalid> Date: Thu, 30 May 2013 19:59:41 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 20 May 2013 22:11:15 -0400") Message-ID: <87mwrcjqlu.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) --=-=-= Content-Type: text/plain Stefan Monnier writes: > So the code has a problem, since byte-compiling it doesn't work > (emacs24 is 24.1, here). No wonder eager macro-expansion also leads > to problems. Here's the revised test case that compiles cleanly and still has the same problem: --=-=-= Content-Type: text/x-emacs-lisp Content-Disposition: inline; filename=eme.el (defvar eme-ll nil) (defmacro one (p) `(progn (push ',p eme-ll))) (defmacro two (p) (let (pp) (setq pp (append eme-ll p)) `(progn (push ',pp eme-ll)))) (provide 'eme) --=-=-= Content-Type: text/x-emacs-lisp Content-Disposition: inline; filename=eme-test.el (require 'eme) (require 'ert) (ert-deftest surprise () (should (equal '((one . two) one) (progn (one one) (two two) eme-ll)))) (ert-run-tests-batch-and-exit 'surprise) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --8<---------------cut here---------------start------------->8--- eme> emacs-24.3.50 -batch -Q -L . --eval '(byte-compile-file "eme.el")' Wrote /home/eme/eme.elc eme> emacs-24.3.50 -batch -Q -L . --eval '(byte-compile-file "eme-test.el")' Wrote /home/eme/eme-test.elc eme> emacs-24.3.50 -batch -Q -L . -l eme-test Running 1 tests (2013-05-30 19:37:09+0200) Test surprise backtrace: #[nil "\305\306\30B\31B\211D=E2=96=92\311312\313\216\314\n \"\211 #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31 ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc #[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\316\317% funcall(#[0 "r\304\305!q\210\306 )\307\310\311\312\313\314!\315\"\ ert-run-test([cl-struct-ert-test surprise nil #[nil "\305\306\30B ert-run-or-rerun-test([cl-struct-ert--stats surprise [[cl-struct-ert ert-run-tests(surprise #[385 "\306\307\"\203D\211\211G\310U\203\ ert-run-tests-batch(surprise) ert-run-tests-batch-and-exit(surprise) byte-code("\301\302!\210\301\303!\210\304\305\306\307\305\310\311\31 load("eme-test" nil t) command-line-1(("-L" "." "-l" "eme-test")) command-line() normal-top-level() Test surprise condition: (ert-test-failed ((should (equal '... (progn ... ... eme-ll))) :form (equal ((one . two) one) (two one)) :value nil :explanation (list-elt 0 (different-types (one . two) two)))) FAILED 1/1 surprise Ran 1 tests, 0 results as expected, 1 unexpected (2013-05-30 19:37:09+0200) 1 unexpected results: FAILED surprise --8<---------------cut here---------------end--------------->8--- Regards, Achim. --=20 +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 15:02:33 2013 Received: (at 14422) by debbugs.gnu.org; 30 May 2013 19:02:33 +0000 Received: from localhost ([127.0.0.1]:42775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui87L-00041h-G0 for submit@debbugs.gnu.org; Thu, 30 May 2013 15:02:32 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:30891) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui87I-00041T-Eh for 14422@debbugs.gnu.org; Thu, 30 May 2013 15:02:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15216678" Received: from 69-165-139-76.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.76]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 May 2013 15:00:46 -0400 Received: by pastel.home (Postfix, from userid 20848) id 139B667579; Thu, 30 May 2013 15:00:51 -0400 (EDT) From: Stefan Monnier To: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Message-ID: References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> Date: Thu, 30 May 2013 15:00:50 -0400 In-Reply-To: <87mwrcjqlu.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 30 May 2013 19:59:41 +0200") 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: -1.9 (-) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) > Here's the revised test case that compiles cleanly and still has the > same problem: > (defvar eme-ll nil) > (defmacro one (p) > `(progn (push ',p eme-ll))) > (defmacro two (p) > (let (pp) > (setq pp (append eme-ll p)) > `(progn (push ',pp eme-ll)))) > (provide 'eme) > (require 'eme) > (require 'ert) > (ert-deftest surprise () > (should > (equal '((one . two) one) > (progn > (one one) > (two two) > eme-ll)))) I see the test fails, but that's just because the test is wrong. Try to create a new file foo.el: (require 'eme) (message "Result = %s" (progn (one one) (two two) eme-ll)) Then byte-compile it. Then do emacs23 --batch -Q -l ~/tmp/foo.el and emacs23 --batch -Q -l ~/tmp/foo.elc You'll see that your code behaves differently when byte-compiled. Stefan Analysis: (one one) will add `one' to eme-ll at run-time. (two two) reads the macroexpansion-time (e.g. compilation-time, load-time, or run-time) value of eme-ll and adds it to eme-ll at run-time. eme-ll returns the run-time value of eme-ll. From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 15:40:29 2013 Received: (at submit) by debbugs.gnu.org; 30 May 2013 19:40:29 +0000 Received: from localhost ([127.0.0.1]:42872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui8i4-0005PK-Ex for submit@debbugs.gnu.org; Thu, 30 May 2013 15:40:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38726) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui8i1-0005P7-QQ for submit@debbugs.gnu.org; Thu, 30 May 2013 15:40:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui8gO-0004Ve-SM for submit@debbugs.gnu.org; Thu, 30 May 2013 15:38:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui8gO-0004VZ-QK for submit@debbugs.gnu.org; Thu, 30 May 2013 15:38:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui8gK-0004np-69 for bug-gnu-emacs@gnu.org; Thu, 30 May 2013 15:38:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui8gF-0004T6-3k for bug-gnu-emacs@gnu.org; Thu, 30 May 2013 15:38:40 -0400 Received: from plane.gmane.org ([80.91.229.3]:38626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui8gE-0004Ss-U1 for bug-gnu-emacs@gnu.org; Thu, 30 May 2013 15:38:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ui8gD-00046p-5A for bug-gnu-emacs@gnu.org; Thu, 30 May 2013 21:38:33 +0200 Received: from pd9eb364b.dip0.t-ipconnect.de ([217.235.54.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 May 2013 21:38:33 +0200 Received: from Stromeko by pd9eb364b.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 May 2013 21:38:33 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Date: Thu, 30 May 2013 21:38:21 +0200 Organization: Linux Private Site Lines: 51 Message-ID: <87ehcojm1e.fsf@Rainer.invalid> References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pd9eb364b.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:6L/JWXRVgRlco4mK2X3kGbaxamM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -6.9 (------) 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: -6.9 (------) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Stefan Monnier writes: > I see the test fails, but that's just because the test is wrong. […] > You'll see that your code behaves differently when byte-compiled. Yes, we've already established that the original code itself had a bug. The correct code would look like this --=-=-= Content-Type: text/x-emacs-lisp Content-Disposition: inline; filename=eme.el (defvar eme-ll nil) (defmacro one (p) `(progn (push ',p eme-ll))) (defmacro two (p) `(let ((pp (append eme-ll ',p))) (progn (push pp eme-ll)))) (provide 'eme) --=-=-= Content-Type: text/plain The remaining point is that the ERT test still fails in exactly the same way when it is _not_ byte-compiled and batch-tested (like the original case in Org), but it produces the correct result when testing in interactive mode or in the debugger. I guess I'm asking for a warning for recursive macro expansions that manipulate the same variable both at expansion and at runtime in separate macros. Alternatively if the buggy code would always fail in the same way that would at least ensure it can be found more easily. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 17:16:36 2013 Received: (at 14422) by debbugs.gnu.org; 30 May 2013 21:16:36 +0000 Received: from localhost ([127.0.0.1]:43021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UiAD6-0001qa-4I for submit@debbugs.gnu.org; Thu, 30 May 2013 17:16:36 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:57031) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UiAD4-0001qF-CE; Thu, 30 May 2013 17:16:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15230152" Received: from 69-165-139-76.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.76]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 May 2013 17:14:51 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1918263336; Thu, 30 May 2013 17:14:56 -0400 (EDT) From: Stefan Monnier To: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Message-ID: References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> <87ehcojm1e.fsf@Rainer.invalid> Date: Thu, 30 May 2013 17:14:56 -0400 In-Reply-To: <87ehcojm1e.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 30 May 2013 21:38:21 +0200") 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: -1.9 (-) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) retitle 14422 Apply eager-macroexpansion everywhere (eval-region, ...) thanks > The remaining point is that the ERT test still fails in exactly the same > way when it is _not_ byte-compiled and batch-tested (like the original > case in Org), but it produces the correct result when testing in > interactive mode or in the debugger. I guess I'm asking for a warning > for recursive macro expansions that manipulate the same variable both at > expansion and at runtime in separate macros. Alternatively if the buggy > code would always fail in the same way that would at least ensure it can > be found more easily. Indeed, that's part of the reason why I introduced this "eager macroexpansion", which makes it that my previous foo.el test now behaves identically whether it's byte-compiled or not. The behavior is still different in a few other cases (where eager macro expansion is not performed, typically M-C-x and things like that), but I hope to reduce/eliminate them at some point. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 11:31:33 2013 Received: (at 14422) by debbugs.gnu.org; 3 Jun 2013 15:31:33 +0000 Received: from localhost ([127.0.0.1]:49181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjWjM-0006O9-Tm for submit@debbugs.gnu.org; Mon, 03 Jun 2013 11:31:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32368) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjWjK-0006Nu-VE for 14422@debbugs.gnu.org; Mon, 03 Jun 2013 11:31:31 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpYtM/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av8EABK/CFFFpYtM/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15504433" Received: from 69-165-139-76.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.76]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Jun 2013 11:29:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6B9DD63332; Mon, 3 Jun 2013 11:29:30 -0400 (EDT) From: Stefan Monnier To: Achim Gratz Subject: Re: bug#14422: 24.3; Eager Macro Expansion Message-ID: References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> <87ehcojm1e.fsf@Rainer.invalid> Date: Mon, 03 Jun 2013 11:29:30 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 30 May 2013 17:14:56 -0400") 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: -1.9 (-) X-Debbugs-Envelope-To: 14422 Cc: 14422@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: -1.9 (-) > The behavior is still different in a few other cases (where eager macro > expansion is not performed, typically M-C-x and things like that), but > I hope to reduce/eliminate them at some point. It just occurred to me that the patch below which I just installed covers several of those cases. Stefan --- lisp/emacs-lisp/lisp-mode.el 2013-05-29 14:14:16 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-06-03 14:23:31 +0000 @@ -809,6 +809,7 @@ (defun eval-sexp-add-defvars (exp &optional pos) "Prepend EXP with all the `defvar's that precede it in the buffer. POS specifies the starting position where EXP was found and defaults to point." + (setq exp (macroexpand-all exp)) ;Eager macro-expansion. (if (not lexical-binding) exp (save-excursion From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 07:05:55 2020 Received: (at 14422) by debbugs.gnu.org; 25 Aug 2020 11:05:55 +0000 Received: from localhost ([127.0.0.1]:60504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAWm3-0007Pq-83 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 07:05:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAWm1-0007Pb-T2 for 14422@debbugs.gnu.org; Tue, 25 Aug 2020 07:05:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=T5QmUtHQbpKVlkbgabXrUOGtn8WnoZnIFa32PTeo2Nw=; b=fEjCUoBthibWhKsELgujbI9RBj Ah2wdF0vUr+c9T+zUxLWXmvokxY6O2ZKeuLCAT0eySgdJg9dkz2odS759/0KCvqO9P/feVh8H30tO h8zyPmWnuMwT8K4oP3nxLiN2Jxm5rEhjzEbbSHsIokt3cdwUhZkTqK11ie2yhaUmsCzk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAWlt-0004jc-1Z; Tue, 25 Aug 2020 13:05:47 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#14422: 24.3; Eager Macro Expansion References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> <87ehcojm1e.fsf@Rainer.invalid> X-Now-Playing: Coil's _The Sound Of Musick_: "Untitled" Date: Tue, 25 Aug 2020 13:05:43 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 03 Jun 2013 11:29:30 -0400") Message-ID: <878se3asu0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Stefan Monnier writes: >> The behavior is still different in a few other cases (where eager macro >> expansion is not performed, typically M-C-x and things like that), but >> I hope to reduce/eliminate them at some point. > [...] 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: 14422 Cc: Achim Gratz , 14422@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.0 (-) Stefan Monnier writes: >> The behavior is still different in a few other cases (where eager macro >> expansion is not performed, typically M-C-x and things like that), but >> I hope to reduce/eliminate them at some point. > > It just occurred to me that the patch below which I just installed > covers several of those cases. > > Stefan > > --- lisp/emacs-lisp/lisp-mode.el 2013-05-29 14:14:16 +0000 > +++ lisp/emacs-lisp/lisp-mode.el 2013-06-03 14:23:31 +0000 > @@ -809,6 +809,7 @@ > (defun eval-sexp-add-defvars (exp &optional pos) > "Prepend EXP with all the `defvar's that precede it in the buffer. > POS specifies the starting position where EXP was found and defaults to point." > + (setq exp (macroexpand-all exp)) ;Eager macro-expansion. > (if (not lexical-binding) > exp > (save-excursion It's unclear whether this fixes the reported bug? I tried the final test case, and I didn't get any errors (but I'm not sure I'm testing that the right way). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 07:06:02 2020 Received: (at control) by debbugs.gnu.org; 25 Aug 2020 11:06:02 +0000 Received: from localhost ([127.0.0.1]:60508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAWmA-0007Qd-F7 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 07:06:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAWm8-0007Pr-Gw for control@debbugs.gnu.org; Tue, 25 Aug 2020 07:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sZT9wwvkkOyqBnJp9S1yySNfXOl7DtHFnjB94kpQosE=; b=fWyiyDPHG2jJNazmTItSLwoJ55 711vy9TRnPaLFQbqcBy04m//E/R48Piz3DWKisTMlQXS3djuMZn/W1th47VCGwBRx1o/NanXcrsv2 g2P/yD6lQVhCPSCb4khEPrgR4PbdZgfj7C234cwsI09LmpZGqwI3CscCGyShh1vXG2aQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAWm0-0004jm-R5 for control@debbugs.gnu.org; Tue, 25 Aug 2020 13:05:55 +0200 Date: Tue, 25 Aug 2020 13:05:51 +0200 Message-Id: <877dtnasts.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14422 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: tags 14422 + moreinfo 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 (-) tags 14422 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 12 21:48:10 2020 Received: (at 14422) by debbugs.gnu.org; 13 Oct 2020 01:48:10 +0000 Received: from localhost ([127.0.0.1]:44586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS9QA-0002Zj-Gy for submit@debbugs.gnu.org; Mon, 12 Oct 2020 21:48:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS9Q8-0002ZV-Ab for 14422@debbugs.gnu.org; Mon, 12 Oct 2020 21:48:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=106zB3ZLb8IlD8KpvDkXfZZv12v6REPItFnw/TnkPqU=; b=RCfg+ayl9dGDv9aRm+Z0pePaPK o/LQPn3tn0SQCy3x7/412rvyd3MGmshT16hjC3X2090D67fn/xH07Zn2Et1pQk/VDioJZaUwyU85R MLpl0rIIBq5JspKU/61elX0vgJpWgc7QkmCa1rZVE/3ofaboCSpQLNl4d3MbZsVoACJM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kS9Pz-0000ZE-8H; Tue, 13 Oct 2020 03:48:01 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#14422: 24.3; Eager Macro Expansion References: <87hahz82rh.fsf@Rainer.invalid> <87mwrcjqlu.fsf@Rainer.invalid> <87ehcojm1e.fsf@Rainer.invalid> <878se3asu0.fsf@gnus.org> X-Now-Playing: Matmos's _A Chance To Cut Is A Chance To Cure_: "Ur Tchun Tan Tse Qi" Date: Tue, 13 Oct 2020 03:47:57 +0200 In-Reply-To: <878se3asu0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Aug 2020 13:05:43 +0200") Message-ID: <87lfga99rm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Lars Ingebrigtsen writes: > It's unclear whether this fixes the reported bug? I tried the final > test case, and I didn't get any errors (but I'm not sure I'm testing > that the right way). 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: 14422 Cc: Achim Gratz , 14422@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.0 (-) Lars Ingebrigtsen writes: > It's unclear whether this fixes the reported bug? I tried the final > test case, and I didn't get any errors (but I'm not sure I'm testing > that the right way). More information was requested, but none was given, so I'm closing this bug report. If there's still problems in this area, please respond to the debbugs address, and we'll reopen the report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 12 21:48:14 2020 Received: (at control) by debbugs.gnu.org; 13 Oct 2020 01:48:14 +0000 Received: from localhost ([127.0.0.1]:44589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS9QD-0002a3-S6 for submit@debbugs.gnu.org; Mon, 12 Oct 2020 21:48:14 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kS9QC-0002Zb-Rj for control@debbugs.gnu.org; Mon, 12 Oct 2020 21:48:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/e6vL50vsWh23Ibgk8IPwjTzC0kocj20azHG38Y5kKM=; b=PI6WQX6NtpATpdSN5xvnm/Uo3w w5GgmV2D2BjUgeflUtGLWasb+arRR8TR8i08Ls00NNL2YBgMfpdA4ighyD43/7tC+6la4FBiIH/IC wz8roQWL2IAj8OPP+Om9/a9bTBRiGzBtuGzhtuSjglfR7RAUKv9Od08gWnf9ArFUOLRM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kS9Q5-0000ba-5h for control@debbugs.gnu.org; Tue, 13 Oct 2020 03:48:07 +0200 Date: Tue, 13 Oct 2020 03:48:04 +0200 Message-Id: <87k0vu99rf.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #14422 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 14422 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 14422 quit From unknown Thu Aug 14 18:36:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Nov 2020 12: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