From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: New for GNU ELPA: literate-scratch Date: Wed, 19 Jun 2024 06:47:44 +0000 Message-ID: <87frt9tomn.fsf@posteo.net> References: <87ed96wtkr.fsf@melete.silentflame.com> <87sexemjsm.fsf@posteo.net> <87bk3xvej9.fsf@melete.silentflame.com> <87le31a3lj.fsf@posteo.net> <86a5jho2tl.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sean Whitton , Sean Whitton via "Emacs development discussions." To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 19 08:48:43 2024 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 1sJp7a-00062s-PY for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jun 2024 08:48:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJp6q-0002if-0f; Wed, 19 Jun 2024 02:47:56 -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 1sJp6k-0002ff-Q1 for emacs-devel@gnu.org; Wed, 19 Jun 2024 02:47:53 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJp6i-00032Y-K9 for emacs-devel@gnu.org; Wed, 19 Jun 2024 02:47:50 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4482F240029 for ; Wed, 19 Jun 2024 08:47:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718779666; bh=4WafDlOSmC2g1VYaQADC9+Pvyz4J7DbKphIfvgOaJWE=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=hkS/JcNR1a++8twwiT0Az+a3ZYPNghh8QX7q8aOOrHdte/FH3k0la396zAUuC5T60 WAxX12xeYtPyiSrTK1hY/Ju+n4v6ld+kcoVAmgcSJPuuMJnGA1c9qapR58dLIIY3Fq loj/z12eHcIwH1GON9YUwC2D+QiJklGVpz3jWsHt77spleedbM2e3md1/oR4eyYjqw +LyMM1A01ywStmP2z5VEedzPETU8L8AikrLiY1qxQI+tuuQgkM6c4a5fnD2/TqXrMp xCmzFZTW/Y1MmgkMAY4mQyc+j1W2WTVWc8PQPrk3qAepUKa5bwS6H/JcarwXZcU956 dpn6oPR3RfBMg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W3vM51pyXz6tx1; Wed, 19 Jun 2024 08:47:44 +0200 (CEST) In-Reply-To: <86a5jho2tl.fsf@fastmail.fm> (Joost Kremers's message of "Wed, 19 Jun 2024 08:37:42 +0200") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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:320279 Archived-At: Joost Kremers writes: > On Wed, Jun 19 2024, Philip Kaludercic wrote: >> Sean Whitton writes: >>>> You should be able to merge the `and-let*' and `and' like >>>> >>>> --8<---------------cut here---------------start------------->8--- >>>> (and-let* ((new (car (bounds-of-thing-at-point 'paragraph))) >>>> ((< new start))) >>>> (setq start new)) >>>> --8<---------------cut here---------------end--------------->8--- >>> >>> Very interesting! >>> This seems to be undocumented behaviour of the macro, though? >>> I don't think I can see anything which implies it in the docstring. >> >> Apparently so? I thought it was documented under if-let* or when-let*, >> but I couldn't find anything myself either. > > It's documented under if-let, where it says that "[a]n element can > additionally be of the form (VALUEFORM) [...]": True, and I figured out why I didn't see that. Notice the first line of my *Help* buffer: ^^ --8<---------------cut here---------------start------------->8--- if-let is a Lisp macro in =E2=80=98j-help.el=E2=80=99. (if-let BINDING THEN &optional ELSE) Bind value according to BINDING and check for truthy-ness If the test passes then eval THEN with the BINDING varlist bound If no, eval ELSE with no binding --8<---------------cut here---------------end--------------->8--- > ,---- > | Each element of SPEC is a list (SYMBOL VALUEFORM) that binds > | SYMBOL to the value of VALUEFORM. An element can additionally be > | of the form (VALUEFORM), which is evaluated and checked for nil; > | i.e. SYMBOL can be omitted if only the test result is of > | interest. It can also be of the form SYMBOL, then the binding of > | SYMBOL is checked for nil. > `---- > > The doc string of and-let* points to when-let*, which points to when-let,= which > points to if-let. =F0=9F=98=84 I think that this is fair, before we have to start duplicating the documentation in each ...-let* macro. --=20 Philip Kaludercic on peregrine