From: Michael Heerdegen <michael_heerdegen@web.de>
To: Jim Porter <jporterbugs@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Improving 'pcase' documentation
Date: Tue, 21 Nov 2023 17:30:19 +0100 [thread overview]
Message-ID: <87v89v9ihw.fsf@web.de> (raw)
In-Reply-To: <19a64b7a-cec0-ed8a-d413-096451cc7413@gmail.com> (Jim Porter's message of "Sun, 19 Nov 2023 12:14:39 -0800")
Jim Porter <jporterbugs@gmail.com> writes:
> 1. Mention backquote patterns earlier in the 'pcase' docstring.
Good idea. The current documentation tries to keep the first parts
simple, but this is also a bit demotivating and artificial (readers may
wonders what this is all good for until they see the whole picture).
> 2. Add a simpler conceptual summary for backquote patterns. I think
> you could get pretty far by describing them as "running the usual
> backquoting in reverse". That is, instead of building a list where you
> splice values *in*, you're destructuring a list where you cut values
> *out*.
Yes. I came to the conclusion that it is important to outline the
design idea and the concept behind `pcase' more. I guess this would
make the documentation a lot more accessible.
> 5. Mention 'pcase' in the Lisp Intro manual? A beginner's guide to
> 'pcase' could make sense in the Lisp Intro, and while we wouldn't have
> to cover everything, it would at minimum alert readers to the fact
> that it exists, and the basics of how 'pcase' works.
A clear "no" from my side. Beginners should concentrate on basics.
> 6. Improve editing support. I'm not sure how feasible this is, but it
> would be nice if Emacs understood 'pcase' better when editing. For
> example, font-lock support on the various macro forms; Emacs already
> font-locks the 'or' pattern, but only because 'or' is font-locked
> normally. It would be nice if the same applied to 'pred', 'guard',
> etc. Similarly, ElDoc and Help (C-h f) could do the right thing inside
> 'pcase', providing us with the appropriate documentation. (I also
> think it'd be nice to font-lock anything that looks like ",SYMBOL",
> even outside of 'pcase', but maybe others would find that annoying.)
I would find the ElDoc part most useful by far.
Thanks so far,
Michael.
next prev parent reply other threads:[~2023-11-21 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-19 20:14 Improving 'pcase' documentation Jim Porter
2023-11-20 13:54 ` Dmitry Gutov
2023-11-21 16:30 ` Michael Heerdegen [this message]
2023-12-25 14:44 ` Stefan Kangas
2023-12-25 18:33 ` Stefan Monnier
2023-12-27 4:54 ` Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v89v9ihw.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-devel@gnu.org \
--cc=jporterbugs@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).