From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.bugs Subject: bug#14422: 24.3; Eager Macro Expansion Date: Sun, 19 May 2013 16:26:10 +0200 Message-ID: <87hahz82rh.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1368973662 22779 80.91.229.3 (19 May 2013 14:27:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 May 2013 14:27:42 +0000 (UTC) To: 14422@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 19 16:27:42 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ue4aL-0003Jk-Pr for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2013 16:27:42 +0200 Original-Received: from localhost ([::1]:44519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4aL-0000kx-98 for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2013 10:27:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4aG-0000kp-J8 for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:27:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ue4aF-0000al-GW for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:27:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4aF-0000ae-DF for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:27:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ue4ag-0004Jv-7S for bug-gnu-emacs@gnu.org; Sun, 19 May 2013 10:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Achim Gratz Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 May 2013 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14422 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136897362416515 (code B ref -1); Sun, 19 May 2013 14:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 May 2013 14:27:04 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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= Original-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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74401 Archived-At: --=-=-= 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 --=-=-=--