From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Improving 'pcase' documentation Date: Tue, 21 Nov 2023 17:30:19 +0100 Message-ID: <87v89v9ihw.fsf@web.de> References: <19a64b7a-cec0-ed8a-d413-096451cc7413@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30242"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 21 17:31:21 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r5Tei-0007dt-5R for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Nov 2023 17:31:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5Tdi-0005kf-Jt; Tue, 21 Nov 2023 11:30:18 -0500 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 1r5Tda-0005kG-Hg for emacs-devel@gnu.org; Tue, 21 Nov 2023 11:30:10 -0500 Original-Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5TdX-0002Jj-SL for emacs-devel@gnu.org; Tue, 21 Nov 2023 11:30:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1700584204; x=1701189004; i=michael_heerdegen@web.de; bh=63sZlXcHowcpl0dw9H+m5HHIhDCXNdJK+IkxP+/4mY8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=ZSFITYQXR4KNnHLS0JORDLTiGMW+8U2uQtLyILQYOkJqZGZxVuyrKUYE9qWGJDow emqV4H0KtC4Xk6vf/cNQMUSdq2nZuPilRnzGhNWi0zNneg6yB5uY8cRozfs9Y09y4 BnWNMmrbm2DDPgDIPKNklMYgfh+nBVsoZRgSIEniFEXcOeoXcU29xgWAa3jk9ftYH ZRu2KhfXKi/Xt8qw1dVr+WMLvXucGzwbbh+dpXcqEjDqEMIMxHQD4vUoVFqowzXHQ cl0RvNyZfXZehS0tkTSEOMDZ3ZJhcj3vG43EcpIeOxhgDrdvz3jemOUWlFE7sym9x jJvEVIwYFKPrYDa9pQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([178.6.28.177]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N7QUL-1rOG1339rR-017PPn; Tue, 21 Nov 2023 17:30:04 +0100 In-Reply-To: <19a64b7a-cec0-ed8a-d413-096451cc7413@gmail.com> (Jim Porter's message of "Sun, 19 Nov 2023 12:14:39 -0800") X-Provags-ID: V03:K1:HayjD1NmRkdf+B3q7tY6YAFqRawfHldyVHL0yb2FeVZfkvTdFFo qXTdLChe6JuGI2CGe9yGmJ+u+KrMOJsc/uojttfWP2QUmJQQyl2Mcs+SCjB7uujl/CRBJvq tts079B5c2uz/XI1Y4osCRxx+5JTTT0VWMrrY+fgx+0EXMX0iEA1OSH6js22fE/lRk3BeV9 E8nWIskcJDu7ktwhz2G8w== UI-OutboundReport: notjunk:1;M01:P0:ud/FylyuYjg=;TuTyW5QjRKcyrdVJlE0kxN0cE/8 8bgL3IoQZ68lGm+eBqZNRcVY8HJLS0fcrEOji2Id2ZoNX9Tz2N3P1sW0wg1WBTsEy/oeWlcGW dspQbwfeTBfFDwX4QNB+hnkXYfgT5oHd9I4A8ZAsmUpzAounUda1WF1ZLnQiZiGsmUA8Xp9Jt V7nQEWr66VqRkfQU5Q9hNDw+KMFbZb+uEKOSd+gvx1SAjOhm8FYadBIqgD7PJxDEp12JBV+Ky mjyHrlKLjbmMkPlpt1QKO1C+wydqtdJIzBfhkkYzJVXb2THMgGCjUN3UkRaMjWMxjpZ4ZU74X IdpNn15nCjO0rnTK/BvVK9+hx56GnB8pwhh9tVljmf2oJc9SVyEQo2QNJG1GpPhH3PPd4CH3B LiW7VXbQ4PR88PoA51mzb9TPAVNQhqmkgW8NdJBbZIRmdYzF/jOl5046OI2D0xPHDr5jjKV0j QhgyVSLPPmTK0UCsyVR//D4kYY47FmBClUhO2K1ntowUcfZaX9rFEt6u3cL9loQ9rrxOLyFio QjpQXtDyISDLu/jrDLHIpDkRxiqXLRlAjArWzvCivJ0i6ZnbvYGq+Q/fONmhDM9KHsBvRoIjz zmGjHG4asYFeFm1trgqbthw/62YTzBtHIW56OHSgYFjZW76LVBW91/w98XMBOk/1vMl4DLnwS UdnnVcI5J5F8+DueSY6hx+ufsszfVOOhjMwmzOLFbVcQOfH4RIB7NT5poPFfgLR2fkIBs3Afy N4oluhwtvbNJPpzVTgPT/nw+eTwCBrU1V5jbz05g5F6TUhX+gEikB27GynLCuXKADwis4psm Received-SPF: pass client-ip=212.227.15.4; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313117 Archived-At: Jim Porter 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.