Subject: bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`

From: João Távora <[email-masked]>
Date: Thu, 8 Feb 2024 13:41:49 +0000

On Thu, Feb 8, 2024 at 3:49 AM Richard Stallman <[email-masked]> wrote:
>
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > Could you tell me more concretely what this proposed feature would
>   > > look like in use?  Perhaps with an example including context?
> examples separatrly.  It's far more helpful to send an example than to
> say, "Look through the patch for some."

You do this very often where you ask someone to summarize or explain
context just for you.  That's perfectly fine, you're polite and not
generally imposing.  But since we're all busy individuals, I also think
it's fine to point out that what you're looking for is close by.

>   > (pcase some-mistery-object
>   >    ((cl-arglist (42 &key a b c))  ; this proposal
>   >     (message "Oh, it starts it 42 and has c=%s" c))
>   >    (`(,_ ,x ,_)
>   >     (message "Boring three-element list with middle %s" x))
>   >    (`[,_ ,x ,_]
>   >     (message "Fancy vector with middle %s" x))
>   >    ((franklinboing (nixneez)) ; my data-structure
>   >     (message "This franklinboing has some nice nixneez %s=" nizneez)))
>
> Thanks.  Now I understand what your extension would be.

This is very similar from what you find in the patch in the form of ert tests.
Also it's not my extension.

Thanks,
João