From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akira Komamura Newsgroups: gmane.emacs.bugs Subject: bug#59900: 30.0.50; map pattern in pcase causes a byte-compile error Date: Thu, 8 Dec 2022 22:11:39 +0900 Message-ID: References: <877cz22v26.fsf@gmail.com> <83ilim2lyz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000be476705ef50c7dc" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59900@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 18:36:34 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 1p3Kp0-0005FZ-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 18:36:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3KoX-00076M-4S; Thu, 08 Dec 2022 12:36:05 -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 1p3KoV-00075k-Ds for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:36: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 1p3KoV-0003JM-5d for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:36:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3KoV-0001ZJ-0m for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:36:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Akira Komamura Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 17:36: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.16705209115998 (code B ref 59900); Thu, 08 Dec 2022 17:36:02 +0000 Original-Received: (at 59900) by debbugs.gnu.org; 8 Dec 2022 17:35:11 +0000 Original-Received: from localhost ([127.0.0.1]:58082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Kne-0001Yf-Sm for submit@debbugs.gnu.org; Thu, 08 Dec 2022 12:35:11 -0500 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:45996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Ggw-0002oK-6O for 59900@debbugs.gnu.org; Thu, 08 Dec 2022 08:12:02 -0500 Original-Received: by mail-ej1-f49.google.com with SMTP id fc4so3662330ejc.12 for <59900@debbugs.gnu.org>; Thu, 08 Dec 2022 05:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jx8ZL0DPTKIeaZwGgU09xBGbh0eqqdCnyaAEWoDPHqg=; b=boXeNIOuMEPmddw63isl1VnAfFLrvxVlbZymH2XpG1Qhb++1jpVNQ13lcGLYYsZ1FZ aRqiz9Vz5E8dEYXluGnQ8OFv179VRG3uwhkV0PC37QR0FM+yHkK0vyd2u88uCCll+25H yzHgBlE0Y9vf9FZyPF/oA92TEhCPmm6XVqbrRy5oHeMf/h4KeAASZKS5FEGpkgQ1Zl7F HUv6M7yMjixgdxffb5DQvyrs6ZSiWcveuC90A2uwY56mkEHpMEycREh9ajQlFOhF+RAO hUBpRmZ2daWPEbUw75d5a8p2eTX5q/UCT4XF56PSKKIl3yfvUISa3bdYcrlk+/shKNrK j8Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jx8ZL0DPTKIeaZwGgU09xBGbh0eqqdCnyaAEWoDPHqg=; b=FP/ZNmAAGpeBDu42TMP646VFW+wilEFAX18jcalZe58+KkEKLgu4crCZVr/CENQWv5 NTEV7Io/HCZyYSja1iUkNbTMiaXLHx7JI6OYRrQtZhBpSHlLdTlIcGrK1cku7QFjaEpS T2Yjaw0EEgtJBvCXNz05B8sXcYKVEJ4K/nPA80/NwGEIq4haTkS68YMZqrTbgeS34ViT Tj/J1JUoonNmCTAUjttXb1h+Xgf0zoX5i3yeYBB/6Z3qm8mVplOUZsLpYEemSraNIwbr tmkDu3HCn/pTyZrS7szUp1DreUendll7cDYAvRtPhIQxi/kmoPmSiohItVJKOnkPa1d4 X6lQ== X-Gm-Message-State: ANoB5pmj0p74kkwWiAOq/UkK9RtIF6W6XWUE76GEmF4PhzY0uJrbKY1t uWgzBRW0WHqzGrGGEuk/hbNaGMR8WF/ViK8g7fLeDXbX1hw= X-Google-Smtp-Source: AA0mqf494qMVpU0Phm28Vh1YOOmcCLi4xvtnP9gJTvtiK8RZBEYHa8IL5j34CtIenL2gD96ojtuM251UcZ804le4ERQ= X-Received: by 2002:a17:906:d10f:b0:7c0:f727:5dd2 with SMTP id b15-20020a170906d10f00b007c0f7275dd2mr12716019ejz.319.1670505111109; Thu, 08 Dec 2022 05:11:51 -0800 (PST) In-Reply-To: <83ilim2lyz.fsf@gnu.org> X-Mailman-Approved-At: Thu, 08 Dec 2022 12:35:09 -0500 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:250323 Archived-At: --000000000000be476705ef50c7dc Content-Type: text/plain; charset="UTF-8" > Could you please point out where does pcase.el uses 'map' in its > source? The error message you quote doesn't reference pcase.el, only > org-bookmark-heading.el, which is not part of Emacs and is not on > ELPA, AFAICT. Apology for the misleading title. `pcase.el' itself doesn't depend on `map.el', nor does it contain `map' pattern in its source. `pcase.el' itself successfully compiles. I encountered the error while trying to byte-compile `org-bookmark-heading.el', which contains a `map' pattern at the following location: https://github.com/alphapapa/org-bookmark-heading/blob/f245c9023df28d6ee545dae4b96a1c237e6965ba/org-bookmark-heading.el#L176 The error vanishes if I add `(eval-when-compile (require 'map))' as in the following PR: https://github.com/alphapapa/org-bookmark-heading/pull/19/files I encountered similar errors in other libraries that contain a `map' pattern inside a `pcase' form. It didn't happen until recently, when I updated Emacs and began to get those errors. > So I wonder where's the place in the core Emacs sources > which causes the problem, and I couldn't find it. I'm probably > missing something. There are some other additional patterns for `pcase'. One of them is `rx' pattern. There is an autoload cookie right above the definition of `(pcase-defmacro rx ...' in `rx.el'. On the other hand, there is no autoload above `(pcase-defmacro map ...' in `map.el'. I think this might be the cause. Is there any reason for not autoloading the `pcase-defmacro` form? Thanks. --000000000000be476705ef50c7dc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Could you please point out where does pcase.el uses = 9;map' in its
source?=C2=A0 The error message you quote doesn't reference pcase.el, o= nly
org-bookmark-heading.el, which is not part of Emacs and is not on
ELPA, AFAICT.=C2=A0

Apology for the mislea= ding title.

`pcase.el' itself doesn't depend on `map.el'= , nor does it contain `map' pattern
in its source. `pcase.el' it= self successfully compiles.

I encountered the error while trying to = byte-compile `org-bookmark-heading.el',
which contains a `map' p= attern at the following location:

https://github.com/alphapapa/org-bookmark-headi= ng/blob/f245c9023df28d6ee545dae4b96a1c237e6965ba/org-bookmark-heading.el#L1= 76

The error vanishes if I add `(eval-when-compile (require '= ;map))' as in the
following PR:

https://github.com/alphapapa= /org-bookmark-heading/pull/19/files

I encountered similar errors= in other libraries that contain a `map' pattern
inside a `pcase'= ; form. It didn't happen until recently, when I updated Emacs and
be= gan to get those errors.
=C2=A0
So I wonder where's the place in the core Ema= cs sources
which causes the problem, and I couldn't find it.=C2=A0 I'm probabl= y
missing something.

=C2=A0There are some oth= er additional patterns for `pcase'. One of them is `rx'
pattern.= There is an autoload cookie right above the definition of
`(pcase-defma= cro rx ...' in `rx.el'. On the other hand, there is no autoload
= above `(pcase-defmacro map ...' in `map.el'. I think this might be = the cause.
Is there any reason for not autoloading the `pcase-def= macro` form?

Thanks.

--000000000000be476705ef50c7dc--