From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#65344: 28.2; Unable to Edebug cl-flet form which uses argument destructuring Date: Fri, 18 Aug 2023 07:19:29 +0200 Message-ID: <012813c5-cfc3-7ba9-5e84-70d79c172e77@gmail.com> References: <040fe8aa-7a15-762c-e710-eb85f997d329@gmail.com> <871qg1tghr.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6142"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cc: brandon.irizarry@gmail.com, Eli Zaretskii , 65344@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 18 07:20:13 2023 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 1qWru9-0001Rn-1h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Aug 2023 07:20:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWrtz-00034N-QA; Fri, 18 Aug 2023 01:20:03 -0400 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 1qWrty-00032Y-0M for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 01:20:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWrtx-0005O1-MC for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 01:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWrtx-0004I1-Pb for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 01:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Aug 2023 05:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65344 X-GNU-PR-Package: emacs Original-Received: via spool by 65344-submit@debbugs.gnu.org id=B65344.169233598216458 (code B ref 65344); Fri, 18 Aug 2023 05:20:01 +0000 Original-Received: (at 65344) by debbugs.gnu.org; 18 Aug 2023 05:19:42 +0000 Original-Received: from localhost ([127.0.0.1]:45881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWrte-0004HN-05 for submit@debbugs.gnu.org; Fri, 18 Aug 2023 01:19:42 -0400 Original-Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:56532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWrta-0004H7-7k for 65344@debbugs.gnu.org; Fri, 18 Aug 2023 01:19:40 -0400 Original-Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-525bd0b2b48so628459a12.0 for <65344@debbugs.gnu.org>; Thu, 17 Aug 2023 22:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692335972; x=1692940772; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=YJRc0JhezlqlwsSQ6lt2GIHeZAxfpL0JX+J0c3sipQQ=; b=sNi94YapESLgNoWrY8YtVtAw22QHfXFJ0TdAQJDkVcDpNe6ta7YjjCve01wXAzA8Hw ig1qCSKT1zvakCLI0TkfMseqigFXsVbxYJYVhP4qNn5k33D5QQGAPAgdH0FkcIFEERS5 QNzQy7+cHU1hr46gcivcjtK/erxa8zaNoDl+j23HqZ9Pey5RQMlKdBmLva9q8Mnn8+bN L+yYTnxcKdo92R9BVSWiJPxPuPfXzg83vcpasIxZWfiX+GC/RmnmKRitSlwQOr/URvb0 X3zAxNtjWzCIkUU2UfScugzJRsLqhPhgY8oD5fRuXZC9HXi/pboqCAmjayDlWGa9x74n m0xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692335972; x=1692940772; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YJRc0JhezlqlwsSQ6lt2GIHeZAxfpL0JX+J0c3sipQQ=; b=Em5lX7cTWf4lZ4YGyH3jsG2Rk2oOVf9T4AIiMiq3y4vQsg2S0CBX3V6DbmXVKKPz+E vSLh+mbeAKS2pr8aUbFGkAoP0jRg9aIFtiO+eNeqMk3MV1Ad+SSZzm1mi3rtidQ+iaTj qQUFR36Y5DfsEci8A+xuSI4q2OKmcWcSm604VhZLFbW+U6Bqzivz57LW8yMZzb93TEw+ aZ1LZBQkDw0MlWL5PUzxZu58BvsQ+Ya3NGnvWPMm3eESHjtpXDkBP89kSyKnutSOJB5O H6ItrJ3jfVrKwNiHKv2sb9Gbc36sVxQ1UbFSOLTUEW5kX5+PuHFB0vx9XI9gV9cYE1o5 qgcw== X-Gm-Message-State: AOJu0YwMHpRTzgRfgSgNc9jPW4DM7I1zTqUhqjQE+1XnOUkQnzx4v6ZQ f41bglJSEw6sWq6dTDPGzso= X-Google-Smtp-Source: AGHT+IGDxpzq6GxERapBjcn3ealvWSiFRjpsPFetWaSUI4OX6bIWmhZxXfpK5Dwm/4DebZcql2OhDw== X-Received: by 2002:aa7:da18:0:b0:522:1956:a291 with SMTP id r24-20020aa7da18000000b005221956a291mr1250421eds.8.1692335971538; Thu, 17 Aug 2023 22:19:31 -0700 (PDT) Original-Received: from [192.168.178.21] (pd9e3605e.dip0.t-ipconnect.de. [217.227.96.94]) by smtp.gmail.com with ESMTPSA id d19-20020aa7c1d3000000b005232ea6a330sm641383edp.2.2023.08.17.22.19.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Aug 2023 22:19:30 -0700 (PDT) Content-Language: en-US In-Reply-To: <871qg1tghr.fsf@web.de> 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:267712 Archived-At: On 18.08.23 01:07, Michael Heerdegen wrote: > Gerd Möllmann writes: > >> Not remembering much about Edebug, but cl-defun seems to work with >> Edebug. So... :-) > > Yes, this problem does not concern `cl-defun'. This is the Edebug spec > of `cl-flet': > > #+begin_src emacs-lisp > ((&rest [&or (symbolp form) > (&define [&name symbolp "@cl-flet@"] > [&name [] gensym] ;Make it unique! > cl-lambda-list > cl-declarations-or-string > [&optional ("interactive" interactive)] > def-body)]) > cl-declarations body) > #+end_src > > Instrumenting a binding first tries (symbolp form): This is the syntax > where you can specify an expression to evaluate whose result is then > fbound. Although we obviously have three elements to match in the > recipe case, Edebug tries nonetheless, and FORM raises an error because > it can't match ((min max)). It should just cause backtracking, but the > implementation disables backtracking by purpose. > > When you replace (symbolp form) with (symbolp sexp) the problem is gone. > But that only silences the problem: this also disables the > instrumentation of a form in that position. > > I'm too dumb to fix this correctly. We could transpose the two &or > branches in the spec, this works but it is also only a way to avoid the > problem. Thanks. The corresponding declaration of cl-defun is (&define [&name sexp] ;Allow (setf ...) additionally to symbols. cl-lambda-list cl-declarations-or-string [&optional ("interactive" interactive)] def-body) which I would naively expect to be suitable for a single function in an flet/labels. (Maybe without the (setf ...) case, I'm not sure ATM). Do you perhaps have an insight why there are two &name in the flet spec? Also naively asked, what does the &or in the flet case mean? Does it say that that the elements of the flet can either be symbols or functions? A symbol element doesn't make much sense to me. Do you perhaps have a clue what that is?