GNU logs - #45619, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: jixiuf <jixiuf@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 03 Jan 2021 09:05:01 +0000
Resent-Message-ID: <handler.45619.B.160966466721017 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 45619 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.160966466721017
          (code B ref -1); Sun, 03 Jan 2021 09:05:01 +0000
Received: (at submit) by debbugs.gnu.org; 3 Jan 2021 09:04:27 +0000
Received: from localhost ([127.0.0.1]:33287 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kvzJG-0005Sp-0e
	for submit <at> debbugs.gnu.org; Sun, 03 Jan 2021 04:04:27 -0500
Received: from lists.gnu.org ([209.51.188.17]:57714)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jixiuf@HIDDEN>) id 1kvyQ4-00042o-Hx
 for submit <at> debbugs.gnu.org; Sun, 03 Jan 2021 03:07:21 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:53202)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jixiuf@HIDDEN>) id 1kvyQ3-0001AJ-WB
 for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2021 03:07:20 -0500
Received: from out203-205-221-153.mail.qq.com ([203.205.221.153]:58979
 helo=qq.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jixiuf@HIDDEN>) id 1kvyPt-0002Ti-QZ
 for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2021 03:07:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;
 t=1609661220; bh=pCZc5u7lRToTXivLggVZACJ0nUwj2k5MjeCBSXgV330=;
 h=From:Subject:Date:To;
 b=fZ1bI8ijeDDHdMfzCdl/VjQwQVObR4KLeP+o674Nh977T6uQf/oheV3rUHanYwXM0
 cXJMszJ767rhDo1cwbXVWC7CRQVCQYPLdSv5gRF3/BAAB9rI11UXEKHWppn7RCLDKh
 0q4YOdsWMq8cAvFokbYFokqU0fuPaP0winMTJ4eI=
Received: from [192.168.0.103] ([111.201.51.155])
 by newxmesmtplogicsvrsza6.qq.com (NewEsmtp) with SMTP
 id EC93BE2B; Sun, 03 Jan 2021 15:59:09 +0800
X-QQ-mid: xmsmtpt1609660749tspa32d7o
Message-ID: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
X-QQ-XMAILINFO: MYG+D1KYzvLe9gffFpT3LBFebizaGOI0EaQ3F2zNLquzqtnDftLHXY9/MO3xOM
 4hHUledmzG1pXJus+ZGr2Tc8JdzeYpRGApcehQb70mH0KrZDne19IpVusamtky9YhSEFCh9hY5xx
 DGIkX1U1xfS251gwlJeShTA01Nd/8vQJtOcCrvw2tTj9uSh7ype8gR+F9w//PXb0Jeirm0WwuudX
 /YyBGl12JpBxvec32VR6eqGryBZ/3qUxTHiXXW3ph1XyG13N4QTxqy4GEA6F+nHdl0yxKhH7gSD5
 Vm2iubZulvInuxd5o3cjzquOuifugw5zjAIQ8y95KoGNdUirFg7VcQoZX9KGCO6L7CN2fj8SxaVD
 /J6w2LVTSs3hhGG4U9eU91rtxhwj9pNFjGrIsUbGj+HShhzJ9lvTNow6u7ZXrfM9I4dpCKNKuzgl
 A8V2O2avzq1mpIcbMvIZ7X9M3z2LMmVVSEnn6Rb9KVzMoNH/u3f/A8SVpL/cC6Px6kUbuVlXfvk0
 RexsFY+Vs7iBzxhEE9RuQAfbCBD1wHkE+cT0xOdC5vWxWoUfweVXe5PnYfOLxqVLnWGq03tqwmTL
 XNSF3cDDel6fgVRTL2uc1F1Ta3StXkJQqifD7Kp/k4o4/Bux82UZlZsmPEjxEMKlKeWWdVL4BA5n
 /OVRoH+CJP8rx9U6pAHqO5ZQDP8DjInhJomZjHRm66scuuTpsDZdK0EDXQjO4rcALrNP1cPEn2yB
 xCsNG8WYSjKJ11O+9aawWnwQ==
From: jixiuf <jixiuf@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
X-OQ-MSGID: <C576CC0F-8EC0-46CD-B31C-E84317CD119E@HIDDEN>
Date: Sun, 3 Jan 2021 15:59:05 +0800
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Received-SPF: pass client-ip=203.205.221.153; envelope-from=jixiuf@HIDDEN;
 helo=qq.com
X-Spam_score_int: -10
X-Spam_score: -1.1
X-Spam_bar: -
X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.2 (/)
X-Mailman-Approved-At: Sun, 03 Jan 2021 04:04:21 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



(pcase-let ((`(,default-directory) '( "/tmp/")))
    (call-interactively 'find-file))

Expected behavior: Find file in "/tmp/"
Observed behavior: Find file in "~"

Original Bug: https://github.com/minad/consult/issues/108



In GNU Emacs 28.0.50 (build 3, x86_64-apple-darwin19.6.0, NS =
appkit-1894.60 Version 10.15.7 (Build 19H114))
of 2021-01-02 built on jxfhome
Repository revision: 0f561ee55348ff451600cc6027db5940ee14606f
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Configured using:
'configure --disable-silent-rules
--enable-locallisppath=3D/usr/local/share/emacs/site-lisp
--prefix=3D/Users/jixiuf/gccemacs --with-nativecomp --with-ns
--disable-ns-self-contained CC=3Dclang LDFLAGS=3D-L/usr/local/lib/gcc/10
'CFLAGS=3D-I/usr/local/opt/openssl@HIDDEN/include
-I/usr/local/opt/texinfo/include -I/usr/local/opt/gnu-sed/include
-I/usr/local/opt/gcc/include -I/usr/local/opt/libxml2/include
-I/usr/local/opt/jpeg/include -I/usr/local/opt/libtiff/include
-I/usr/local/opt/gnutls/include -I/usr/local/opt/nettle/include
-I/usr/local/opt/libtasn1/include -I/usr/local/opt/p11-kit/include '
'CPPFLAGS=3D-I/usr/local/opt/openssl@HIDDEN/include
-I/usr/local/opt/texinfo/include -I/usr/local/opt/gnu-sed/include
-I/usr/local/opt/gcc/include -I/usr/local/opt/libxml2/include
-I/usr/local/opt/jpeg/include -I/usr/local/opt/libtiff/include
-I/usr/local/opt/gnutls/include -I/usr/local/opt/nettle/include
-I/usr/local/opt/libtasn1/include -I/usr/local/opt/p11-kit/include ''

Configured features:
JPEG TIFF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LC_ALL: zh_CN.UTF-8
  value of $LANG: zh_CN.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
rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
pcase china-util iso-transl 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 button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process emacs)

Memory information:
((conses 16 52619 7203)
(symbols 48 6722 1)
(strings 32 18551 2095)
(string-bytes 1 611982)
(vectors 16 12909)
(vector-slots 8 230707 8768)
(floats 8 21 43)
(intervals 56 296 4)
(buffers 984 10))




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: jixiuf <jixiuf@HIDDEN>
Subject: bug#45619: Acknowledgement (28.0.50; pcase-let on MacOS doesn't work)
Message-ID: <handler.45619.B.160966466721017.ack <at> debbugs.gnu.org>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
X-Gnu-PR-Message: ack 45619
X-Gnu-PR-Package: emacs
Reply-To: 45619 <at> debbugs.gnu.org
Date: Sun, 03 Jan 2021 09:05:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 45619 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
45619: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D45619
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 12:45:02 +0000
Resent-Message-ID: <handler.45619.B45619.160976429210693 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: jixiuf <jixiuf@HIDDEN>
Cc: 45619 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160976429210693
          (code B ref 45619); Mon, 04 Jan 2021 12:45:02 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 12:44:52 +0000
Received: from localhost ([127.0.0.1]:58071 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwPEB-0002mO-OU
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 07:44:51 -0500
Received: from mout.web.de ([212.227.15.3]:36095)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kwPE8-0002m9-Q7
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 07:44:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1609764275;
 bh=w1vPcLsAIyyw5s5a1ZtnVKNZpC/BWracseKplkZNWB4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=KMyCgGaJsXqea4WQwB9o65BR+VRaEDScxJqMeCWGA1KPAZKEmTixxA2IgKO7uF6Ta
 w+xfZWNASHkfSjamV/7B6+FisXCkITRcm4wswCuU4tkH+xcTzbEIuE+LDgf7WKAoJb
 G1fPBvXpoaP9un/IUe9j+pMT2kqKUN2MMONDLDks=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.99.46]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MTOhc-1kZOik3JLY-00U7wU; Mon, 04
 Jan 2021 13:44:34 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
Date: Mon, 04 Jan 2021 13:44:33 +0100
In-Reply-To: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 (jixiuf@HIDDEN's message of "Sun, 3 Jan 2021 15:59:05 +0800")
Message-ID: <877dos50su.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:YDIO+J7ZVJNWu+cSCG0yuH7Yu1JJRAoBt3K/UOZSXoEoYkRNd20
 +sky5XpaAWg9o5Hye53XKqD3aYrY7kaUr/NFfVASLwstMk+emiJNGRHLcO75c/Iv7yjMo7w
 dljDBbOC/L1W/9thaey1kddbCQUmlg9rxfanss4VWbbnmQFKlkAk9vSADL7dihYtKTmElXn
 FdHIlzD43WarQ0YxgJ/ng==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:KlY/HJggtR4=:mM28QifPMOWDawoCtC5rxB
 MapdzAGxQdyooY2xs8qOdWJMjVrNe4Gak+hHEhvx21NvEtKb7Q0mpMjYXKF65NNiWfn2A9wjV
 9pbZ2EUeZOdbpn7qCO5x1YCGkCrgr6Q5lrw8wpTfmpWmOx/FCA1xnhPRzSLx7HBsEkhrLFZbq
 89GMtIwvwqyqSJkvE7eznk9z0osP5mfYuyD1at7x20yq+jpjEm2X/oCoWn0uXTZ8NZ5jA/iVx
 puuTcWfh3MNd12+MpKcGL0nBsCFPlCbyalsPUNNyEKM3osCm1PLPV8f068RFefu/wpMGqr3Lk
 1YCw31ejt69W9uavAdtB4qo0zDZIFBxr2xTnzwyo+VD7ii4mbiF6HNlP0Tz/LIFpzu6WRl/zf
 AqILeKlgUDaUXlorAGcHFCxW8NoNvrcS3IN2zvilgBfDXC8uHi58EatKiDsZrCqyGlK687Uuw
 fojpKye7XzEA4b+DcWxtU69moez1U6xZOqL1V5Wo3gwToFix6phYxm+R1qjxhAYUdkwy5zB0v
 wrFqOi6t87FL4BPJACVPzqXcui0d5quLK7ojYM+Fmvbes7lz9+JHzIvDyxD3Pfa7FncsXRA/7
 yVSSa8r6pimEJ29ytkeM7sHNaCCsNR2anfQu0tVnv2GFcGVE/fgXAJBQuF6nGkhy8LoisYnT1
 WW2nEb6i9RAWXrmeIHxI+OtReOo0QhBaLfqHEcngnsegKLsIHfnXI+l6UakHotDwAXsYsACa6
 mzjLXjtY9OxBw1Av6kptZy6ePsoJytl4T32FpjtoSS/pP47sqVHBVIJNoCxmctfKNumrG6yf2
 AVBOYddEAPF0Y40PJK5WpW2YOPf50AM9LXgtA6kDWsQ946opvdiVHsL8RU5po99o7Tz0N6auM
 dzFsxxWhw9e/Fua0TGc5m9gshPsXeF6mK23luzKz8=
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
 the administrator of that system for details.
 Content preview:  jixiuf writes: > (pcase-let ((`(,
 default-directory) '( "/tmp/")))
 > (call-interactively 'find-file)) > > Expected behavior: Find file in "/tmp/"
 > Observed behavior: Find file in "~" AFAICT the issue here is that
 `pcase-let'
 always creates lexically scoped bindings, even for special variables. That
 can be surprising. 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: qq.com]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (michael_heerdegen[at]web.de)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [212.227.15.3 listed in wl.mailspike.net]
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [212.227.15.3 listed in list.dnswl.org]
 2.0 PDS_TONAME_EQ_TOLOCAL_SHORT Short body with To: name matches
 everything in local email
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

jixiuf <jixiuf@HIDDEN> writes:

> (pcase-let ((`(,default-directory) '( "/tmp/")))
>     (call-interactively 'find-file))
>
> Expected behavior: Find file in "/tmp/"
> Observed behavior: Find file in "~"

AFAICT the issue here is that `pcase-let' always creates lexically
scoped bindings, even for special variables.  That can be surprising.

@Stefan, what can we do?  Document better?  Add compiler warnings?  Or
is it possible to "fix" this?

Regards,

Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 15:42:02 +0000
Resent-Message-ID: <handler.45619.B45619.16097748935153 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>
Cc: 45619 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.16097748935153
          (code B ref 45619); Mon, 04 Jan 2021 15:42:02 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 15:41:33 +0000
Received: from localhost ([127.0.0.1]:59992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwRzA-0001L2-R4
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 10:41:33 -0500
Received: from aserp2130.oracle.com ([141.146.126.79]:52402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1kwRz9-0001Kp-EK
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 10:41:32 -0500
Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1])
 by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 104FSpT7070923;
 Mon, 4 Jan 2021 15:41:25 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=rJZLpFOsBXW6E+sUasE63ZNv6yAbhDf1O63M68rDfgc=;
 b=d7ZwfteKIIFoebfx8tP6Pt51A3VjiHC9urLil2kTIaM5P2JSjEk3QVmZWw6YaTplVoRj
 T0X8egM6XvPz/P3e3jf2ex139H9pSwb67oH5FiQ2h0oaIMODvqdibXijpbQxfNhufP2I
 pRyeUsNnuBMIlzEDKOE49O07pCLWVRig+CNQY+fGhikfDv0aPp2r/I/0gqpdleXTsafT
 z0HI30kJ7Yw02xxw/YD8if103fHUXol0rHxkL1tEnPwRxGXlGOpdc7pkgxl6FTjCtAcF
 6xXZg6Ch+aDHcPcNKlMOEgAQ+mviUbruwTMl/MGHMzvDvlfp2qZKjSyvqBz97gb49IpO fw== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by aserp2130.oracle.com with ESMTP id 35tebamwqb-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Mon, 04 Jan 2021 15:41:25 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 104FUh5k161387;
 Mon, 4 Jan 2021 15:41:25 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserp3020.oracle.com with ESMTP id 35v1f7h0jt-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 04 Jan 2021 15:41:24 +0000
Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 104FfKtO018334;
 Mon, 4 Jan 2021 15:41:20 GMT
MIME-Version: 1.0
Message-ID: <b2285859-030c-4f84-98ae-15df7b8c960c@default>
Date: Mon, 4 Jan 2021 15:41:19 +0000 (UTC)
From: Drew Adams <drew.adams@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN>
In-Reply-To: <877dos50su.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5095.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9854
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999
 phishscore=0
 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 mlxscore=0
 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2101040101
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9854
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 phishscore=0
 priorityscore=1501 spamscore=0 mlxscore=0 clxscore=1011 bulkscore=0
 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2009150000 definitions=main-2101040101
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > (pcase-let ((`(,default-directory) '( "/tmp/")))
> >     (call-interactively 'find-file))
> >
> > Expected behavior: Find file in "/tmp/"
> > Observed behavior: Find file in "~"
>=20
> AFAICT the issue here is that `pcase-let' always creates lexically
> scoped bindings, even for special variables.  That can be surprising.
>=20
> @Stefan, what can we do?  Document better?  Add compiler warnings?  Or
> is it possible to "fix" this?

Please do at least document it (along with the reason for it perhaps?).

What is the reason for it, BTW?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 17:39:01 +0000
Resent-Message-ID: <handler.45619.B45619.160978193316811 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160978193316811
          (code B ref 45619); Mon, 04 Jan 2021 17:39:01 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 17:38:53 +0000
Received: from localhost ([127.0.0.1]:60185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwToj-0004N3-H1
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 12:38:53 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17072)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1kwToi-0004Mr-As
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 12:38:52 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6F5944409FF;
 Mon,  4 Jan 2021 12:38:46 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2EFD344091A;
 Mon,  4 Jan 2021 12:38:45 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1609781925;
 bh=sT/XNTeWcreHTFskOTkeGOq0Zmkn7H3FZDpelf1K6b0=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=aUd7MtLubH6lXt641djs8qpL2rrwyZoHwc9z97yIKKw1syKfjkI1ZJHq8HvbQmPXm
 /SZkqwEjrhPnsN5usRx1BmFwxWKVodG743lJ4Ya3ih7mTqPfvmA+rk4FMOnrgciVIr
 mzp6AHNnW7wenJILJeGndalQwdvMK93pnjle/DN68Zs1jtPnZwd/ds1UyMER4j9EeN
 NrSFodgf0VWijU5VOQEV3nf3x83SykOskv2QIrFk+az2veT0bu8OKiOvCLEB39/0p1
 H3NQ2CMzfAPyweaHUAber0mbMA4mC8HBsgyqBi8zJf2TJa2tyBwzuTjNefiS/NUO2Y
 PUq3OAO2o8ZKw==
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 28321120205;
 Mon,  4 Jan 2021 12:38:45 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN>
Date: Mon, 04 Jan 2021 12:41:26 -0500
In-Reply-To: <877dos50su.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 04
 Jan 2021 13:44:33 +0100")
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.872 Adjusted score from AWL reputation of From: address
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> AFAICT the issue here is that `pcase-let' always creates lexically
> scoped bindings, even for special variables.  That can be surprising.

It's messier than that: the issue is that it doesn't bind variables
which aren't used lexically (this is needed to avoid spurious warnings
about unused vars when the var is used in on place but not in another).

> @Stefan, what can we do?  Document better?  Add compiler warnings?  Or
> is it possible to "fix" this?

We could try and make `pcase` more aware of dyn-scoped vars and have it
refrain from optimizing away "unused" dyn-scoped vars, but maybe it's
better to document it (and maybe even add a warning when a dyn-scoped
var is bound by `pcase`, like we already have for dyn-scoped vars bound
as function arguments).


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 19:52:01 +0000
Resent-Message-ID: <handler.45619.B45619.160978987113657 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160978987113657
          (code B ref 45619); Mon, 04 Jan 2021 19:52:01 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 19:51:11 +0000
Received: from localhost ([127.0.0.1]:60359 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwVsl-0003YD-7b
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 14:51:11 -0500
Received: from mout.web.de ([212.227.15.14]:36931)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kwVsj-0003Xz-J1
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 14:51:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1609789855;
 bh=tD0XQ9vD0pJ3QxBAkmphWmThhKzhgMiKlrAzm81wTJ0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=aF4BP2P6mTg4Say4IWlO+xd4I+3QCjnRh0jZCaGRnQrIy/t6UChXQOWfogvPGu8XG
 uN2i6dFtlrw1Z3Kn7+prLemwgf7WqGjwxKHKrBJyqb6Rr6AxkgxG++QdAkksTR+r/b
 1jm6LJ9UPUw7Q4v8sFsxZLj1MtyWs1DvmtJpEMhU=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.99.46]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M7ux4-1krY3p2sU6-005Jvq; Mon, 04
 Jan 2021 20:50:55 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
Date: Mon, 04 Jan 2021 20:50:54 +0100
In-Reply-To: <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 04 Jan 2021 12:41:26 -0500")
Message-ID: <8735zg4h29.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:1tAMD3K5OOxRFKi1OsXaiKuY7aibo4l74J7F8oaAXAyNaEUajNl
 wBZDJ7FqlBCr/qt+fTHu/Ze9kiIntckDWQmkvmOgbgwMor1vGzljPGMV6DHiVyddgznGuSR
 96OcXqKAzdO4nsVVDc998RNledUUNOnGVYIvVTaDqEbDTgDw6wnaEGGb2oqz0Lp+R/oX0Av
 DT2jIEwe0Cj6M7A0bf01w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:dJcZYGSoSzY=:zylyObpRCR+mY7pI/oecZJ
 rUxDrpHNneDi+ilZd08WzYVObquLiHhX7iPFjtmbHno6zZYVUbS1rltIbaQMADsNT63QoV4M8
 wAntRpmEw/su4hhsSekBRPH9L/ZBPQtd9U5/baoFCuTavPs0J8scQdIK9A9OWHr8saqcAr36D
 SGQGhA1hB20uZsFbNo1q8UPBAzE4iPhRPoQrMRdG8ZGwvye6RaW4GGxw+54IzrlLLqdpqSl39
 6G4+VZ+eBeaao+lszn7BlMZQVgmRRBujnDmUS61UzX2sq3dlw/vysgzEJTVqn5wQv8Xrq9HYE
 6n4wslYjJASYiPjmPqyyOI09wOi907Iz0/0JBgtb1MggMDK+PUqo5QYoCG+KNAR+R9k4y1eYO
 /hT6NUBUcLOY/Amt6oKkOBtR0LJt5xRqHEzrxgjeeYFCR1CV3ydd+plgYj59qqZNhYcO0H7yO
 7AgLiW0WatwhTQZBl1717gOGKV9nv4RtITntM6zX2rISGkHMGji1MWykIV816RQK64O3hYYhO
 mZ++WZbOMythR0PMaNTKigHEdEu4RRK5X6mezS5E/PoP0ZsqpyzjBcxssdWAaysEPpFuFZzT5
 CAzDGGZoRWZCLCioT0fHdZJhinLJISsJBRniwk26bd0MI2C/D1BZV2OwawMNk76Vr0egbyU4z
 Zh7ROdUGMQZ7haHK7jFxQhKx8MuEB5F1x9Y4ivl9zSoDOCEzVW0lJ06cTug+mxBckYL+tGwu+
 mEmpQpmw/n9mXf3xpPIUFq/wm6EGN94VtV8FL+poHe6/synKTxmBxFhKrrfRCwrGOGhlXMmqc
 pjavhi2siq7MWhYd5ET/Ee3SJD2aTyRaCzBNxRP42iGFWf2injMLyE5N8o3gI9lcn6R57Vzra
 ryWUdCxchqALuiIPYRlcso7Jau/uTAb2PMdV8RSrQ=
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> It's messier than that: the issue is that it doesn't bind variables
> which aren't used lexically (this is needed to avoid spurious warnings
> about unused vars when the var is used in on place but not in
> another).

Ok, so this "works":

(pcase-let ((`(,default-directory) '("/tmp/")))
  (ignore default-directory)
  (call-interactively 'find-file))

and also this:

(pcase-let ((default-directory "/tmp/"))
  (call-interactively 'find-file))

I wonder what is messier: the warnings or the semantics resulting from
avoiding the warnings.  I guess people would more often complain about
the warnings...

Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 20:39:01 +0000
Resent-Message-ID: <handler.45619.B45619.160979268918023 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160979268918023
          (code B ref 45619); Mon, 04 Jan 2021 20:39:01 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 20:38:09 +0000
Received: from localhost ([127.0.0.1]:60418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwWcD-0004gc-2l
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 15:38:09 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47202)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1kwWcB-0004fz-KU
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 15:38:08 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D7ED444108E;
 Mon,  4 Jan 2021 15:38:01 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A7E82440F44;
 Mon,  4 Jan 2021 15:38:00 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1609792680;
 bh=btZvEZmyE/HXN5W/IB6YyYG7MKyaqNEvX9KOzzosWGs=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=SiqT3yc4aAXxRaBpomuhFxuMowL+D9oGDUscT7muTmyQDI4k36VIlQLtJNjqPj9d/
 TPup2ZJPAjPNiiSTEJpDYCVDvXih9XYIpPOUqLz6LEZz96OxVBW4bm2r64QwVTBZe7
 +Qldt/npcX0oGq6l58JErFxlyEJ4nLebEiJ67xGxZKnfspp/HwosR44IHahCU4E4nZ
 WZ8Unt39ZXintLwj3I7bdiw+M7D2TQqsu0B6KOXTkC8RCwuy9UUsqttzhy2WCG9G1f
 ZkBwf3Z64Sbw6MV+Ig/6RlyCoRNoceKQW/iC6+aAC/J54JuACYKPk/tllditLxECgk
 vJ+V/8iAg3JJw==
Received: from alfajor (unknown [104.247.243.191])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3AE8A12050E;
 Mon,  4 Jan 2021 15:38:00 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvwnws1lvf.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <8735zg4h29.fsf@HIDDEN>
Date: Mon, 04 Jan 2021 15:37:59 -0500
In-Reply-To: <8735zg4h29.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 04
 Jan 2021 20:50:54 +0100")
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.826 Adjusted score from AWL reputation of From: address
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> (pcase-let ((default-directory "/tmp/"))
>   (call-interactively 'find-file))
>
> I wonder what is messier: the warnings or the semantics resulting from
> avoiding the warnings.  I guess people would more often complain about
> the warnings...

I think the cleaner semantics is to say that if variables bound by pcase
are dynamically scoped the behavior is "undefined", and to add
a check&warning about it in pcase (the problem with the old "unused
var" warning is that it was cumbersome to avoid it, whereas this new
warning would be easy to avoid by moving the binding to a separate
`let`).


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 04 Jan 2021 22:10:02 +0000
Resent-Message-ID: <handler.45619.B45619.160979815728794 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160979815728794
          (code B ref 45619); Mon, 04 Jan 2021 22:10:02 +0000
Received: (at 45619) by debbugs.gnu.org; 4 Jan 2021 22:09:17 +0000
Received: from localhost ([127.0.0.1]:60475 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwY2O-0007UL-Pr
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 17:09:17 -0500
Received: from mout.web.de ([217.72.192.78]:36259)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kwY2M-0007U8-Sy
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 17:09:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1609798140;
 bh=uFsmLmuacIBAYyWo6+yuwBRZrNyyJoQX+jLfU+Gn6d8=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=h1Wuych/ZLFw03QcjY6R+XsgKGwQtLrU5KwhB62htT4bWlCGe/cZl4RlLk08St9pm
 frSOnKRY+g/qedd76u8aKm+beKCwhwgmnzHhDXJfVl0Sb8JDwTisCd/cuxx26N8HKZ
 DUAdAVIGmQYotDQUG36QjZhwBjDFak2twQUTPxfA=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.99.46]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MUW7T-1kVQcx1wlX-00RKGt; Mon, 04
 Jan 2021 23:09:00 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
Date: Mon, 04 Jan 2021 23:08:59 +0100
In-Reply-To: <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 04 Jan 2021 12:41:26 -0500")
Message-ID: <87wnws2w3o.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:by9xenLCXwIeS/8wnXu0T6kqNFUXCFMhF7oEhbeBsvDw7Jul1BH
 kZ1HLrW8f0zS4PO4JjWCRPiYAqZEXzfxVaDU//pNpgLq2rZxY1QCnOeONIjXzrwgoZf92CZ
 fdEupebTh4rxM5qRK/e6f5lXRd8ZxPIbIP81RIbtJKrpAGNrb83r9TrEdGRFeRCOfH2IEf3
 apgV1VGVUgcw9MucRjErg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:x08zz2a5ZWc=:tE07XOHy3lStE47b7h5hGs
 pXdbC9C73JpS/3vODNhp8+4rnVaQkwKMx5zq2v35G0HEG2+eefmriokYczxuxi4ZxNetWljyd
 eXLYTMckAbm6tg6S9T8UDhuyjBkG4om9YC9Hs7R5jIENw3Es9uRAgQzrtBz1WlhltBkNisdL8
 P66k/S0XF3ZSG9WWQXaEper4yQc4SOdAAbDDavkVYSW70NRwo4zVMlyHNhpN0gY1SzP9JO8E/
 uIJbOUNOCIc+mdYcwiQUaccHSmQ9pne2hHE11Lt53jbMXmbboqb4CHjZzVG0E9XI2zH4Stfry
 Uv6R7Dj2oCSZiula8m4Fx07XKw4NqP2NVYGvRMWAusNwQKpIDDSGxmq4zLGF4JvdW325lRrO3
 uHEq4Y7DLkbLm5U643trAJbI5qvp9Sxcg/pDqPPUoMlFQTsGioffbWAlKC/iMTWCzMA53dKA5
 j9smcVzcLTZyvh8WuPNQ+sEqMzWD+flMjbXjabj2KbFvAH99aIl/VOAz5YXCBjII4NgdpTBKm
 FWPKjhgg7RWKRNTpYn9hXA8a9t0A1zs2yrYshyTeG8QlGwi4buAootyt0GxdpAVvADfmNBuey
 7+StL9RFc5m+DusM/q9589E2PA+mz7ZrrS2Rx7YOEAL8VIjywFuB43XP05PjpnsyY8aEPm9Lu
 UfSDaQypQBKvzOhRscjrBh3lSBkZwG7VUhdxaoafHOC96sya6Dp1o7fP6bdYh2jScWR3e6M58
 JrCmjYYhNJn2veitSeB/aIeN9hjWENqpMBaYBe+A4ZDpuXLoQU1bF+VhPhBbtXcXy85C+LHhu
 UKq3jyJPA96uWIpaZsfABLYyIUApBXpiTtyp/sL4tr7Tmju7MVutbCj479PuiJ+mGsFl3VJsg
 Xu3lEJWaSj/cAZqpfWycMAijgIz22WL8y4BQq2KWA=
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> It's messier than that: the issue is that it doesn't bind variables
> which aren't used lexically (this is needed to avoid spurious warnings
> about unused vars when the var is used in on place but not in another).

BTW, a similar issue (pitfall) I faced was that I sometimes expect that
when a variable is already bound, already the first appearance of the
symbol would be turned into an equality test.

I wonder if pcase variable bindings could be hygienic in the sense that
they would use fresh symbols internally.  That would maybe make the
semantics clearer.

Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 05 Jan 2021 02:07:01 +0000
Resent-Message-ID: <handler.45619.B45619.160981240119086 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.160981240119086
          (code B ref 45619); Tue, 05 Jan 2021 02:07:01 +0000
Received: (at 45619) by debbugs.gnu.org; 5 Jan 2021 02:06:41 +0000
Received: from localhost ([127.0.0.1]:60697 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kwbk9-0004xm-4L
	for submit <at> debbugs.gnu.org; Mon, 04 Jan 2021 21:06:41 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1kwbk7-0004xX-9t
 for 45619 <at> debbugs.gnu.org; Mon, 04 Jan 2021 21:06:39 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A9C35440B7A;
 Mon,  4 Jan 2021 21:06:33 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3DCDA440B3F;
 Mon,  4 Jan 2021 21:06:28 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1609812388;
 bh=QMQ48ond9ROYMOfBtrALnvlUK8pp7m3ZsOHjWVBAAas=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=I4m7qC3n5F2Vasp0qJ8UkgzSqoiYukK0gcSrIooicbhrKv3P6fAh66o6fiEI/nCzq
 6sAGxFZSkN55OjiM8keP4SRmAwnHzfA/+N2Bn4Z7KpP0BYMJPVrMwXeQEapDxOjjQK
 6X3Sgsfbgqzq+jxfFC8yLPNLDVQtRjCCteo4x4CnGUgZouChHqro7pS25JV67SAIGH
 ln2BnlndgRVgEfwLBqJY1nSs66o2Tib6fw2d98Pd9OqbEEJQykc6tjdQKQiLr7Qu7o
 ItWwDCUk5ppljHfmGkwwzkRdNA7r94I7hlIFZhQsMByIMQ0vYiQEdUzekYZYxVu0To
 QTV7WCHIoeWTQ==
Received: from alfajor (unknown [104.247.243.191])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 01B8D1202FF;
 Mon,  4 Jan 2021 21:06:27 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <87wnws2w3o.fsf@HIDDEN>
Date: Mon, 04 Jan 2021 21:06:27 -0500
In-Reply-To: <87wnws2w3o.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 04
 Jan 2021 23:08:59 +0100")
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.821 Adjusted score from AWL reputation of From: address
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> It's messier than that: the issue is that it doesn't bind variables
>> which aren't used lexically (this is needed to avoid spurious warnings
>> about unused vars when the var is used in on place but not in another).
> BTW, a similar issue (pitfall) I faced was that I sometimes expect that
> when a variable is already bound, already the first appearance of the
> symbol would be turned into an equality test.

Hmm... so-called "non-linear patterns".  We should emit a warning when the
same var is used twice in a pattern, indeed, to avoid surprises.

We could also do as you describe but I'm not completely sure it's a good
idea (it begs questions about which equality test to use and when it
should be tested).

> I wonder if pcase variable bindings could be hygienic in the sense that
> they would use fresh symbols internally.  That would maybe make the
> semantics clearer.

I don't know what you mean by that.  Can you clarify?


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 07 Jan 2021 11:39:02 +0000
Resent-Message-ID: <handler.45619.B45619.161001951231258 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.161001951231258
          (code B ref 45619); Thu, 07 Jan 2021 11:39:02 +0000
Received: (at 45619) by debbugs.gnu.org; 7 Jan 2021 11:38:32 +0000
Received: from localhost ([127.0.0.1]:46685 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxTcd-000885-Pn
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 06:38:32 -0500
Received: from mout.web.de ([212.227.17.11]:38387)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kxTcb-00087o-Cf
 for 45619 <at> debbugs.gnu.org; Thu, 07 Jan 2021 06:38:29 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1610019495;
 bh=0ptSGgDD7l5/CbwDesYDnMuDlWUN0bqPSFtCpa5KPL0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=NAdnhPutyNxy4lYDkYqzrLF7BhP9Zp7qE2Khhn36j6/3lQmw9WPJzekeqiteWeWiw
 WIi0uZ3im+dIOjk1WuJQPExsSFH7ZvYVEUnc/nsxJaoggghB+JNbxp0+oe3YshW34/
 gjlwKKNV+UESpmzbktf1bHN9p6JCxzRyr/kX4teM=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.99.46]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LlWCR-1kMlkm0h7f-00bGXI; Thu, 07
 Jan 2021 12:38:15 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <87wnws2w3o.fsf@HIDDEN> <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN>
Date: Thu, 07 Jan 2021 12:38:12 +0100
In-Reply-To: <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 04 Jan 2021 21:06:27 -0500")
Message-ID: <87v9c99duj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:gDyiI9AgF/fZPNuKvJoKzhfZXsL/tBy66yQ/Uu8pYARULZ4Nu8W
 UJ67zqdy6AZ5DNwxw6Bvt6NLJ8mB8BjBNNeoiG7tdwj+7kCr62BX1WfzuLD4jF/0j9FEsVt
 x/0n6RGODA7WFZQKlKdJG6+KQ1RxOfjs//6WLldSsqDAD7egeIYwk/1/nlaejoOcX1z1ARq
 Q+eT/Ah2krbX+uuwX5R4g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:9RRv564jUh8=:K0xVFxpdRiYeW8pwjpQ8Rf
 ee3K4D4h/nhr8D3gmQygK0D4nWIwnxdmM3RvwBzaBoySs9mPw1WF9hZZRVz7pAmqwDSo86e3k
 vXSvWUHi5J2o/bwBu/OjCyrjfeVTiT1fqi3wlwlpRhdeo5jvS7j5k9UUItozlKonAF9/XoUQY
 TA7D+GuIAuMUGI/91pg4/O53K7QZekA/jaKiuwuhqUwwGQaBADIALvUoTQr1MJaxLPwy2KxqU
 miwUyZGZuu+T2pGCw9pHnHLKxhhXMII1ME+XrdiV6/qyfHNgS/pAcNMpanPXd9Y05MH90K9QP
 JvbD0oR8jtPFmJQ51q1T1/q1qHz9eyJhIBpjjFKcdU2Ziuw05+5xBp5fmhiLdJae8bCe+hzx/
 bcWjVnRJl9SyczHRLIsqBjc+TQXpy2r/4SyavlzsmcHl+ShZ+GKfusbwVz7hmnZ0ANemn12lw
 kdZBYh/eUMdJ0jND22EJqjEmTemTFT3G8KGkXDVOBtgku/gDPv8vs2GVWKorHsIMWhOXcH8YC
 g77S69s62DCY2yHDozVEgQTmJ7lzWyOKq79iONhdq7WIRnUItSs8+pVMuEJ5XwJhgtM6taLbv
 b3F33m0MjNJqRTZ023aCQDZQ6+s+K/7Wh92SHLBzogkYE/bWxBrLtY3owdafY8ChJRgy9a7ak
 C32pezn8iXFtX0iw8930Whmit8rwaGHZ3iGYfIc+P1zX0AIuCTvUTQhnlqIwstDZTQSucEhLI
 bqGBF3pLr47q6No4IVvFMsbqhIFuC3dLLURHzEQuyeL4c0N8BgVfdSi1bELiHeMPYm1BK9NEx
 2t1t4gl7X7H0DGAemQpHV86SMBMwJ3eXCbDKOguX3wTMal9bD2rAkacqiNI0S8IkdhHOMzN7k
 bk48SkkSAWxVFMRi8r5A==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> Hmm... so-called "non-linear patterns".  We should emit a warning when the
> same var is used twice in a pattern, indeed, to avoid surprises.

Not sure if we speak about the same case.  I spoke about this: I caught
myself trying something like that:

(defvar thing-tag 'a-thing)

(let ((my-thing (cons thing-tag '(thing-contents...))))
  (pcase my-thing
    (`(,thing-tag . ,contents) (do-something-with contents))))

> I don't know what you mean by that.  Can you clarify?

Something diametral to my previous suggestion, I don't know if it would
be appropriate: You know scheme syntax rules and it's concept of
hygiene?  Similarly in `pcase' we could silently transform any
appearance of a SYMBOL with a fresh uninterned symbol.  While that would
not change the behavior for the common use cases, it would be clear that
bindings created by pcase would never interfere in any way with already
existing bindings of any kind.

The advantage would be clearer semantics.  The disadvantage would
be that we would limit the binding capabilities of pcase.

Being able to change the binding of a special variable sounds nice, but
I think that could also happen by accident, right?

Regards,

Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 07 Jan 2021 15:20:02 +0000
Resent-Message-ID: <handler.45619.B45619.161003279729894 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.161003279729894
          (code B ref 45619); Thu, 07 Jan 2021 15:20:02 +0000
Received: (at 45619) by debbugs.gnu.org; 7 Jan 2021 15:19:57 +0000
Received: from localhost ([127.0.0.1]:48326 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxX4v-0007m5-9l
	for submit <at> debbugs.gnu.org; Thu, 07 Jan 2021 10:19:57 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31406)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1kxX4t-0007ls-Hy
 for 45619 <at> debbugs.gnu.org; Thu, 07 Jan 2021 10:19:55 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0E208808C6;
 Thu,  7 Jan 2021 10:19:50 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5FFFF8009B;
 Thu,  7 Jan 2021 10:19:47 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1610032787;
 bh=qBRxBSS1d0YwZQqwTjq7mpcBi8FBTZukdgmJ8OJ1AM8=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=UUF9WsVQuMQ3zd8VMJnYlpZg/4TmxdfuloF68WekiPFmBHCUGSez6NXy2HYo8/LBz
 g54cMMPJyFxzAeTSrOBzdhCdeEOIJr6pLyaqn3M8d2K8a/b6g/B808z9TNRXHOtufC
 a3rDQdAupVYKwlkZo9HfjBMp97f4rOatcy2V1i213p4ie7S+YJQ/azJ2+mm1/vCt84
 qHHhvTeTfDYv6/prT5G3nYOz7eIF9dzq5P9iFgYdhYMR330ZtYKTmOFEOOASDyCZK7
 gHgQgheHBBFlw/vJANaUfCt4V3QWf2DapO9LJgCJNtxAsoxYRQF2N2DRqPzWiQpLOP
 zAa0PAJEitoNg==
Received: from alfajor (unknown [45.72.224.181])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 29430120169;
 Thu,  7 Jan 2021 10:19:47 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwveeiwpypx.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <87wnws2w3o.fsf@HIDDEN> <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN>
 <87v9c99duj.fsf@HIDDEN>
Date: Thu, 07 Jan 2021 10:19:46 -0500
In-Reply-To: <87v9c99duj.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 07
 Jan 2021 12:38:12 +0100")
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.078 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Hmm... so-called "non-linear patterns".  We should emit a warning when the
>> same var is used twice in a pattern, indeed, to avoid surprises.
>
> Not sure if we speak about the same case.  I spoke about this: I caught
> myself trying something like that:
>
> (defvar thing-tag 'a-thing)
>
> (let ((my-thing (cons thing-tag '(thing-contents...))))
>   (pcase my-thing
>     (`(,thing-tag . ,contents) (do-something-with contents))))

Ah, indeed it's not the same thing as non-linear patterns.

An example of a non-linear pattern could be:

    (pcase foo
      (`(,a . ,a)
       (message "foo is a pair with car equal to cdr"))
      ...)

For your use case, you can write:

      (pcase my-thing
        (`(,(pred (equal thing-tag)) . ,contents) (do-something-with contents))))

> Something diametral to my previous suggestion, I don't know if it would
> be appropriate: You know scheme syntax rules and it's concept of
> hygiene?  Similarly in `pcase' we could silently transform any
> appearance of a SYMBOL with a fresh uninterned symbol.  While that would
> not change the behavior for the common use cases, it would be clear that
> bindings created by pcase would never interfere in any way with already
> existing bindings of any kind.

I know about macro hygiene, but what you describe is a mechanism
to get a particular semantics (a form a hygiene, typically), but I don't
understand what semantics you're trying to get.

Could you give some examples of problems you'd like to avoid this way?

> Being able to change the binding of a special variable sounds nice, but
> I think that could also happen by accident, right?

As I said, I think we should declare this is unsupported and try to emit
a warning what we detect such a thing (tho we should still support
corner cases like

    (pcase-let
        (((,foo . ,bar) (blabla))
         (default-directory (blibli)))
      ...)


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 08 Jan 2021 20:06:01 +0000
Resent-Message-ID: <handler.45619.B45619.161013635427284 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.161013635427284
          (code B ref 45619); Fri, 08 Jan 2021 20:06:01 +0000
Received: (at 45619) by debbugs.gnu.org; 8 Jan 2021 20:05:54 +0000
Received: from localhost ([127.0.0.1]:50751 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kxy1C-000760-7o
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 15:05:54 -0500
Received: from mout.web.de ([217.72.192.78]:52657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kxy19-00075l-5y
 for 45619 <at> debbugs.gnu.org; Fri, 08 Jan 2021 15:05:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1610136334;
 bh=CWD3hPGgv6EB5PciuMbwtExTDgdjSbG7Eryl9CLBu4c=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=gzfwFs9l3qrDS6bXBM+9VKawELXWe6eeBcJqP40WAjtgfGk9UpCguw/CEGcYEfHAr
 UVAXtYTL+FSoMVloGvXl2S/Fl6iVeDM2Zqo6bj3PepTaH2aEP4qLfVWbbkWa/1e54x
 McHd+Crl9LOr5h+7E3K1OKEJkw1KaVrMcJmnaAj0=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.67.99.46]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M28WJ-1kw24N21fd-002gF1; Fri, 08
 Jan 2021 21:05:34 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <87wnws2w3o.fsf@HIDDEN> <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN>
 <87v9c99duj.fsf@HIDDEN> <jwveeiwpypx.fsf-monnier+emacs@HIDDEN>
Date: Fri, 08 Jan 2021 21:05:33 +0100
In-Reply-To: <jwveeiwpypx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 07 Jan 2021 10:19:46 -0500")
Message-ID: <878s936voy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:BlqsmJ34eC+BIaKLcVDxV7iWNku0jpLb1VoUbxmnpdN3YXj86RG
 tLDeWoptFlEodKb6i9AQFbz4gP2cd9XykrfmMfRAjg0QrYbzF0Qf9CYO2Kglo8QrYTtQEU7
 N9PfS+MsgTr5BJNn1Bjm8P4EDxZzCC4gY7sDBUI381YhZ+Td+wF05MqAyYhocF0LclHY7eL
 EpPbIyM7l7JcakTQgBTHA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:W48l0ri3wHQ=:/u+jl3SnLXrzZl+3KfA5nh
 nJoqQm44KiiGUE4bD/pJpgF8ApedaHeDBtFJaIzxJBcyhn+reOEvq6lYdEIe13INsSAj/Jb7q
 bQWDiIyz9/AIhE6Xt30iEJOgEL4YVsoEYejcCIS+VBRBdJe70DpBJx17Y/Us00cuAxgI9kCHv
 U+BICje57phohqw/8TdH5+NZCs7j87gW7LzYtMAnuii6SJx2bTR1ydCs3NqDB1bMxu0hPiU8F
 o5B9NnQT229bXwjICdlwBpM2gHfWG9hrnuuBMfgkQgfOZoXgYzQjyteani09VoMSChZvr0JC1
 I5uX9XaIBiIp1r/EJddP1fGtwdxrxpk/YWke/cXNs84NHO88GAAzGh9raCoU08+aVJtDA+NCH
 N6Lwrp7F4yOgjreNmqYEPNRGYknAOc1v6XHugXwjWMmpo1nWHiNO0m49ZWvw2VJkcKa6eqiBo
 WspdFZ+DxWY3l0r1b55sez6jiw7d3aEpfALPoziqHpc3Vz8BNj6NNgdkiE9xdT3JfY0oS7ROr
 KYK8kKMMYYxYw8yoGPTqTDr9CuDOdYG3VQ+izJp1E84GInLGfTk9A77nXAfdLARDYggmNBdWh
 WBOu6KMterrQL0SQi/ZJRYFC/ophhGMW6WRSQ4NBA5t/J0N3ECrLDMoFrvjLjvBtoTlV8dJzB
 Gp/HV3D90ttx7J03Z7G9pHfmFR17B5cLiQa3MdKAGDOiyCnuC1MrIPwjPw3bFWpUSfRNyhC3/
 scE/KXOGvXnVbK6+S885IMhw76v+FnExUon+cxok7aN13lpBiEg+5FK9IdIYzIv3TUtABCOGs
 plDkTxtRp3PCyJKaCvesQRjyLFmUbhN7VHT12k4fwBZbkzkLEUGiiXbiFbcrWyAKW9izpwgAR
 W6FPE+jfVFp1cGhWKsCg5dIKWsKKAHLEV7aC/44KY=
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> An example of a non-linear pattern could be:
>
>     (pcase foo
>       (`(,a . ,a)
>        (message "foo is a pair with car equal to cdr"))
>       ...)

Yes, I sometimes need this for el-searches.

> Could you give some examples of problems you'd like to avoid this way?

I wondered what happens when a pcase form binds a symbol S that is not
defined at compile time (normal case) but then a user loads a package
that declares S as (globally) special.  Then that pcase binding gets
dynamical scope at runtime (as it would happen with any `let' binding),
right?  Sorry if this is silly or trivial, I was just wondering...


Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 08 Jan 2021 22:14:02 +0000
Resent-Message-ID: <handler.45619.B45619.161014400822532 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.161014400822532
          (code B ref 45619); Fri, 08 Jan 2021 22:14:02 +0000
Received: (at 45619) by debbugs.gnu.org; 8 Jan 2021 22:13:28 +0000
Received: from localhost ([127.0.0.1]:50852 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ky00e-0005rM-8n
	for submit <at> debbugs.gnu.org; Fri, 08 Jan 2021 17:13:28 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1ky00c-0005r9-PH
 for 45619 <at> debbugs.gnu.org; Fri, 08 Jan 2021 17:13:27 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2B9AB441357;
 Fri,  8 Jan 2021 17:13:21 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BE35A440436;
 Fri,  8 Jan 2021 17:13:19 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1610143999;
 bh=A1uDolcCOs5CsdB0CwTD8U9aNv+Yd6Qm0WFmqzYFBWU=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=WDbNxUZsqDcMOXhanASUuFT55Xzaez/pcACvtVai8zlMKxAEk8ERhjjOGZzCeVvPx
 6LWYB3nGyEDu/ooJZueKaonhk/p3rTzbocpZefzVuTL5NJXXjcle8g6XZZd7LQHHQT
 UKpYx7YTYGdDsrn4kN5elPcYbOdhpFOrNLdofM1rUsM6wpgs3M8qHfdnbuweo2ahGQ
 eAmF79eq1NOHCtW51a8xVCfWF02BXgBRo+wikpGK0e1jtoN18IgAVFwuyP5XDLNek2
 DWtFPeMe3J37wS8X9O/Op3iQXRVbW8n/Kz7HOarkyeMfBbOvgIWoGSKVVbt55zfwU/
 RjvVM6CT7nMyw==
Received: from alfajor (unknown [45.72.224.181])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 85239120230;
 Fri,  8 Jan 2021 17:13:19 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwv1revgjtm.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <jwvft3gtxfb.fsf-monnier+emacs@HIDDEN>
 <87wnws2w3o.fsf@HIDDEN> <jwv4kjw16nf.fsf-monnier+emacs@HIDDEN>
 <87v9c99duj.fsf@HIDDEN> <jwveeiwpypx.fsf-monnier+emacs@HIDDEN>
 <878s936voy.fsf@HIDDEN>
Date: Fri, 08 Jan 2021 17:13:18 -0500
In-Reply-To: <878s936voy.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 08
 Jan 2021 21:05:33 +0100")
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.040 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I wondered what happens when a pcase form binds a symbol S that is not
> defined at compile time (normal case) but then a user loads a package
> that declares S as (globally) special.  Then that pcase binding gets
> dynamical scope at runtime (as it would happen with any `let' binding),
> right?  Sorry if this is silly or trivial, I was just wondering...

This is a much more general problem which affects all variable bindings
rather than only those of `pcase`.
Note that the choice between dynamic and lexical scoping is made at
compile-time (when you compile the code), so if the code is compiled you
should be somewhat immune to the problem.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 07:47:01 +0000
Resent-Message-ID: <handler.45619.B45619.164465197832196 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164465197832196
          (code B ref 45619); Sat, 12 Feb 2022 07:47:01 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 07:46:18 +0000
Received: from localhost ([127.0.0.1]:33309 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nIn6n-0008Mx-IE
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 02:46:17 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39456)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nIn6m-0008HE-Bx
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 02:46:16 -0500
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=FlvK8GEKLNuLzuyh1yehUXOuOsPaxlClk802TULJav8=; b=S/Cl12Mi2hmyvlcxbsh25NbKym
 VPOWhdKmQvcLxYc4GfieUmt4FvpLUVssw7xggXkFLXQlaYumdFQYe/qnPEGDLXQ4kTBiY9WuIypaR
 Jn0LK0NTSf3RDIYKbBebkeiet35DaabankwC2nQzeEAIdbgL0yJTUXEZImXxA96CKMbo=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nIn6c-0004wL-4C; Sat, 12 Feb 2022 08:46:09 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN>
X-Now-Playing: CCCP's _The World_: "American Soviets"
Date: Sat, 12 Feb 2022 08:46:02 +0100
In-Reply-To: <877dos50su.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 04
 Jan 2021 13:44:33 +0100")
Message-ID: <87k0e04jet.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >>
 (pcase-let
 ((`(,default-directory) '( "/tmp/"))) >> (call-interactively 'find-file))
 >> >> Expected behavior: Find file in "/tmp/" >> Observed behavior: Find
 file in "~" > > AFAICT the issue here i [...] 
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

>> (pcase-let ((`(,default-directory) '( "/tmp/")))
>>     (call-interactively 'find-file))
>>
>> Expected behavior: Find file in "/tmp/"
>> Observed behavior: Find file in "~"
>
> AFAICT the issue here is that `pcase-let' always creates lexically
> scoped bindings, even for special variables.  That can be surprising.
>
> @Stefan, what can we do?  Document better?  Add compiler warnings?  Or
> is it possible to "fix" this?

I tried the form in Emacs 29, and I got the expected behaviour here.  So
was this fixed since this bug was reported?  (But I only tested on Debian.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 12 Feb 2022 07:46:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 12 02:46:22 2022
Received: from localhost ([127.0.0.1]:33312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nIn6r-0008R4-Ti
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 02:46:22 -0500
Received: from quimby.gnus.org ([95.216.78.240]:39472)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nIn6q-0008KQ-0w
 for control <at> debbugs.gnu.org; Sat, 12 Feb 2022 02:46:20 -0500
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=ltrnVJU9pjHcG0cFg6oBRkRk8ai/4ppyyfeXuRVuU4Y=; b=ZLH2i7EIFs+zP5KaeBBnPQdUQg
 uJ1c2bmc2C3etu6CRFC65vqWaZEiMgqoaPWfkr+QEcSMu6PahPZbXpu0gJPLqbXsW0WxeHQEbdbVS
 E6qBeD69ZKuR2819+8j+aBMfYa+0LrG2h0DNT8FJginjYWE3T6GkQ7MzqEeQNrU6AvGY=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nIn6i-0004wT-2c
 for control <at> debbugs.gnu.org; Sat, 12 Feb 2022 08:46:14 +0100
Date: Sat, 12 Feb 2022 08:46:11 +0100
Message-Id: <87iltk4jek.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #45619
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 45619 + 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: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 45619 + moreinfo
quit





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 14:57:01 +0000
Resent-Message-ID: <handler.45619.B45619.164467780812664 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164467780812664
          (code B ref 45619); Sat, 12 Feb 2022 14:57:01 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 14:56:48 +0000
Received: from localhost ([127.0.0.1]:35453 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nItpQ-0003I7-BO
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 09:56:48 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17100)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1nItpP-0003Hk-10
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 09:56:47 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id AED5A80008;
 Sat, 12 Feb 2022 09:56:40 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 34304804EC;
 Sat, 12 Feb 2022 09:56:39 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1644677799;
 bh=B5WSHwJiwKhSz6NDb6mXeWxpW+HvFf/JywHX2C0mfBU=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=YfmYPq3zjFyt7bjQZOSfkMmw35UPzDZB90Pfav83EC0KX0trQsGizcPWntewcbY74
 5iHCT23AgGbv9d15E07wRJiZ8poZ9xZTl+koffsYo/TsjuolTSsc2m5kqfWU7HJqSn
 KYw0SlQbVyBsMy519SaVWf4WNzCyLa7kjnuv0SW2VPENWex6hD6+Tbka1dZeeRdUnF
 wZnrJi5YFak6q/a3emMbmxZ9jBZy0H8RFo9XGmPyHvc3s5eUavaJd1CXXCQuIDtntz
 hN8/SM0sBTWHv4Bc4i1v0bkp9D7T4hxpyMWui9f5NGbSjRawIMmSg2yr1VpdIXN9oF
 hpjeM3Bm2pf3w==
Received: from ceviche (modemcable034.207-20-96.mc.videotron.ca [96.20.207.34])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DF62B1203BF;
 Sat, 12 Feb 2022 09:56:38 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvr188ywem.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <87k0e04jet.fsf@HIDDEN>
Date: Sat, 12 Feb 2022 09:56:37 -0500
In-Reply-To: <87k0e04jet.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 12 Feb 2022 08:46:02 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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.030 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 T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen [2022-02-12 08:46:02] wrote:
> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>>> (pcase-let ((`(,default-directory) '( "/tmp/")))
>>>     (call-interactively 'find-file))
>>>
>>> Expected behavior: Find file in "/tmp/"
>>> Observed behavior: Find file in "~"
>>
>> AFAICT the issue here is that `pcase-let' always creates lexically
>> scoped bindings, even for special variables.  That can be surprising.
>>
>> @Stefan, what can we do?  Document better?  Add compiler warnings?  Or
>> is it possible to "fix" this?
> I tried the form in Emacs 29, and I got the expected behaviour here.  So
> was this fixed since this bug was reported?  (But I only tested on Debian.)

Hmm... I doubt it's fixed in all cases.
I still think pcase should emit a warning when asked to bind
a dynamically scoped variable.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 16:32:01 +0000
Resent-Message-ID: <handler.45619.B45619.164468347422049 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Stefan Monnier <monnier@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164468347422049
          (code B ref 45619); Sat, 12 Feb 2022 16:32:01 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 16:31:14 +0000
Received: from localhost ([127.0.0.1]:35509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nIvIm-0005jX-IP
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 11:31:14 -0500
Received: from quimby.gnus.org ([95.216.78.240]:43784)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nIvIg-0005iu-R7
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 11:31:08 -0500
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=Eykt9WaG/kXjUSRrxlcZBwaAf/hq63QqajAlmtYRlFk=; b=FftxJ8Kf1Lj+Wx5arAhtu2WDSw
 Rd3y6RqObGiga5lDVoVu0Rjnb9aPPi9SHyXZ6Dh8+6c/qjQ5XU5AivQ64GphJT5T3F3L0/ofLkxph
 GbdM7TBe/BjK4SHggzRuIAuMHzbRyyLVy1yAIiI/2BE2rfogaWKRwLspiJxP866lgb1s=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nIvIV-0000vM-Mf; Sat, 12 Feb 2022 17:30:58 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <87k0e04jet.fsf@HIDDEN>
 <jwvr188ywem.fsf-monnier+emacs@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX1rXP61nf51Zvr
 1sFXTlL///+86j3fAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YCDBAbKct9TmEAAAFoSURBVDjLtZTr
 kcMwCISxLgUYKpBRAxmRAjJj9V/TsWDl7OT+ZpPxg08LSGRCi/BVmiLVZVmZF8IFT4WXtQqTbrFu
 WQGYJV4B+EMbsjl4r+Ee3RyIYo1/JS7C/q7+Idi2SyZYGA5ft65Zu67ZnouQL0te5akY6SWKyLFg
 AxAU++ttOilb4tlbdjzBfyLmb4Ds7wNsPA/9DcgmObvc0wQIto547zE7moP2oFmzbl37HxBEDrkR
 pWKConaWagBMrNkbybOS3uxOh4qDPoFnGi8F8BU+WmS6AKsAWXqM3WzHAxzFSZRuFit3uwN0bQDY
 sSXw2w/uilYW0dYSPJAoUpEmsARhGtZbLXCoZvGsnzVqgLVNMAaRg9Zjq77xF3gGsHTQTPUAuI9j
 fy7Nne/huKHGPDaA2zyRp3fV6wH65dBnPB3nYegBqDZMO+RplF5yix+LN9f9fo7XEr+nhiSVzipU
 8l+CPlXoe/oFA1J2E2wSYXUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMTJUMTY6Mjc6NDAr
 MDA6MDBVbtVKAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTEyVDE2OjI3OjQwKzAwOjAwJDNt
 9gAAAABJRU5ErkJggg==
X-Now-Playing: Jon Eberson Group's _City Visions_: "My Mind's On You"
Date: Sat, 12 Feb 2022 17:30:54 +0100
In-Reply-To: <jwvr188ywem.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sat, 12 Feb 2022 09:56:37 -0500")
Message-ID: <87iltk11z5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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 <monnier@HIDDEN> writes: > Hmm...
 I doubt it's fixed in all cases. Here's a more self-contained example: 
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

> Hmm... I doubt it's fixed in all cases.

Here's a more self-contained example:

;;;  -*- lexical-binding: t -*-

(defvar foo 1)

(defun zot ()
  (pcase-let ((`(,foo) '(2)))
    (bar)))

(defun bar ()
  (message "%s" foo))

M-: (zot) messages "2".

> I still think pcase should emit a warning when asked to bind
> a dynamically scoped variable.

If pcase-let currently does work fine for dynamic variables then it's
likely that people are depending on it, and it's too late to change...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 17:11:02 +0000
Resent-Message-ID: <handler.45619.B45619.164468583825876 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164468583825876
          (code B ref 45619); Sat, 12 Feb 2022 17:11:02 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 17:10:38 +0000
Received: from localhost ([127.0.0.1]:35542 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nIvuw-0006jG-E3
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 12:10:38 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38831)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1nIvuu-0006j1-6g
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 12:10:37 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EC7C8100211;
 Sat, 12 Feb 2022 12:10:29 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 61590100124;
 Sat, 12 Feb 2022 12:10:24 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1644685824;
 bh=1VAPEdxNSJ8QfRw1yz+vyFos0LwIcIPhCNmy87yCME8=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=bLMgCkWVxtN0SlSPRVxvAqBU+zYyFcK+w9XjCT2JkaH99MpyG7QEZ/t/y/1vncxXM
 WA+1SoRu9JF3ZxctV9Y6wI/P5zmdhAF4PzVqYB3bNNve/HnX7wFXz76Pz+9KlcJLGe
 OPgwtHh5pk1eqtximJ2D2JAPQrbPv/ki06gFOeJmwt4BYR0GzaUTubWRaqMEcD8iv3
 IbNmtULTcgVPnKRTQkpBlievGjjWgnmhCyRxzcx4rKoK5FziNdddUor76l9WzwTzRA
 UrXgrvzKhIXFGBjpRIQGCHVRnImskXTg3/Gvtl5+mQNwmRVwfBlclHaGu+HCe9BRem
 g5dPJPvP2DwgQ==
Received: from pastel (unknown [45.72.237.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 154401209EE;
 Sat, 12 Feb 2022 12:10:24 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvv8xkovwb.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <87k0e04jet.fsf@HIDDEN>
 <jwvr188ywem.fsf-monnier+emacs@HIDDEN> <87iltk11z5.fsf@HIDDEN>
Date: Sat, 12 Feb 2022 12:10:23 -0500
In-Reply-To: <87iltk11z5.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 12 Feb 2022 17:30:54 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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.043 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 T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen [2022-02-12 17:30:54] wrote:
> Stefan Monnier <monnier@HIDDEN> writes:
>> Hmm... I doubt it's fixed in all cases.
> Here's a more self-contained example:
>
> ;;;  -*- lexical-binding: t -*-
>
> (defvar foo 1)
>
> (defun zot ()
>   (pcase-let ((`(,foo) '(2)))
>     (bar)))
>
> (defun bar ()
>   (message "%s" foo))
>
> M-: (zot) messages "2".

I don't think a single example can represent all cases.  Try:

    (defun zot ()
      (pcase-let (((or `(,foo) foo) '(2)))
        (progn (bar))))

>> I still think pcase should emit a warning when asked to bind
>> a dynamically scoped variable.
> If pcase-let currently does work fine for dynamic variables then it's
> likely that people are depending on it, and it's too late to change...

I don't mean to change the generated code, but to discourage such uses
since they may break when the code is modified in apparently-minor ways.
Hence a warning.


        Stefan





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 17:22:01 +0000
Resent-Message-ID: <handler.45619.B45619.164468650727011 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Stefan Monnier <monnier@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164468650727011
          (code B ref 45619); Sat, 12 Feb 2022 17:22:01 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 17:21:47 +0000
Received: from localhost ([127.0.0.1]:35562 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nIw5i-00071Z-L5
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 12:21:46 -0500
Received: from quimby.gnus.org ([95.216.78.240]:44310)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nIw5g-00071I-Kn
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 12:21:45 -0500
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=jZbVEwwjsiCjCyCyH2WgZ3gvT22uSQK9Mk7V9946sCg=; b=BeH8FC48jjqFXc/5aDFdVdtjIY
 AHddBnhKPPRA32xKS71vCrP0M9d/5HReP+XLhZ9MflfRnkCFvVvpQqgNGGpor6uycjWM2HNiyIuxI
 SeBUYMYvV57ZEufQI0Pdnh2SL0WzmokGnnO/I66JNZNxWfY0Cq0JVZTNN/IwVVBHoALE=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nIw5V-0001Jf-DR; Sat, 12 Feb 2022 18:21:36 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <87k0e04jet.fsf@HIDDEN>
 <jwvr188ywem.fsf-monnier+emacs@HIDDEN> <87iltk11z5.fsf@HIDDEN>
 <jwvv8xkovwb.fsf-monnier+emacs@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX03LSVgWXr2rwU
 DgheTjv////FslQwAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+YCDBEUNsAvNWwAAAGSSURBVDjLfZSL
 ba0wDIah6gC1yQBNYIEce4HE3n+m2uYQ0it6LUUR+cjvJyzLn7ZCBvC1Anz9Rh/ftpbvh0t240kL
 M5lhmS1A2RzU8+QAvIE44DjPDO0GRENrr5NUPkH3A2H8DZQDZFIoOID50PQGUHKfnDeAAAdpOXCS
 6keJqHYL7ph9VCgRzmbpjHDXZElAPoMizq8BItZQzkr16EPKK8Lqj6BS97sku50LRz1UmvQ8AY1S
 baIta4cbsAQgA0XB6/v2oQF2FuUJrJY4eY02NsmiaYDohiiwbQZae4PPANqS+g6cFPEGppVFSCwM
 SAinlAZgEK+NmDfUE0Ail4dmO3trGp/AmuHvYknUvGdyAVXLgyyWjVLEofUCPj/N5+4cJKp3Htar
 ttNlrykPae0YoM8JYsEBKk43sNSYYYicpszxiJikC6Wab8CweZp02At98mHTcV70ofuniNfM7zam
 M7gC+gu8TKo8AYaij4BsdFN/ArUAJnwADPZ5pqtRbgrDlvVr/DNK8XUN5//tozz9XpYf84OP1yk2
 CiQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMTJUMTc6MjA6NTQrMDA6MDBSwTM7AAAAJXRF
 WHRkYXRlOm1vZGlmeQAyMDIyLTAyLTEyVDE3OjIwOjU0KzAwOjAwI5yLhwAAAABJRU5ErkJggg==
X-Now-Playing: Jon Eberson Group's _Stories_: "Colours"
Date: Sat, 12 Feb 2022 18:21:31 +0100
In-Reply-To: <jwvv8xkovwb.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sat, 12 Feb 2022 12:10:23 -0500")
Message-ID: <87ee480zms.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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 <monnier@HIDDEN> writes: > I don't
 think a single example can represent all cases. Try: > > (defun zot () >
 (pcase-let (((or `(,foo) foo) '(2))) > (progn (bar)))) Hm, yes. 
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

> I don't think a single example can represent all cases.  Try:
>
>     (defun zot ()
>       (pcase-let (((or `(,foo) foo) '(2)))
>         (progn (bar))))

Hm, yes.

>>> I still think pcase should emit a warning when asked to bind
>>> a dynamically scoped variable.
>> If pcase-let currently does work fine for dynamic variables then it's
>> likely that people are depending on it, and it's too late to change...
>
> I don't mean to change the generated code, but to discourage such uses
> since they may break when the code is modified in apparently-minor ways.
> Hence a warning.

Byte-compiling this does yield a warning in Emacs 29:

pcase.el:6:28: Warning: Lexical argument shadows the dynamic variable foo


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#45619: 28.0.50; pcase-let on MacOS doesn't work
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 12 Feb 2022 22:35:02 +0000
Resent-Message-ID: <handler.45619.B45619.164470524910418 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 45619
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: moreinfo
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, jixiuf <jixiuf@HIDDEN>, 45619 <at> debbugs.gnu.org
Received: via spool by 45619-submit <at> debbugs.gnu.org id=B45619.164470524910418
          (code B ref 45619); Sat, 12 Feb 2022 22:35:02 +0000
Received: (at 45619) by debbugs.gnu.org; 12 Feb 2022 22:34:09 +0000
Received: from localhost ([127.0.0.1]:35884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJ0y1-0002hy-1d
	for submit <at> debbugs.gnu.org; Sat, 12 Feb 2022 17:34:09 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1nJ0xy-0002hT-Qu
 for 45619 <at> debbugs.gnu.org; Sat, 12 Feb 2022 17:34:07 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C3DE5100211;
 Sat, 12 Feb 2022 17:34:00 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 286D3100124;
 Sat, 12 Feb 2022 17:33:59 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1644705239;
 bh=9Y8RrKn+2THvPSnQRuOzRLWuBanJWoc/Denn8yAoz6Y=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=EAVwdIW4I3JCMBMuL0T65pgEvrfRBwhZFkIrlZjmNtQ8YVQIQw/TeXvU2RyGl/xhX
 teu/VbAB9ppftIBiKV/F/2f8TISiYSdsYCcfpmHYlrEs/xYRmxR6yRUYVpvffoawMo
 axTV7j9bGWQCxYMh5YhBnxeYV39gknYqS4Ajq7YAn9Atdyp3huw5wYy0f/VwWt+TOf
 bg50+16VUSehEOGeKDmeRPDp1JUhefQTnnAACe6M0nkKdNzDepR5HhyVe1WOZpLH8d
 wc7VNdbreOupKCt1YI6AmScS52RcfZQgwg7AanScBqhUztKXxFakftwDt40jOpD5kP
 2KIILvpYwmBSg==
Received: from pastel (unknown [45.72.237.157])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E2DB012059A;
 Sat, 12 Feb 2022 17:33:58 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvfsonn2gj.fsf-monnier+emacs@HIDDEN>
References: <tencent_420EB82A750AC42DCD81ECB23589C171FE07@HIDDEN>
 <877dos50su.fsf@HIDDEN> <87k0e04jet.fsf@HIDDEN>
 <jwvr188ywem.fsf-monnier+emacs@HIDDEN> <87iltk11z5.fsf@HIDDEN>
 <jwvv8xkovwb.fsf-monnier+emacs@HIDDEN> <87ee480zms.fsf@HIDDEN>
Date: Sat, 12 Feb 2022 17:33:57 -0500
In-Reply-To: <87ee480zms.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sat,
 12 Feb 2022 18:21:31 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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.044 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 T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen [2022-02-12 18:21:31] wrote:
> Stefan Monnier <monnier@HIDDEN> writes:
>> I don't think a single example can represent all cases.  Try:
>>
>>     (defun zot ()
>>       (pcase-let (((or `(,foo) foo) '(2)))
>>         (progn (bar))))
>
> Hm, yes.
>
>>>> I still think pcase should emit a warning when asked to bind
>>>> a dynamically scoped variable.
>>> If pcase-let currently does work fine for dynamic variables then it's
>>> likely that people are depending on it, and it's too late to change...
>>
>> I don't mean to change the generated code, but to discourage such uses
>> since they may break when the code is modified in apparently-minor ways.
>> Hence a warning.
>
> Byte-compiling this does yield a warning in Emacs 29:
>
> pcase.el:6:28: Warning: Lexical argument shadows the dynamic variable foo

Two problems with this:
- The warning talks about the generated code rather than the source
  code, so it's hard for the user to understand what's going on
  (there's no *argument* by that name in their code).
- The warning only shows up when the problem actually bites, whereas we
  should warn about all uses of dynamically scoped vars, since they all
  *may* bite at some point.
- You only get the warning if you byte-compile the code.


        Stefan "off-by-one 4ever (in short, 5ever)"





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 13 Mar 2022 20:35:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 13 16:35:08 2022
Received: from localhost ([127.0.0.1]:43399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nTUvV-0003dc-0C
	for submit <at> debbugs.gnu.org; Sun, 13 Mar 2022 16:35:08 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34558)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nTUvT-0003dP-Dr
 for control <at> debbugs.gnu.org; Sun, 13 Mar 2022 16:34:51 -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=vuQSRWKxZegZKKdowyLSLKE2SdqigNkFrsWfkc9OtME=; b=ZzGDY6bs1o+ze2BxGhXLrMRJub
 sG2k5BRDZJBbcuY/aV5PXsnsasJP2liuBr6x2/xFsV0D37JjexA9DsZufjM5nUyaWaxcCi43Ol0nS
 noFvCxuRYmdzXQFyTAPzj2+b6dqTmyuqFXK/h2dZsE1Q3e/AoT3xuEuUrVTuN/3JKnbQ=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nTUvC-0006pK-UT
 for control <at> debbugs.gnu.org; Sun, 13 Mar 2022 21:34:40 +0100
Date: Sun, 13 Mar 2022 21:34:29 +0100
Message-Id: <87ilshsiay.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #45619
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 45619 - 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: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 45619 - moreinfo
quit





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 30 Apr 2022 17:24:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 30 13:24:33 2022
Received: from localhost ([127.0.0.1]:59031 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nkqpc-0002Fq-QS
	for submit <at> debbugs.gnu.org; Sat, 30 Apr 2022 13:24:32 -0400
Received: from quimby.gnus.org ([95.216.78.240]:50488)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nkqpa-0002FW-Vt
 for control <at> debbugs.gnu.org; Sat, 30 Apr 2022 13:24:31 -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=xBtzoy2Z80urWBZJe/ifs/xnaLVcIL1JaSIMZkNLDy8=; b=PIjT+rxTi0+yxJ6EPKYc0I1Iic
 D7galQpg0ei3SnjoZCTfl4kNUFz+SN0HyPVcXRZ2e5eIXzYEmquenS5VSkKCaZBJp1tyCFLnTYysx
 ML+cXcAEVC3D82tRkNxGask8MFusukul/LuQyFK/vKQase0+auYHqpHRbsCLgFmIDwvY=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1nkqpT-00028s-6H
 for control <at> debbugs.gnu.org; Sat, 30 Apr 2022 19:24:25 +0200
Date: Sat, 30 Apr 2022 19:24:22 +0200
Message-Id: <87ee1ewkl5.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #45619
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:  retitle 45619 No warning when pcase-let is binding dynamic
 variable 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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

retitle 45619 No warning when pcase-let is binding dynamic variable
quit






Last modified: Sat, 30 Apr 2022 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.