From unknown Sat Jun 14 18:47:20 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#40827 <40827@debbugs.gnu.org> To: bug#40827 <40827@debbugs.gnu.org> Subject: Status: 28.0.50; Macroexpansion at runtime Reply-To: bug#40827 <40827@debbugs.gnu.org> Date: Sun, 15 Jun 2025 01:47:20 +0000 retitle 40827 28.0.50; Macroexpansion at runtime reassign 40827 emacs submitter 40827 Omar Antol=C3=ADn Camarena severity 40827 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 24 15:10:35 2020 Received: (at submit) by debbugs.gnu.org; 24 Apr 2020 19:10:36 +0000 Received: from localhost ([127.0.0.1]:57954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jS3ic-0002mn-T3 for submit@debbugs.gnu.org; Fri, 24 Apr 2020 15:10:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:33816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jS3iN-0002mK-CW for submit@debbugs.gnu.org; Fri, 24 Apr 2020 15:10:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50728) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jS3iL-0003Fa-MY for bug-gnu-emacs@gnu.org; Fri, 24 Apr 2020 15:10:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jS3iF-0000rG-IZ for bug-gnu-emacs@gnu.org; Fri, 24 Apr 2020 15:10:16 -0400 Received: from gauss.matem.unam.mx ([132.248.17.1]:46015) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jS3iE-0000gi-SN for bug-gnu-emacs@gnu.org; Fri, 24 Apr 2020 15:10:11 -0400 Received: from penguin (unknown [189.146.255.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: omar) by gauss.matem.unam.mx (Postfix) with ESMTP id 665E2A0C003 for ; Fri, 24 Apr 2020 14:10:03 -0500 (CDT) From: =?utf-8?Q?Omar_Antol=C3=ADn_Camarena?= To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Macroexpansion at runtime Date: Fri, 24 Apr 2020 14:09:57 -0500 Message-ID: <874kt8snsq.fsf@matem.unam.mx> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=132.248.17.1; envelope-from=omar@matem.unam.mx; helo=gauss.matem.unam.mx X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 15:10:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.248.17.1 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit 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 (/) I'm not sure this is a bug, but I certainly think it's odd behavior. Basically, incorrect use of (rx ... (eval ...) ...), which should raise an error, can instead result in macro expansion happening at runtime rather than at function definition time. Starting from emacs -Q, put the following in the scratch buffer: (defmacro macro1 (arg) `(list :macro1 ,arg ,(format-time-string "%s"))) (setq lexical-binding nil) (defun fun1 (arg) (list (macro1 arg) (rx (eval arg)))) Now, if you evaluate all three forms with eval-last-sexp (C-x C-e), the definition of fun1 correctly (IMO) raises an error. Instead evaluate the first two with eval-sexp and the last function with eval-defun (C-M-x). No error is raised! Next examine the definition of fun1 and call it a couple of times: (symbol-function 'fun1) ;; evaluates to (lambda (arg) (list (macro1 arg) (rx (eval arg)))) ;; notices the macros are unexpanded (fun1 "hey") ;; evaluated to ((:macro1 "hey" "1587754829") "hey") (fun1 "hey") ;; now I got ((:macro1 "hey" "1587754834") "hey") ;; notice the timestamp changed! It seems that now, most of the time both the intepreter and the byte-compiler, whether using lexical binding or not, will expand macros at function definition time. This trick of combining an illegal (rx ... (eval ...) ...), with lexical binding, and with eval-defun is the only way I've found to trigger macro expansion at runtime. I discovered this during an interesting discussion on reddit, which you can read here: https://www.reddit.com/r/emacs/comments/g5bat3/weekly_tipstricketc_thread/fo362s8 In that discussion others pointed out that this does not happen in Emacs 26.3: there the recipe I gave above also results in an error being raised. The Emacs 28 package I installed unfortunately does not come with a manual, so I don't know what the current version says, but the manual for Emacs 26.3 says something seemingly incorrect most of the time. (info "(elisp) Repeated Expansion") says: > 14.5.5 How Many Times is the Macro Expanded? > Occasionally problems result from the fact that a macro call is > expanded each time it is evaluated in an interpreted function, but is > expanded only once (during compilation) for a compiled function. If > the macro definition has side effects, they will work differently > depending on how many times the macro is expanded. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-04-13, unofficial emacs-snapshot build: http://emacs.ganneff.de/, git commit fc336a46553919206d9ac621d1ea5e9740477e18 built on runner-d40f5ff3-project-26-concurrent-1 Repository revision: b5bdd1ca1d3978fc7cfc61ee14c9945e868eff7a Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12001000 System Description: Debian GNU/Linux 10 (buster) Recent messages: Loading mb-depth...done Loading minibuf-eldef...done For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/28.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.0.50/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/28.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.0.50/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fdebug-prefix-map=/builds/joerg/emacs/buster_amd64/emacs-snapshot-20200413+emacs-27.0.90-697-gfc336a4655=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -fno-omit-frame-pointer' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: goto-address-prog-mode: t show-paren-mode: t electric-pair-mode: t beginend-global-mode: t beginend-prog-mode: t global-dot-mode: t dot-mode: t global-gobble-whitespace-mode: t icomplete-mode: t minibuffer-electric-default-mode: t minibuffer-depth-indicate-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox hides /usr/share/emacs/28.0.50/lisp/org/ox /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-texinfo hides /usr/share/emacs/28.0.50/lisp/org/ox-texinfo /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-publish hides /usr/share/emacs/28.0.50/lisp/org/ox-publish /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-org hides /usr/share/emacs/28.0.50/lisp/org/ox-org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-odt hides /usr/share/emacs/28.0.50/lisp/org/ox-odt /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-md hides /usr/share/emacs/28.0.50/lisp/org/ox-md /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-man hides /usr/share/emacs/28.0.50/lisp/org/ox-man /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-latex hides /usr/share/emacs/28.0.50/lisp/org/ox-latex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-icalendar hides /usr/share/emacs/28.0.50/lisp/org/ox-icalendar /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-html hides /usr/share/emacs/28.0.50/lisp/org/ox-html /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-beamer hides /usr/share/emacs/28.0.50/lisp/org/ox-beamer /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ox-ascii hides /usr/share/emacs/28.0.50/lisp/org/ox-ascii /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org hides /usr/share/emacs/28.0.50/lisp/org/org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-timer hides /usr/share/emacs/28.0.50/lisp/org/org-timer /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-tempo hides /usr/share/emacs/28.0.50/lisp/org/org-tempo /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-table hides /usr/share/emacs/28.0.50/lisp/org/org-table /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-src hides /usr/share/emacs/28.0.50/lisp/org/org-src /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-protocol hides /usr/share/emacs/28.0.50/lisp/org/org-protocol /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-plot hides /usr/share/emacs/28.0.50/lisp/org/org-plot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-pcomplete hides /usr/share/emacs/28.0.50/lisp/org/org-pcomplete /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-num hides /usr/share/emacs/28.0.50/lisp/org/org-num /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-mouse hides /usr/share/emacs/28.0.50/lisp/org/org-mouse /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-mobile hides /usr/share/emacs/28.0.50/lisp/org/org-mobile /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-macs hides /usr/share/emacs/28.0.50/lisp/org/org-macs /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-macro hides /usr/share/emacs/28.0.50/lisp/org/org-macro /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-list hides /usr/share/emacs/28.0.50/lisp/org/org-list /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-lint hides /usr/share/emacs/28.0.50/lisp/org/org-lint /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-keys hides /usr/share/emacs/28.0.50/lisp/org/org-keys /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-inlinetask hides /usr/share/emacs/28.0.50/lisp/org/org-inlinetask /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-indent hides /usr/share/emacs/28.0.50/lisp/org/org-indent /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-id hides /usr/share/emacs/28.0.50/lisp/org/org-id /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-habit hides /usr/share/emacs/28.0.50/lisp/org/org-habit /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-goto hides /usr/share/emacs/28.0.50/lisp/org/org-goto /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-footnote hides /usr/share/emacs/28.0.50/lisp/org/org-footnote /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-feed hides /usr/share/emacs/28.0.50/lisp/org/org-feed /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-faces hides /usr/share/emacs/28.0.50/lisp/org/org-faces /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-entities hides /usr/share/emacs/28.0.50/lisp/org/org-entities /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-element hides /usr/share/emacs/28.0.50/lisp/org/org-element /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-duration hides /usr/share/emacs/28.0.50/lisp/org/org-duration /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-datetree hides /usr/share/emacs/28.0.50/lisp/org/org-datetree /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-ctags hides /usr/share/emacs/28.0.50/lisp/org/org-ctags /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-crypt hides /usr/share/emacs/28.0.50/lisp/org/org-crypt /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-compat hides /usr/share/emacs/28.0.50/lisp/org/org-compat /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-colview hides /usr/share/emacs/28.0.50/lisp/org/org-colview /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-clock hides /usr/share/emacs/28.0.50/lisp/org/org-clock /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-capture hides /usr/share/emacs/28.0.50/lisp/org/org-capture /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-attach hides /usr/share/emacs/28.0.50/lisp/org/org-attach /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-attach-git hides /usr/share/emacs/28.0.50/lisp/org/org-attach-git /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-archive hides /usr/share/emacs/28.0.50/lisp/org/org-archive /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-agenda hides /usr/share/emacs/28.0.50/lisp/org/org-agenda /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol hides /usr/share/emacs/28.0.50/lisp/org/ol /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-w3m hides /usr/share/emacs/28.0.50/lisp/org/ol-w3m /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-rmail hides /usr/share/emacs/28.0.50/lisp/org/ol-rmail /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-mhe hides /usr/share/emacs/28.0.50/lisp/org/ol-mhe /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-irc hides /usr/share/emacs/28.0.50/lisp/org/ol-irc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-info hides /usr/share/emacs/28.0.50/lisp/org/ol-info /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-gnus hides /usr/share/emacs/28.0.50/lisp/org/ol-gnus /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-eww hides /usr/share/emacs/28.0.50/lisp/org/ol-eww /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-eshell hides /usr/share/emacs/28.0.50/lisp/org/ol-eshell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-docview hides /usr/share/emacs/28.0.50/lisp/org/ol-docview /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-bibtex hides /usr/share/emacs/28.0.50/lisp/org/ol-bibtex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ol-bbdb hides /usr/share/emacs/28.0.50/lisp/org/ol-bbdb /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob hides /usr/share/emacs/28.0.50/lisp/org/ob /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-vala hides /usr/share/emacs/28.0.50/lisp/org/ob-vala /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-tangle hides /usr/share/emacs/28.0.50/lisp/org/ob-tangle /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-table hides /usr/share/emacs/28.0.50/lisp/org/ob-table /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-stan hides /usr/share/emacs/28.0.50/lisp/org/ob-stan /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-sqlite hides /usr/share/emacs/28.0.50/lisp/org/ob-sqlite /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-sql hides /usr/share/emacs/28.0.50/lisp/org/ob-sql /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-shen hides /usr/share/emacs/28.0.50/lisp/org/ob-shen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-shell hides /usr/share/emacs/28.0.50/lisp/org/ob-shell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-sed hides /usr/share/emacs/28.0.50/lisp/org/ob-sed /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-screen hides /usr/share/emacs/28.0.50/lisp/org/ob-screen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-scheme hides /usr/share/emacs/28.0.50/lisp/org/ob-scheme /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-sass hides /usr/share/emacs/28.0.50/lisp/org/ob-sass /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ruby hides /usr/share/emacs/28.0.50/lisp/org/ob-ruby /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ref hides /usr/share/emacs/28.0.50/lisp/org/ob-ref /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-python hides /usr/share/emacs/28.0.50/lisp/org/ob-python /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-processing hides /usr/share/emacs/28.0.50/lisp/org/ob-processing /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-plantuml hides /usr/share/emacs/28.0.50/lisp/org/ob-plantuml /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-picolisp hides /usr/share/emacs/28.0.50/lisp/org/ob-picolisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-perl hides /usr/share/emacs/28.0.50/lisp/org/ob-perl /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-org hides /usr/share/emacs/28.0.50/lisp/org/ob-org /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-octave hides /usr/share/emacs/28.0.50/lisp/org/ob-octave /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ocaml hides /usr/share/emacs/28.0.50/lisp/org/ob-ocaml /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-mscgen hides /usr/share/emacs/28.0.50/lisp/org/ob-mscgen /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-maxima hides /usr/share/emacs/28.0.50/lisp/org/ob-maxima /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-matlab hides /usr/share/emacs/28.0.50/lisp/org/ob-matlab /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-makefile hides /usr/share/emacs/28.0.50/lisp/org/ob-makefile /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-lua hides /usr/share/emacs/28.0.50/lisp/org/ob-lua /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-lob hides /usr/share/emacs/28.0.50/lisp/org/ob-lob /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-lisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-lilypond hides /usr/share/emacs/28.0.50/lisp/org/ob-lilypond /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ledger hides /usr/share/emacs/28.0.50/lisp/org/ob-ledger /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-latex hides /usr/share/emacs/28.0.50/lisp/org/ob-latex /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-js hides /usr/share/emacs/28.0.50/lisp/org/ob-js /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-java hides /usr/share/emacs/28.0.50/lisp/org/ob-java /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-io hides /usr/share/emacs/28.0.50/lisp/org/ob-io /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-hledger hides /usr/share/emacs/28.0.50/lisp/org/ob-hledger /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-haskell hides /usr/share/emacs/28.0.50/lisp/org/ob-haskell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-groovy hides /usr/share/emacs/28.0.50/lisp/org/ob-groovy /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-gnuplot hides /usr/share/emacs/28.0.50/lisp/org/ob-gnuplot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-fortran hides /usr/share/emacs/28.0.50/lisp/org/ob-fortran /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-forth hides /usr/share/emacs/28.0.50/lisp/org/ob-forth /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-exp hides /usr/share/emacs/28.0.50/lisp/org/ob-exp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-eval hides /usr/share/emacs/28.0.50/lisp/org/ob-eval /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-eshell hides /usr/share/emacs/28.0.50/lisp/org/ob-eshell /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-emacs-lisp hides /usr/share/emacs/28.0.50/lisp/org/ob-emacs-lisp /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ebnf hides /usr/share/emacs/28.0.50/lisp/org/ob-ebnf /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-dot hides /usr/share/emacs/28.0.50/lisp/org/ob-dot /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-ditaa hides /usr/share/emacs/28.0.50/lisp/org/ob-ditaa /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-css hides /usr/share/emacs/28.0.50/lisp/org/ob-css /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-core hides /usr/share/emacs/28.0.50/lisp/org/ob-core /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-coq hides /usr/share/emacs/28.0.50/lisp/org/ob-coq /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-comint hides /usr/share/emacs/28.0.50/lisp/org/ob-comint /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-clojure hides /usr/share/emacs/28.0.50/lisp/org/ob-clojure /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-calc hides /usr/share/emacs/28.0.50/lisp/org/ob-calc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-awk hides /usr/share/emacs/28.0.50/lisp/org/ob-awk /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-asymptote hides /usr/share/emacs/28.0.50/lisp/org/ob-asymptote /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-abc hides /usr/share/emacs/28.0.50/lisp/org/ob-abc /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-R hides /usr/share/emacs/28.0.50/lisp/org/ob-R /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-J hides /usr/share/emacs/28.0.50/lisp/org/ob-J /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/ob-C hides /usr/share/emacs/28.0.50/lisp/org/ob-C /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-version hides /usr/share/emacs/28.0.50/lisp/org/org-version /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-loaddefs hides /usr/share/emacs/28.0.50/lisp/org/org-loaddefs /home/omarantolin/.emacs.d/elpa/org-plus-contrib-20200420/org-install hides /usr/share/emacs/28.0.50/lisp/org/org-install Features: (shadow sort bbdb-message vc-git diff-mode mailalias bbdb-mua bbdb-com crm bbdb bbdb-site timezone mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rx orderless goto-addr thingatpt email-config pdf-loader paren elec-pair ace-link avy ring beginend dot-mode eval-region-advice gobble-whitespace icomplete minibuf-eldef mb-depth completing-history block-undo modus-vivendi-theme modus-operandi-theme cus-edit cus-start cus-load wid-edit diminish cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf edmacro kmacro tex-site slime-autoloads info package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 302715 12983) (symbols 48 19818 1) (strings 32 86684 5262) (string-bytes 1 2363915) (vectors 16 24403) (vector-slots 8 327959 11678) (floats 8 93 145) (intervals 56 302 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 25 10:49:23 2020 Received: (at 40827) by debbugs.gnu.org; 25 Apr 2020 14:49:23 +0000 Received: from localhost ([127.0.0.1]:60206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSM7E-0004b6-Pc for submit@debbugs.gnu.org; Sat, 25 Apr 2020 10:49:23 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:36958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSM7C-0004as-2O for 40827@debbugs.gnu.org; Sat, 25 Apr 2020 10:49:11 -0400 Received: by mail-qt1-f172.google.com with SMTP id k12so10487107qtm.4 for <40827@debbugs.gnu.org>; Sat, 25 Apr 2020 07:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=0hs+y67kty4QC+ZsXR0FERHyyzhXgSBrjJWfMz8MoTw=; b=dAFOFoB8O8u9FoO86Nxoej74dK2tKC5uKeBxMlDI7Tio+hNhY0DUumygirb5EYPcBM S9ZKBYZez368ULHHcw7wEFD+XUxhHinucBD11o4YZtzjpsX9sp5flQXceIUzH4TChmxy HecCWpri4mRkMXegUBFZ198hnWEP/M1SDqD8580TrKvzzi+r7f+BxLKXEZJ271bNz9rJ bGXWYLs796xywdEQ/8CIcQjdCZqsadV8qj6KARoc4ZxLPJN3hv//120lVSvSFgAxDmZ2 6WuewJeY7SZFJgtIEm9RAUckYM5On6BeusGpj5tfhheGbP6xdQQh2bVqjfZiaPpxo9ow Q0nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0hs+y67kty4QC+ZsXR0FERHyyzhXgSBrjJWfMz8MoTw=; b=amKHv8tEsge3iZv1vqskuUw6kOSNi30d/FpviCOFrI/Z59uQBBZ9ebuvtYWIL8jCSt IB4NnyaeljLltvqiFe3DaVWpy8AH1zC+VFJxOcW2OjZ54zZgDTTNF5LhiVDth39ZcX7d UW8Oh513tWsTd7V+dE2FV/E7sk7crPTfc1BzyAudCWPCdNc0ZDEGeMZYqx49cd9pnPlV gceKhuaZeOxVF7tj2CvtmH3VW9M0RqcF1bKMGx8BPEORiSvpsW9klEE05cNLsfjvG2be Twc8ymPwIbJVKd0B5dvBgLBfdEG2EJAZZEbiHC40vbGFMBx+GLVuX88/7JqYGYArfDUo DC3Q== X-Gm-Message-State: AGi0Pubz/FJnoku3loRcbK4oqlNstguglkZ8tME2gFVRvMpG64JX5c6S WBvh5BC306GJUyVViKOSMqQ= X-Google-Smtp-Source: APiQypIQzBo5UpLQoxrOIGQLoz/OleHjdeCNRhvYtkk9VULmVHYCL5hXdbl2yVkLNHkkOdwGgcRKTw== X-Received: by 2002:ac8:4a06:: with SMTP id x6mr15251163qtq.163.1587826144510; Sat, 25 Apr 2020 07:49:04 -0700 (PDT) Received: from minid (cbl-45-2-119-47.yyz.frontiernetworks.ca. [45.2.119.47]) by smtp.gmail.com with ESMTPSA id i4sm1279698qkh.66.2020.04.25.07.49.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Apr 2020 07:49:03 -0700 (PDT) From: Noam Postavsky To: Omar =?utf-8?Q?Antol=C3=ADn?= Camarena Subject: Re: bug#40827: 28.0.50; Macroexpansion at runtime References: <874kt8snsq.fsf@matem.unam.mx> Date: Sat, 25 Apr 2020 10:49:03 -0400 In-Reply-To: <874kt8snsq.fsf@matem.unam.mx> ("Omar =?utf-8?Q?Antol=C3=ADn?= Camarena"'s message of "Fri, 24 Apr 2020 14:09:57 -0500") Message-ID: <87sggrfwo0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40827 Cc: 40827@debbugs.gnu.org, Stefan Monnier 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 (-) Omar Antol=C3=ADn Camarena writes: > It seems that now, most of the time both the intepreter and the > byte-compiler, whether using lexical binding or not, will expand macros > at function definition time. This trick of combining an illegal (rx ... > (eval ...) ...), with lexical binding, and with eval-defun is the only > way I've found to trigger macro expansion at runtime. [...] > I discovered this during an interesting discussion on reddit, which you > can read here: > > https://www.reddit.com/r/emacs/comments/g5bat3/weekly_tipstricketc_thread= /fo362s8 [...] > (info "(elisp) Repeated Expansion") says: > >> 14.5.5 How Many Times is the Macro Expanded? > >> Occasionally problems result from the fact that a macro call is >> expanded each time it is evaluated in an interpreted function, but is >> expanded only once (during compilation) for a compiled function. If >> the macro definition has side effects, they will work differently >> depending on how many times the macro is expanded. Also further down: [...] But in interpreted execution, the macro is expanded each time the macro call runs [...] If `initialize' is interpreted, a new list `(nil)' is constructed each time `initialize' is called. (elisp "(elisp) Expansion") does mention that uncompiled macro calls (usually) also get expanded just once: Note that Emacs tries to expand macros when loading an uncompiled Lisp file. This is not always possible, but if it is, it speeds up subsequent execution. *Note How Programs Do Loading::. Ccing Stefan M, since you made the eager macroexpansion changes as far as I recall. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 25 16:05:03 2020 Received: (at 40827) by debbugs.gnu.org; 25 Apr 2020 20:05:03 +0000 Received: from localhost ([127.0.0.1]:60406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSR2t-0005mY-E7 for submit@debbugs.gnu.org; Sat, 25 Apr 2020 16:05:03 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSR2r-0005lv-OD for 40827@debbugs.gnu.org; Sat, 25 Apr 2020 16:05:02 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4B4D881144; Sat, 25 Apr 2020 16:04:56 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 768D7810EF; Sat, 25 Apr 2020 16:04:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1587845090; bh=BwNWXCCRzFaDTPZcCBc/eN0RK7jsXP83Z3YHFHRUDKI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GU0Lk35DWGNgH0DdWe1u+8rwAOXMVmAtJRv6GdpEPPwcwYgzKKmwUVNQrnDtODfIm a407ymWoNOKkCAUIBK5GcvVfbsfpTu1gdNs2jF2kQg9iJkt4STHlPYVnuetCJnpvC8 8BDEiwG7H1ZrTBQkMFqquIUgUlZMsG1P/OEzxaVnDnb4PbxrleuOem7jTxe7H0qQAq n/66++rkN3bcZbgFCbRtAJ0hfIqCLIIjJVX7AOpbOd7G6Li8LFpvewgnV7Xw7tav4I thI2w3PQESboaEUzPW/KVL0jRzexH2HjxpvvHQ0OtDky7Wnio024SpTvCLDYDCmWV+ TZdwcMYCPF/VA== Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41F5A120497; Sat, 25 Apr 2020 16:04:50 -0400 (EDT) From: Stefan Monnier To: Noam Postavsky Subject: Re: bug#40827: 28.0.50; Macroexpansion at runtime Message-ID: References: <874kt8snsq.fsf@matem.unam.mx> <87sggrfwo0.fsf@gmail.com> Date: Sat, 25 Apr 2020 16:04:49 -0400 In-Reply-To: <87sggrfwo0.fsf@gmail.com> (Noam Postavsky's message of "Sat, 25 Apr 2020 10:49:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) 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.198 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-Debbugs-Envelope-To: 40827 Cc: Omar =?windows-1252?Q?Antol=EDn?= Camarena , 40827@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: -3.3 (---) >>> Occasionally problems result from the fact that a macro call is >>> expanded each time it is evaluated in an interpreted function, but is >>> expanded only once (during compilation) for a compiled function. If >>> the macro definition has side effects, they will work differently >>> depending on how many times the macro is expanded. We could be more nuanced, indeed, since the "expanded once" can also happen for interpreted code (and the "expand many times" can also happen in code that's in a compiled file, if that code happened to be "hidden" from the compiler, such as hidden within a `quote`). But the basic idea remains the same: macro expansion may happen only once as part of the preprocessing, or it may be performed anew each time the code is run (or anything in-between, really), so the code should not make assumptions about when macros are expanded or how many times they're expanded. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 25 23:29:26 2020 Received: (at 40827) by debbugs.gnu.org; 26 Apr 2020 03:29:26 +0000 Received: from localhost ([127.0.0.1]:60677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSXyw-0002HE-0q for submit@debbugs.gnu.org; Sat, 25 Apr 2020 23:29:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSXyt-0002H2-SV for 40827@debbugs.gnu.org; Sat, 25 Apr 2020 23:29:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37602) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSXyj-0000pb-1s; Sat, 25 Apr 2020 23:29:13 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jSXyT-00035F-9a; Sat, 25 Apr 2020 23:28:58 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Noam Postavsky In-Reply-To: <87sggrfwo0.fsf@gmail.com> (message from Noam Postavsky on Sat, 25 Apr 2020 10:49:03 -0400) Subject: Re: bug#40827: 28.0.50; Macroexpansion at runtime References: <874kt8snsq.fsf@matem.unam.mx> <87sggrfwo0.fsf@gmail.com> Message-Id: Date: Sat, 25 Apr 2020 23:28:57 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40827 Cc: omar@matem.unam.mx, 40827@debbugs.gnu.org, monnier@iro.umontreal.ca 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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > [...] But in interpreted execution, the macro is expanded each > time the macro call runs > [...] > If `initialize' is interpreted, a new list `(nil)' is constructed each > time `initialize' is called. Aside from the issue you're discussing, that text has the drawback of using the passive voice. The passive voice tends to be less readable, and it can obscure who or what is performing the action. Would someone please rewrite it to use the active voice? Occasionally the passive voice is necessary, but please write in the active voice whenever that works. -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 12:05:47 2021 Received: (at 40827) by debbugs.gnu.org; 10 Aug 2021 16:05:47 +0000 Received: from localhost ([127.0.0.1]:60553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDUGB-0002vx-K2 for submit@debbugs.gnu.org; Tue, 10 Aug 2021 12:05:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDUG9-0002ve-KQ for 40827@debbugs.gnu.org; Tue, 10 Aug 2021 12:05:46 -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=cZm0hC/wjFwpoLXfDgX0eAJyslHE2mfVI0p2NhMFceo=; b=XhnlaXDy0QV5OuBeFmgtj3cz/S 06ORw4Ky8PYNIW0mgku3QEZUH5JFSXJmYcoe4PkNCFvr70BelBmVIWLTSdGaw4+xArIqXgP5mDeDi Tmr+c05Y7aEwTUNC1MEZ4UKONPNXIM4yUbqN3NDc7ENWcj9vYDr4pwhuxKE8GT+m2ZO0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDUFw-0003s0-Te; Tue, 10 Aug 2021 18:05:37 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#40827: 28.0.50; Macroexpansion at runtime References: <874kt8snsq.fsf@matem.unam.mx> <87sggrfwo0.fsf@gmail.com> Date: Tue, 10 Aug 2021 18:05:32 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 25 Apr 2020 16:04:49 -0400") Message-ID: <87r1f1waib.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: > We could be more nuanced, indeed, since the "expanded once" can also > happen for interpreted code (and the "expand many times" can also happen > in code that's in a compiled file, if that code happ [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 40827 Cc: Omar =?utf-8?Q?Antol=C3=ADn?= Camarena , 40827@debbugs.gnu.org, Noam Postavsky 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: -3.3 (---) Stefan Monnier writes: > We could be more nuanced, indeed, since the "expanded once" can also > happen for interpreted code (and the "expand many times" can also happen > in code that's in a compiled file, if that code happened to be "hidden" > from the compiler, such as hidden within a `quote`). --- If the macro is expanded just once, in compilation, then the object is constructed just once, during compilation. But in interpreted execution, the macro is expanded each time the macro call runs, and this means a new object is constructed each time. --- I think this is pretty clear -- it's guarded by "if", but it doesn't claim that compilation will always expand the macro. So I think this should be sufficient, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 12:05:51 2021 Received: (at control) by debbugs.gnu.org; 10 Aug 2021 16:05:51 +0000 Received: from localhost ([127.0.0.1]:60555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDUGE-0002wC-Ro for submit@debbugs.gnu.org; Tue, 10 Aug 2021 12:05:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDUGB-0002vh-De for control@debbugs.gnu.org; Tue, 10 Aug 2021 12:05:47 -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=KjV/LGgJ10nwBP02tumhDQqYr/g66qOj8Cs51H01+vY=; b=icOshQ3BOOJup0FVPehAuBZHW/ HADehCg76ZoVzjedAdaYMk8QcZCNmVSUkWNZIa+EEYPJ85vgkkpxq7l7FzqVemji50o8BuJ3EsT0V sFOJeznjhFLFcMo/GQ1R2+da4C1lN3xgNXUldqbuyyO3gKjkIV+crLHuBQlosDBT5HJc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDUG3-0003s7-Fm for control@debbugs.gnu.org; Tue, 10 Aug 2021 18:05:41 +0200 Date: Tue, 10 Aug 2021 18:05:39 +0200 Message-Id: <87pmulwai4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #40827 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 40827 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: -2.3 (--) 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: -3.3 (---) close 40827 quit From unknown Sat Jun 14 18:47:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Sep 2021 11:24:04 +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