From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 18:55:11 2020 Received: (at submit) by debbugs.gnu.org; 24 Sep 2020 22:55:11 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLa8s-0008HK-Sk for submit@debbugs.gnu.org; Thu, 24 Sep 2020 18:55:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:52278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLa8q-0008HC-2V for submit@debbugs.gnu.org; Thu, 24 Sep 2020 18:55:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLa8p-0004az-QX for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:55:07 -0400 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]:41436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLa8n-0005zb-0R for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 18:55:07 -0400 Received: by mail-qv1-xf32.google.com with SMTP id ef16so387487qvb.8 for ; Thu, 24 Sep 2020 15:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=a/SvIKuzQRJjkQqcAPcTGun65d44V4AiHfrpQbp53yM=; b=fbkk0YH7VlFFpEI093GTx2vKkMEzJqNo4ZOeXgcAZmBMzURSxEdtGVdrnGD93DyMTn yaMKnb8B/SY31BN8E5WvaMu6O3QUkDvykpHTOsiLkBMGegxZyiwwWavbsW5peg2nUc/D dyCPv3Hc92lBjBMk7Y0VaU03ZWWYi0zJkDCkJbu4kUHflOb569CeXIMDV/gyqWXrUn5c 5HSnmmjw7oJfaOtFRHmpowVWv6MWPavD9gV1tvAqNh3PmTccAGLvXAWivtsMo3uxL3gx yuUdsazCJEwFkYVhhsN2cU5zpwsIYOV03rrGhSMUlqHQi+JPfy/Ti6RAWsYKZR1Jk3Ws sb2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=a/SvIKuzQRJjkQqcAPcTGun65d44V4AiHfrpQbp53yM=; b=XHKKR8fvs9mTRnoLMFdve3DOyCbovh6a6aNX22nr9WRXPOotw0sNpSsmxDWa5pRZ+1 J734KmC3oXhqG39i/5edoaVGZhePcxfQlF4F736363brX4assIUa58ei9tQ6vYAvRgCL 9uSdPv+KCiMKnfKCabs+2iKzAZd6CoqB1xtf42uQzNvb+qH+/zyt//3VMI/Es3GboQbw 06ILZSOw3/+iprS5YT6nVNzo8ODJ9p7IgLOSm5yYofdytQCWmqBg3Gd5FXFi4SMjKtDM dmkO2A+ghY5U5TaIfH4L6H1sJ3qxJNm59Shw/N2cAPMH2Zrupb1+ynmg3Sa7Q4vQuuZK Ctyw== X-Gm-Message-State: AOAM532G7l9wDaBS+sJit9aAGN2LyWpLQ/wQT4XSvl+AEcJtUnAVmwPV IJbra2629PUvdMb7gK6WXS1PqPD3ejjDvXfV X-Google-Smtp-Source: ABdhPJyuBIa6MAaxzljp+RKvaUtQRM6qEVToA+/7CHSQbOYBDz9fT3/zw+RfFRCnUA4xzgXzZOdDww== X-Received: by 2002:a0c:fd42:: with SMTP id j2mr1633547qvs.37.1600988102539; Thu, 24 Sep 2020 15:55:02 -0700 (PDT) Received: from localhost.localdomain ([2604:2000:14c6:84b0:3d4e:513a:7b2c:b041]) by smtp.gmail.com with ESMTPSA id g25sm692956qto.47.2020.09.24.15.55.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2020 15:55:02 -0700 (PDT) From: Sean Devlin Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.0.3.2.42\)) Subject: 27.1; Macroexpansion bug in `push' Message-Id: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> Date: Thu, 24 Sep 2020 18:54:59 -0400 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3654.0.3.2.42) Received-SPF: pass client-ip=2607:f8b0:4864:20::f32; envelope-from=spd@toadstyle.org; helo=mail-qv1-xf32.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-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: -2.3 (--) Hi folks, I believe I've found a macroexpansion bug in the `push' macro. Open a new instance of Emacs and evaluate the following form in the scratch buffer: (macroexpand '(push (list 'x) (cdr my-list))) The result (with some reformatting) is this: (let* ((v (list 'x)) (v my-list)) (setcdr v (cons v (cdr v)))) Both values are bound to `v', so the former is shadowed by the latter. Thanks! In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 = Version 10.14.6 (Build 18G95)) of 2020-08-12 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2011 System Description: macOS 11.0 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set (x y) See buffer *Pp Macroexpand Output*. You can run the command =E2=80=98pp-macroexpand-last-sexp=E2=80=99 with = M-x p-m-l RET See buffer *Pp Macroexpand Output*. Making completion list... Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-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: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu cl-loaddefs cl-lib gv pp tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 46943 7509) (symbols 48 6030 1) (strings 32 15598 2351) (string-bytes 1 514024) (vectors 16 10404) (vector-slots 8 132291 12524) (floats 8 28 38) (intervals 56 218 0) (buffers 1000 13)) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 24 19:17:40 2020 Received: (at 43601) by debbugs.gnu.org; 24 Sep 2020 23:17:40 +0000 Received: from localhost ([127.0.0.1]:41998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLaUe-0000Nw-38 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 19:17:40 -0400 Received: from mail-qv1-f41.google.com ([209.85.219.41]:43567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLaUb-0000Nj-Im for 43601@debbugs.gnu.org; Thu, 24 Sep 2020 19:17:38 -0400 Received: by mail-qv1-f41.google.com with SMTP id cr8so403821qvb.10 for <43601@debbugs.gnu.org>; Thu, 24 Sep 2020 16:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=MtnfZoJ1OhrS41n3GUsFCIr27rXBfwN0a+mQRpZaTtU=; b=zGW8t/US9WZewk020XTp/uv72Cesx1ekvabDRTTsMn0L8/XobYh7GThiBQAc2RwL5f qdFT2UG4Fxm1JbHUS+yuGwGkJLrYXD9e9SbsEXbV0gK66KWY/cXFnJjxHui4suW9PguK uj4HKkdeYYJ727LG7ljmHzKxyCJB2mdwJCI1+TIbIqHrBgWcupZ5PzHPVn9ETFfHkcVc rOedsVE28Ngbt2kT7r3McQTDKyVn5MNb4bWnVHbUAa2LJeM6TO5fwbtgVsjqhEOr/5++ sSNtxt0u8nH9yTeqEWa4l/OWopeVeT3O3ta6OWU7vK5rSlXazn8RWxStiBE9lHjZTZAR qPYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=MtnfZoJ1OhrS41n3GUsFCIr27rXBfwN0a+mQRpZaTtU=; b=b0NQbmn9slG4aqadkVkE9vXJ3vU+ilZU9sm2Ig1VQ3fESOgDGoOGimNy2t+AEQ6+hx e9JhMDUk14avonu+KTmf6vOynp4h4oIU9wdwv0vY4zRTX97f3uRPYXdOB7ciatLWaPqt OnRHXCrod2TiWTGEfwhJDXrGedGEqSrCzIKa1w1iQMyw659VXja3VaYzY4JSXMwav7ne x5Aa++fp7kIxGkBkkAe7KgJmR0evK+fSNQJjv85cRcUoT+/v16IojNaQcSDQ/FO0d+WP Y4T1vluToSGl5OENOkfIl25wbRtFC520XVnfmIyqzIBpBTr7qD5ShJTFI4RiLvvTFYge lHJw== X-Gm-Message-State: AOAM53057Myu83BffETZTVoLj3QX2M9g2B/ZjebZ0w/bi7tK8Zytrqoz gRCLVKMZS4ij9M/mky6JOn9k7TY7fW93cgMl X-Google-Smtp-Source: ABdhPJyfzHeBEpSn7QWakorwyZW4TNkwoemeRmP9nCwWOnJzeeWSSutHtanzDO0JRDVWrvEh/YbIcg== X-Received: by 2002:a0c:ac4c:: with SMTP id m12mr1590986qvb.39.1600989451920; Thu, 24 Sep 2020 16:17:31 -0700 (PDT) Received: from localhost.localdomain ([2604:2000:14c6:84b0:3d4e:513a:7b2c:b041]) by smtp.gmail.com with ESMTPSA id g45sm771475qtb.60.2020.09.24.16.17.31 for <43601@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2020 16:17:31 -0700 (PDT) From: Sean Devlin Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.0.3.2.42\)) Subject: Re: bug#43601: Acknowledgement (27.1; Macroexpansion bug in `push') Date: Thu, 24 Sep 2020 19:17:30 -0400 References: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> To: 43601@debbugs.gnu.org In-Reply-To: Message-Id: <1B1D7040-9F08-4DB1-855B-EFF4051CD4E0@toadstyle.org> X-Mailer: Apple Mail (2.3654.0.3.2.42) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43601 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 (-) Hi folks, Upon closer inspection, it looks like the two bindings are distinct. I = guess the symbols must be created by `make-symbol=E2=80=99 or similar. = Still, it might be nice for debugging if the symbols had distinct names. Thanks!= From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 01:56:14 2020 Received: (at 43601) by debbugs.gnu.org; 25 Sep 2020 05:56:14 +0000 Received: from localhost ([127.0.0.1]:42361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLgiM-0001W6-6J for submit@debbugs.gnu.org; Fri, 25 Sep 2020 01:56:14 -0400 Received: from smtp-2.orcon.net.nz ([60.234.4.43]:56163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLgiK-0001Vx-BT for 43601@debbugs.gnu.org; Fri, 25 Sep 2020 01:56:13 -0400 Received: from [10.253.37.70] (port=57743 helo=webmail.orcon.net.nz) by smtp-2.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1kLgiH-0004UI-HP; Fri, 25 Sep 2020 17:56:09 +1200 Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Fri, 25 Sep 2020 17:56:09 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 25 Sep 2020 17:56:09 +1200 From: Phil Sainty To: Sean Devlin Subject: Re: bug#43601: 27.1; Macroexpansion bug in `push' In-Reply-To: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> References: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> Message-ID: <24cca911c0f1d61cecf4a5318a8d54e8@webmail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43601 Cc: 43601@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.7 (-) On 2020-09-25 10:54, Sean Devlin wrote: > Hi folks, > > I believe I've found a macroexpansion bug in the `push' macro. Open a > new instance of Emacs and evaluate the following form in the scratch > buffer: > > (macroexpand '(push (list 'x) > (cdr my-list))) > > The result (with some reformatting) is this: > > (let* ((v (list 'x)) > (v my-list)) > (setcdr v > (cons v > (cdr v)))) > > Both values are bound to `v', so the former is shadowed by the latter. It's actually fine. What you're seeing is the *printed representation* of the lisp objects, and two completely independent symbols, each with the name "v". (setq foo (macroexpand '(push (list 'x) (cdr my-list)))) => (let* ((v (list 'x)) (v my-list)) (setcdr v (cons v (cdr v)))) (setq vfirst (caaadr foo)) => v (setq vsecond (car (cadadr foo))) => v (eq vfirst vsecond) => nil (cdaddr (caddr foo)) => (v (cdr v)) (eq vfirst (car (cdaddr (caddr foo)))) => t (eq vsecond (cadadr (cdaddr (caddr foo)))) => t This is like: (eq (make-symbol "v") (make-symbol "v")) => nil From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 05:36:00 2020 Received: (at 43601) by debbugs.gnu.org; 25 Sep 2020 09:36:00 +0000 Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLk8z-0006rQ-1V for submit@debbugs.gnu.org; Fri, 25 Sep 2020 05:36:00 -0400 Received: from mail-oi1-f173.google.com ([209.85.167.173]:34659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLk8u-0006rA-Gs for 43601@debbugs.gnu.org; Fri, 25 Sep 2020 05:35:56 -0400 Received: by mail-oi1-f173.google.com with SMTP id n2so2176616oij.1 for <43601@debbugs.gnu.org>; Fri, 25 Sep 2020 02:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=S0V9N+6vaUUSYORV+o8hoC/oLAseOsmGeE6GlMFhGqE=; b=oN5rPlBWVJUvXWXzr3XTYbTQHpjlZGXmBpQO+bgZQX9urs8iuos8cU/0h47u1jTzBC T6s68nazmA4n/ancyCzIS68bhR8EaK970qtYxxqXpXuqBty7/SxdtnFUKtWgLAPnuezs IAxgupZJWbLU5OI+kWATp/vEG72Syer6uXFAIvAx5mEA/vTzKutau/MVA+9XPz7VwgfY tyVcykPkdXoK8196rmYiTjoCM0lnkHhfhklBA8O1mgCl6LgFBx1MHccpy6ndjPAAWoWO z9ggGwccFcRYE9/o+KlbioBrLKs6SmTYcsinLarTiSVSirlb0/umBovCA0pQ5+niuYhz 3Pww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=S0V9N+6vaUUSYORV+o8hoC/oLAseOsmGeE6GlMFhGqE=; b=ZTKH7YvQbllwuraKpEf+lBFs2M/DwFRE6ogEafn9WJcSXcEsiGg+ILEnkKhL0lRaKy Y3Xp/uaWTLAdMLMrsgdOq95xCZ71mA3EaV+WU65nnokunxtpLfAwkFlegtgd15WJLF1l EGuaz1iSJIYuMoDb/cJQ9G3UAvtr/SsO3jZ9MFpBR6OBPOBLtTR07s/kkDSSjZqDqf3G NjFt+Y/dgdktLAyCzRrvsYNjdKQtfkZmSimG0jkyyApeVf73jl+p6bFLDrMNUNCue7V5 4wwZuvr0jFNjqEoVL6iLRHffYtsJ1PZJXIpznRxRsthM4Pqb9+8T93YAOJqjo4La1eju UOlQ== X-Gm-Message-State: AOAM532NKaXvqNmTuXWgAiQQG8VapHomi7Sh3HgKnH85wUKVEEC0jarm wAZiUbtejPqO720vRzeauZZy0oRZPs4uQ1rdHoE= X-Google-Smtp-Source: ABdhPJxWQIs5qrWTiUAbwxh2qCBdDsT6pp8bjJj6Ht2UbX7tmTx4XC1kwmjmQQ7sDu9/FzBpXxn1jl92sNQeBh/kSzc= X-Received: by 2002:aca:ccc3:: with SMTP id c186mr1026733oig.170.1601026546382; Fri, 25 Sep 2020 02:35:46 -0700 (PDT) MIME-Version: 1.0 References: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> In-Reply-To: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> From: Philipp Stephani Date: Fri, 25 Sep 2020 11:35:35 +0200 Message-ID: Subject: Re: bug#43601: 27.1; Macroexpansion bug in `push' To: Sean Devlin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 43601 Cc: 43601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Fr., 25. Sept. 2020 um 00:56 Uhr schrieb Sean Devlin = : > > Hi folks, > > I believe I've found a macroexpansion bug in the `push' macro. Open a > new instance of Emacs and evaluate the following form in the scratch > buffer: > > (macroexpand '(push (list 'x) > (cdr my-list))) > > The result (with some reformatting) is this: > > (let* ((v (list 'x)) > (v my-list)) > (setcdr v > (cons v > (cdr v)))) > > Both values are bound to `v', so the former is shadowed by the latter. These are different uninterned symbols: (let ((print-gensym t) (print-circle t)) (print (macroexpand '(push (list 'x) (cdr my-list)))) nil) =E2=87=92 (let* ((#2=3D#:v (list 'x)) (#1=3D#:v my-list)) (setcdr #1# (cons= #2# (cdr #1#)))) In general, if you see a "weird" expansion like this, bind print-gensym to non-nil to see the uninterned symbols. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 05:40:36 2020 Received: (at 43601) by debbugs.gnu.org; 25 Sep 2020 09:40:36 +0000 Received: from localhost ([127.0.0.1]:42672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLkDU-0006yP-HY for submit@debbugs.gnu.org; Fri, 25 Sep 2020 05:40:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLkDQ-0006y8-EQ for 43601@debbugs.gnu.org; Fri, 25 Sep 2020 05:40:35 -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=2gIiKdFgzInfqlNEBRT9bA6kMf1qlVsf4m75Mj4CeAo=; b=S9T4XFI+Nf9uv5B+L4N0Thqoad PzGy714YY1pkWN7+F3VJqnMtU4yRQa0s5rlc6cBAzjTchX0sNlRK+3KJyUr+Rit+iRuVFM08bjp+U EWLgk35hEMIO/pInMJQqdLuZHsTpIoUXE8Kys38vuZD4oRA7vvnY17aRSKMd1xXIpXW8=; 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 1kLkDE-0000fn-HL; Fri, 25 Sep 2020 11:40:25 +0200 From: Lars Ingebrigtsen To: Philipp Stephani Subject: Re: bug#43601: 27.1; Macroexpansion bug in `push' References: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEXXnlrDt7BaLSqw RzEvJCgNCAx8eIRdVFX////3Dm9OAAAAAWJLR0QIht6VegAAAAd0SU1FB+QJGQklNdCRphsAAAG2 SURBVDjLldRLj5swEADgSSJlr8yqYs+1odzDqr22xGTuxJNcy6oL1w1y4r9f2xCFEPawI4Gl+TR+ YgAWQshEy7RGxEVUMhe5D4C1EPlrIVO8wn4AcO+NHEE1wCpAzohRDzzAUnrY6BtshwoPQlQBwMP+ NoYbP7tV6AGEL+ihDhU8gEu7pbzSBbH+O4ZVEMNMuGgCyB6WQjk4uwSdonEFmEKIzAPrjzGsUxLi R+ozfBzB2vBOCBsyQ2wDmFLv3rJulA8LAVClpuf2DnwJPGnWytCZJyXw5JqSuLwD3q9g6dtK8ySk r/A1U9j3wDOwmQc5wDSqHGI6UNvaQ2GtstYaIttl9gMAT39e6IAnZU2RiM4UJAx1tHIQO4hjpVQx PC5KCWjtpWldP9fo57EFnB3czSqehxy+zcPuy3CBd7+HD/ljDf6Efqcz4Jvv5yloDB9r+7C5HL7i 6t/j4Jnv6qA+gf5g76emgD+JWXBdaHicqSpsojW0ibbnu7zKOpkk7mr+xPeQIlKK/M1SJVnr7+wv EwBPtqkxbOqxacLVTK5wqfFFCMVUI4gJRP4fkgUodb9yDBFBH/8BdU85s9N4aKgAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjAtMDktMjVUMDk6Mzc6NTMrMDA6MDD5GdWXAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIwLTA5LTI1VDA5OjM3OjUzKzAwOjAwiERtKwAAAABJRU5ErkJggg== X-Now-Playing: Thievery Corporation's _The Mirror Conspiracy_: "The Mirror Conspiracy" Date: Fri, 25 Sep 2020 11:40:19 +0200 In-Reply-To: (Philipp Stephani's message of "Fri, 25 Sep 2020 11:35:35 +0200") Message-ID: <87tuvmry7w.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: Philipp Stephani writes: > In general, if you see a "weird" expansion like this, bind > print-gensym to non-nil to see the uninterned symbols. True. But we could change push to use a different name for the gensymmed symbol to avoid confusions like this. 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: 43601 Cc: Sean Devlin , 43601@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 (-) Philipp Stephani writes: > In general, if you see a "weird" expansion like this, bind > print-gensym to non-nil to see the uninterned symbols. True. But we could change push to use a different name for the gensymmed symbol to avoid confusions like this. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 11:05:45 2020 Received: (at 43601) by debbugs.gnu.org; 26 Sep 2020 15:05:45 +0000 Received: from localhost ([127.0.0.1]:47547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMBlg-0004TL-Nb for submit@debbugs.gnu.org; Sat, 26 Sep 2020 11:05:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMBlf-0004T7-F3 for 43601@debbugs.gnu.org; Sat, 26 Sep 2020 11:05:44 -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=a8L3sUeaH6r5J3zp/cTLzqHFIDrvM4bKBm/lyyIwP1s=; b=WC6b8YrAomVDPssQWmgdwsDK1S ITd07FSG4ftELklHDi3tgro7ws3mR15QOSSlzXWT/MGmUPuGcVcAwaq9yaa47RQd169Eo9gwXLO/L e6L+VwQu+oZXNOwgpDIjSqMRAi61qAZg401MLEEYuT5oCiw3vq+gGrawARbH//mQEUF0=; 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 1kMBlW-00007k-Lc; Sat, 26 Sep 2020 17:05:37 +0200 From: Lars Ingebrigtsen To: Philipp Stephani Subject: Re: bug#43601: 27.1; Macroexpansion bug in `push' References: <33F8870E-E0A5-43EC-98A2-7EF3DA2CCD53@toadstyle.org> <87tuvmry7w.fsf@gnus.org> X-Now-Playing: Black Cab's _Games of the XXI Olympiad_: "Go Slow" Date: Sat, 26 Sep 2020 17:05:32 +0200 In-Reply-To: <87tuvmry7w.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 25 Sep 2020 11:40:19 +0200") Message-ID: <87a6xck283.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: > Philipp Stephani writes: > >> In general, if you see a "weird" expansion like this, bind >> print-gensym to non-nil to see the uninterned symbols. > > True. But we could chan [...] 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: 43601 Cc: Sean Devlin , 43601@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: > Philipp Stephani writes: > >> In general, if you see a "weird" expansion like this, bind >> print-gensym to non-nil to see the uninterned symbols. > > True. But we could change push to use a different name for the > gensymmed symbol to avoid confusions like this. I've now done so in Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 11:05:52 2020 Received: (at control) by debbugs.gnu.org; 26 Sep 2020 15:05:52 +0000 Received: from localhost ([127.0.0.1]:47550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMBlo-0004Tg-0z for submit@debbugs.gnu.org; Sat, 26 Sep 2020 11:05:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMBlm-0004TR-8w for control@debbugs.gnu.org; Sat, 26 Sep 2020 11:05:50 -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=r75Q35yqsTQWKvoUo5C1O8vZF+k6ehbVjUefBIMiwWU=; b=rDl9Qw4nQAUL/Ljhh5xYfYetyp lMJTU1JeeMzNKGm3hT4YBncELc2/9e6f4jjgT40F0r4yZrKQ2Fa2jYcaQ4OcJ5zmCgm0PS9Ln95+4 9H2FZS39ue42zkgLO/wNsQvxwMmRhFNxX0+1LJbmN6AUIjI0jUEE5rWzFxmRvkvaeSfE=; 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 1kMBle-00007w-Hs for control@debbugs.gnu.org; Sat, 26 Sep 2020 17:05:44 +0200 Date: Sat, 26 Sep 2020 17:05:41 +0200 Message-Id: <878scwk27u.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43601 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 43601 fixed close 43601 28.1 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 43601 fixed close 43601 28.1 quit From unknown Sat Sep 06 14:23:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Oct 2020 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