From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#59900: 30.0.50; map pattern in pcase causes a byte-compile error Date: Fri, 09 Dec 2022 19:02:32 +0100 Message-ID: <875yekv4jr.fsf@web.de> References: <877cz22v26.fsf@gmail.com> <83ilim2lyz.fsf@gnu.org> <87k031nx6l.fsf@web.de> <837cz1125q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24091"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: akira.komamura@gmail.com, 59900@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 09 19:04:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3hjT-000657-6X for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Dec 2022 19:04:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3hiQ-0006Dg-GY; Fri, 09 Dec 2022 13:03:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3hiA-0006CL-W7 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 13:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3hiA-0001L0-O3 for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 13:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3hiA-0001JO-JB for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2022 13:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2022 18:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59900 X-GNU-PR-Package: emacs Original-Received: via spool by 59900-submit@debbugs.gnu.org id=B59900.16706089655027 (code B ref 59900); Fri, 09 Dec 2022 18:03:02 +0000 Original-Received: (at 59900) by debbugs.gnu.org; 9 Dec 2022 18:02:45 +0000 Original-Received: from localhost ([127.0.0.1]:37527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3hhs-0001J1-NG for submit@debbugs.gnu.org; Fri, 09 Dec 2022 13:02:45 -0500 Original-Received: from mout.web.de ([212.227.15.3]:56699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3hhq-0001Iv-As for 59900@debbugs.gnu.org; Fri, 09 Dec 2022 13:02:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1670608953; bh=XfLb9cdTJY6U2IQ5KJyAuI+97t/xB9WWwVlBkyINv5M=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=sUPZ9oEpwYfvOCUFlOcACM177DkVbNYFqNfnFO9MUqhbc+oxlHmibkYD46Z6y1qqJ o9aNPBqVmglmkJGXeAd+S1lhgXGn8NAq8uAnspT8sGgD22EPoL7iFGC56P0+arqazp +AdfPMzOpxwwk2co2+lH/lP2uX4E9S0aDyGT3wS4/iyb+TDgtj9FsQW4q/QfjRSgOi WOTo0JkZzPq/EfsYwQAdijfrdVcUrCTxDYKkDkcAQd0OpqyvY8paZfLXiMljA6X65G FjKuhIfiIqnATzY8d4CO9DAHxXeo5TXaMxb+W8DpLt2MjlEw4vhkfKZLiVkcopsMxs qxM5l+apGlDVA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.76.229.140]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N5UgI-1osALr2LiE-016ywi; Fri, 09 Dec 2022 19:02:33 +0100 In-Reply-To: <837cz1125q.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 09 Dec 2022 09:12:17 +0200") X-Provags-ID: V03:K1:BdlgzHStOjpP5UnT+XE0d2oQUOdKukHXky10DRCUn3LW1Z2fx6l 8hElGhaEw1Bx4VS2XjjAsOnPgGVLbrYqyLpCYUdL9pr43eM+xvEtNcpJtIphifBU1sjyMXm o+ZrDwLkuD5V1iqV4i6zbzbUnPeCgzxfn4O9Q14cVMCi6vECBG6b8mqwNZ+21dVCsWlIMgl dSxT/sQex9S3eBc+pLuYQ== UI-OutboundReport: notjunk:1;M01:P0:dglfXzBT0iA=;Q6l1nTSb1h0aQNbRHhEpDmpZ+dy HCLl+lKcmI8PxbfEQwtfy6Kt4rOhqCYXeYSDE98Od+lVxh5ia7L/ee1B1vnDCAJf8X35dcu5Q jqQwtTkNakm2fGWne5cSWdE6YLELft1EofQCuc53dXhwoDnZYvaaWbgCfTu2ckg7x+qUPBCk6 ggSbtUs2uZL1WmXJvE90CU1EVP4uCRQQHhEIl5ZjzdLF5Tfi9CEATmQozLZ5M2ZDC6tK60pLW cIXlXzcPAdJJFQiGB5OwMs0tGchT5hf2S2OXTIjyfgrkgyyJtNh/M53ZbVAVp10gFHR08bUjW 3PSxs734PAsWpgC0La8XO5Khmc1hPqc6VBec1ZXTxWP0V7eTzISncuyrXQINEcTo7E2DZZj4v nUe4F81ChFUhVY/giuUwDnimflKGLA6PmxwZG4tmygkBwDYeGKJD83yucMenwAx2PscQspwEU CBMCt1ZgRSI5c8hyQYYJ3kgDMeMykepKqOcS5YjAGGfk458oE3qGDFudGYHw9Xvvz1usZTZUu L/KJgRLrZJSWaG7a9bHV13whxzjYBTL0XPJSGTSMxPfhE4Xjo+Z0uYp5s1KWM0FmfVJnJgNdO S1uFpXssU4RHr+pcy031Cf64XGDoON+v9Xql1dSJ5ynq/yJ6bCIHCfU3YG7yHh9Ms2EaljrGq bTWnDjkdtnr63Vy6aVbHprFLivqOTYFgo5vYE+UrllI/TLUKGLY96f8azAko8LUucV+wuO13h +HNYJM4MtqKEDZLwAGejXEbiGBxh3c5grmiZlxjM2+8uc9SBtkHeGr14+1hM5OQzMTEDJLBz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250424 Archived-At: Eli Zaretskii writes: > Thanks, but all this still doesn't answer my questions, > unfortunately. You-all are describing something that I cannot wrap my > head around, because that basic question was not answered yet. What specific question? pcase is extensible: It allows to define new pattern types. "rx.el" defines a `rx' pcase pattern, "map.el" a `map' pcase pattern. The normal way to be able to use them is to `require' the library in which they are defined. Since `pcase' is a macro, the library (rx.el or map.el) must be loaded when a `pcase' form using such a pattern is compiled. The `rx' pattern definition in rx.el uses autoload cookies so that compiling works even when rx.el is not loaded - it gets loaded automatically when compiling. The map.el `map' pcase pattern doesn't use autoloading. The OP found a case where compiling succeeded until some days ago without requiring map.el explictily, and now a require is needed. But that was only by luck: AFAIU, map.el was already loaded in that scenario, and now it is any more. But there is no guarantee that the library is always loaded when compiling arbitrary files, so one should _always_ explicitly require map.el when the file contains pcase forms with `map' patterns - even if this worked without in some cases in the past by luck. The wish of the OP to make the `map' pattern in map.el `autoload'able like the `rx' pattern in rx.el is reasonable, I can try to create a patch. But strictly speaking here is no bug, just the OP relying on something that in the past worked by luck. Hope this answers everything - else please ask specific questions. Michael.