From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67820: 29.1; Code example in "fwd-para while" has unmatched ending parentheses Date: Sat, 16 Dec 2023 09:52:40 +0200 Message-ID: <838r5uoa7r.fsf@gnu.org> References: <875y119vkk.fsf@debian-hx90.lan> <83wmtfoade.fsf@gnu.org> <87cyv7jez0.fsf@debian-hx90.lan> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2217"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67820@debbugs.gnu.org To: Xiyue Deng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 16 08:54:50 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rEPVZ-0000Oe-Rh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Dec 2023 08:54:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEPUp-0003FL-Il; Sat, 16 Dec 2023 02:54:03 -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 1rEPUo-0003Ej-Ff for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 02:54:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEPUo-0000lV-7f for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 02:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEPUo-00061L-E9 for bug-gnu-emacs@gnu.org; Sat, 16 Dec 2023 02:54:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Dec 2023 07:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67820 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: pending patch Original-Received: via spool by 67820-submit@debbugs.gnu.org id=B67820.170271318723073 (code B ref 67820); Sat, 16 Dec 2023 07:54:02 +0000 Original-Received: (at 67820) by debbugs.gnu.org; 16 Dec 2023 07:53:07 +0000 Original-Received: from localhost ([127.0.0.1]:53908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEPTv-000605-17 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 02:53:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEPTt-0005za-81 for 67820@debbugs.gnu.org; Sat, 16 Dec 2023 02:53:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEPTn-0000el-Gz; Sat, 16 Dec 2023 02:52:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6mGOnMk6//oz/x9tAULsEEuLqmLtq30rHcSO35JdBjo=; b=H+xqhlJDvvXT Ut22GUEaX39zSg5bKwl12etWiSnI/ZMGL1lkL+BASMt7SMhUGb2bLRFkgFJzN6AlCOOzC88VxSOTi Tg/hDy8N0B++tQPMZrkh44oJvar+OOnyhyBcTxeI17Oepb8j6v5zdFaBfmZqrk+Jw0UT6amqd5c9s cUmSzIxoZu+Mwvved7cj9+oznvXdGSALU/TBchbgqAxsQ3ey3tyDlfd/GTnVq/s1uR0a2HulQPHSg p1JGE376GDpnWoMe3x/WFREyVaZMI9/lqExEepLS0LSm2jLgHVYlqNhV+TrRh4i2IfRnbNimJZqTo wwcwDtCs1tajCLccysu5QA==; In-Reply-To: <87cyv7jez0.fsf@debian-hx90.lan> (message from Xiyue Deng on Fri, 15 Dec 2023 14:08:51 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276299 Archived-At: > From: Xiyue Deng > Cc: 67820@debbugs.gnu.org > Date: Fri, 15 Dec 2023 14:08:51 -0800 > > Eli Zaretskii writes: > > >> From: Xiyue Deng > >> Date: Wed, 13 Dec 2023 21:55:55 -0800 > >> > >> > >> The code example in section "fwd-para while" has unmatched ending > >> parentheses[1]. Admittedly this code snippet was copied literally from > >> the previous longer code sample where the 2 extra ending parentheses > >> were to match the `if' and `while', but it would make more sense to drop > >> them in this example. Will add a patch next. > > > > I'm not sure it makes sense to make this expression stand-alone. As > > you say, this snippet is copied verbatim from the full example at the > > beginning of the section. So I think we should leave this alone. > > > > Thanks. > > This essentially was due to the coding convention to put all ending > parentheses on the last line of the sexp, which most other programming > languages don't normally share. But anyway. > > Just want to say that a code snippet with unmatched ending parentheses > would confuse beginners a little. However, if from a book writing point > of view that code snippets should be copied literally, it's probably > understandable (adding a small explanation for the extras would better > still, and I can update the patch accordingly.) > > Wdyt? It's okay to add a note in parentheses that this snippet is from the above full code, and therefore is not standalone.