From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: No Wayman Newsgroups: gmane.emacs.bugs Subject: bug#49739: 28.0.50; byte-compiled pcase pattern match failure Date: Sun, 25 Jul 2021 23:33:39 -0400 Message-ID: <875ywxeoit.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1827"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.14; emacs 28.0.50 To: 49739@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 26 05:35:12 2021 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 1m7rOZ-0000DX-Lv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Jul 2021 05:35:11 +0200 Original-Received: from localhost ([::1]:43984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7rOY-0002cP-GX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 23:35:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7rOR-0002c3-Am for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 23:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7rOR-0001OV-2t for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 23:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7rOQ-0001X7-Ou for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 23:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Jul 2021 03:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49739 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16272704985877 (code B ref -1); Mon, 26 Jul 2021 03:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Jul 2021 03:34:58 +0000 Original-Received: from localhost ([127.0.0.1]:49642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7rOM-0001Wj-8G for submit@debbugs.gnu.org; Sun, 25 Jul 2021 23:34:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7rOI-0001Wa-QW for submit@debbugs.gnu.org; Sun, 25 Jul 2021 23:34:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7rOI-0002aX-GU for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 23:34:54 -0400 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:39588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7rOG-0001Ei-Mo for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 23:34:54 -0400 Original-Received: by mail-qt1-x829.google.com with SMTP id d2so6163314qto.6 for ; Sun, 25 Jul 2021 20:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=VsiXc/bb8qIe4rSMgw6BodNTqMgoL1PDGsuPOBQnrfg=; b=BAK8qMXdePJgK5mMwEpuc77DpgZLp3tyMbj8fG3mjuk7P8+Sf1rNv+vKxRHR7SVGnP dTuDHMQh5T9ppAHZ4mxHfK2qgMK3HU6nsBWfGzb4gqCfJpVz5kF9De0pQrjSJQK0IBSJ BjWYHtS9d5cDGbZOFN6zE7FaYCQULs4tPaHoOBKNrdd4gXztGyZpMxYwi49ruk8T/YW3 nz9lXLlDkvX2G2m4DU3XW2ksU8Iaic7JhowhcEgxUTHQc8+WvlBDnl5zLe5LndEVhnri upR+Wi5ZRfRX+AjuuP4+EdFFQeYmpRQq5L9Xlbc5t5h4P0xZU05DWzPEM8OgKbXIy7Vy TXGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=VsiXc/bb8qIe4rSMgw6BodNTqMgoL1PDGsuPOBQnrfg=; b=Yx5yVLfq96WwroQPsorzrJQZHcm6nmkMEqi2dy3mwZthzOnQey7DdS9273F8Idp0nU prd1MvJGIUBiJnQPQ4Ky+9AvhS7NVaYyB8HVbp8lHpRj6DQTEHg2pSjAz4cOeFph2Awj z1jrmH0Cb7HQAc+84vFksaAHLVsNKSjFl242wEUCCzFve/JrWqhA6th3yIY7Q6oOzSmy s4iokPbK7Au7kk17Dmcovu+hnOZ8BI8rLaWn0ojOmjpPy1bSNkkh1ty3mNcL4wDCek3w gam1XHCHI82oUkt9omBI7vQOrFMiH/iN2ubncLx5o4UCD/8GkwxpVUFSpGraj9U1xmfP PEpA== X-Gm-Message-State: AOAM531bXQEq8jPEvAHrINTz3zCwMJj+SDWq91zxitDXmtuAEJpk67Y9 pwOk4Jrtx4HRU4Ovc+h1BLlRcnGgMAk+jw== X-Google-Smtp-Source: ABdhPJxW5S8sZqJ7FBOi/1NAtZSnvu0Fpd0T2gQqUw5qdylic3Ww5KHLenYitY0jZz/NoXG+MeWPDw== X-Received: by 2002:ac8:7c54:: with SMTP id o20mr4504375qtv.142.1627270491108; Sun, 25 Jul 2021 20:34:51 -0700 (PDT) Original-Received: from arch ([2601:8b:c300:1024:1266:d0ff:1635:f964]) by smtp.gmail.com with ESMTPSA id e2sm18698600qkn.69.2021.07.25.20.34.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 20:34:50 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:210744 Archived-At: Recently a user reported a bug on Org-mode's mailing list in which an org-capture template was failing to fill properly: https://orgmode.org/list/87fsw3zyjl.fsf@ucl.ac.uk/T/#t I was able to reproduce the issue with emacs -Q and the following recipe: Evaluate the following in *scratch*: (progn (require 'org-capture) (org-capture-fill-template "%^t")) This should prompt the user for a time, instead we hit the `_` case in one of the pcase calls in `org-capture-fill-template' despite the valid template string. This results in the error: "unrecognized template placeholder: %^t" I've observed that this only occurs when `org-capture-fill-template' has been byte-compiled. Re-evaluating the defun results in the expected behavior. And byte-compiling the function puts us back in the erroneous state: (progn (byte-compile #'org-capture-fill-template) (org-capture-fill-template "%^t")) ; unrecognized template placeholder... I didn't do a proper git-bisect, but the everything works as expected when building from the parent (3af2cee64b86e4ce59adb8e8720d92db35039cbc) of the following commit: commit 937b6c18bd6c4806eb1e4c8764db56b314c09056 Author: Stefan Monnier Date: Fri Mar 19 17:42:22 2021 -0400 * lisp/emacs-lisp/pcase.el (pcase-compile-patterns): New function (bug#47261) Extracted from `pcase--expand`. (pcase--expand): Use it. I tried to do some more debugging, but I'm not familiar with how to debug a problem which only crops up in byte-compiled elisp. Happy to provide any other information if necessary. ~ Nick