From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Okam <okamsn@protonmail.com>, 49809@debbugs.gnu.org
Subject: bug#49809: [PATCH] Add macro 'pcase-setq'
Date: Fri, 06 Aug 2021 00:07:07 -0400 [thread overview]
Message-ID: <jwvsfznmdby.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87pmurs613.fsf@web.de> (Michael Heerdegen's message of "Fri, 06 Aug 2021 03:42:16 +0200")
> Yes, that's what I had in mind. Also for plain `pcase' I guess.
> Maybe we could use an explicit (gv PLACE) pattern that is like SYMBOL
> but compares/binds/sets the PLACE instead of the SYMBOL.
I don't see how that would work. `pcase` is designed to test and
extract data. It then makes that data available by giving it names
(local variables).
The SYMBOL pattern doesn't "set" that variable, it creates a fresh new
one, but that operation doesn't exist for gv places (the only thing we
can do there is get and set).
It would make sense for `pcase-setq`, of course, but for `pcase` I just
don't see how that would work (unless you'd want it to work like
`cl-letf`, but that's like dynamically scoped let so I think you'd
be hard pressed to find enough compelling use cases to justify it).
Stefan
next prev parent reply other threads:[~2021-08-06 4:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 17:20 bug#49809: [PATCH] Add macro 'pcase-setq' Okam via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-04 7:14 ` Lars Ingebrigtsen
2021-08-04 23:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-05 1:02 ` Michael Heerdegen
2021-08-05 13:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-05 15:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-06 1:42 ` Michael Heerdegen
2021-08-06 4:07 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-08-06 4:28 ` Michael Heerdegen
2021-08-06 22:33 ` Okam via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-07 2:11 ` Michael Heerdegen
2021-08-11 21:57 ` Lars Ingebrigtsen
2021-08-12 6:13 ` Michael Heerdegen
2021-08-12 12:11 ` Okam via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-12 15:06 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-13 2:55 ` Michael Heerdegen
2021-08-13 5:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-13 5:26 ` Michael Heerdegen
2021-08-07 15:42 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-09 0:28 ` Michael Heerdegen
2021-08-09 12:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-10 3:13 ` Michael Heerdegen
2021-08-12 16:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvsfznmdby.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=49809@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@iro.umontreal.ca \
--cc=okamsn@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.