From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master 7f53446: Doc fix for y-or-n-p; trailing space is no longer needed Date: Wed, 04 Jan 2023 11:10:19 +0100 Message-ID: <874jt6k3uc.fsf@gmail.com> References: <20210916073852.6025.85941@vcs0.savannah.gnu.org> <20210916073853.B90BA20ABE@vcs0.savannah.gnu.org> <87mt6zk7v0.fsf@gmail.com> 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="6724"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 04 11:11:13 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 1pD0jo-0001Yr-JT for ged-emacs-devel@m.gmane-mx.org; Wed, 04 Jan 2023 11:11:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pD0j4-0000ef-7h; Wed, 04 Jan 2023 05:10:26 -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 1pD0j2-0000eV-6p for emacs-devel@gnu.org; Wed, 04 Jan 2023 05:10:24 -0500 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pD0j0-0003C3-ON for emacs-devel@gnu.org; Wed, 04 Jan 2023 05:10:23 -0500 Original-Received: by mail-wm1-x335.google.com with SMTP id b24-20020a05600c4a9800b003d21efdd61dso26035369wmp.3 for ; Wed, 04 Jan 2023 02:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6Z6ltZ2s/pHJCuy3t32/RPKZ6U23fOY0paHrZwbI0mE=; b=oGpBNlTgpp74JWeY0s6lSV8yEudSa1mlwm+y40u8vd2SCGzuktXOeLq/cA0nS76zs5 FxuFepND9zot/jJLQJ42iTm4zMI0GjYjo7mCHiKgUX50rKo7OwW2ROiYHPdc/TCarqfG 7qlV6FWLtbl05H3HmW9RI5OJAsfG/ZwWEQIAU7fKQtd80Q4Vep8WW8wL0pqm7bgugTek l9KFjpRkXytSIy6yg1qSSxFnWifqg/biSUWQ9J+FPmIvm3OSpLk04O+jyWHNXYCagCNG 1MmHcNvRUUAEbOhUnGNmNrI6hlPMcaEee4OTJTtUiI8bP2oS6jcIbroKMyRqT/sPl7/C CUPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6Z6ltZ2s/pHJCuy3t32/RPKZ6U23fOY0paHrZwbI0mE=; b=5ery/s+NGb4gRufJY0TTr92dkELixhiKZeFGjF8Rwv6lg+bOqy5mP3tDhNOQtfrNPg 1jWrsT/OEg4MOvf2QhK7npulRS3vOwAJ/SRW2ZC3/YdecqE5wyDdmGjiFMCzz1ddy0VL FESo1nPHOMMMokS2akxsg6uhstEPMxEeP2x0WQXrgi8OGnLxKmFRIucIqLTkEskgpg1r UOJtjr3BjISpQi9ad49pwavjbYgPLStFEU7pFaGtcrm9DEgDOhWdKRqfq+wZp7cP3Mcy ZavJf1gLpDCNi5aZ9Q32L0obTxbW1DdjFvJGSoqKlBeRITn/QY8XQC6z5+FIPJW6+XOR ZJqQ== X-Gm-Message-State: AFqh2krZhwmYIzgUMTUJHbU0WopdF/THriBwibmumHJvTyM+Lwh6LxQT 6WMgkSQKscfaKlzekouLDNjsgYhuZEM= X-Google-Smtp-Source: AMrXdXvgnxnTt5lnKFblln72qoU5BjkA1fFQaOpg+feg3gXGCRSpOAwKJvC8k2g/r4KpiEUnJDNAnw== X-Received: by 2002:a05:600c:15c3:b0:3d1:c8e4:48d7 with SMTP id v3-20020a05600c15c300b003d1c8e448d7mr40676661wmf.40.1672827020575; Wed, 04 Jan 2023 02:10:20 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id l42-20020a05600c1d2a00b003d23928b654sm55767522wms.11.2023.01.04.02.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 02:10:20 -0800 (PST) In-Reply-To: (Jean Louis's message of "Wed, 4 Jan 2023 11:43:41 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=rpluim@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:302221 Archived-At: >>>>> On Wed, 4 Jan 2023 11:43:41 +0300, Jean Louis said: Jean> * Stefan Kangas [2023-01-03 18:35]: >> Robert Pluim writes: >>=20 >> >>>>>> On Thu, 16 Sep 2021 03:38:53 -0400 (EDT), stefankangas@gmail.= com (Stefan Kangas) said: >> > Stefan> * src/fns.c (Fyes_or_no_p): Doc fix to reflect tha= t a trailing space >> > Stefan> is no longer needed; one is added or removed autom= atically. >> > >> > I just tested this on master, and I don=CA=BCt think this is qute = accurate: >>=20 >> Hmm, I guess you're right. Not sure what I was smoking: >>=20 >> > - `y-or-n-p' will append a space if there is one >> > - it won=CA=BCt remove one >>=20 >> (y-or-n-p "foo") =3D> prompt is "foo (y or n) " >> (y-or-n-p "foo ") =3D> prompt is "foo (y or n) " >>=20 >> > - `yes-or-no-p' never modifies the passed prompt >>=20 >> (yes-or-no-p "foo") =3D> prompt is "foo(yes or no) " >> (yes-or-no-p "foo ") =3D> prompt is "foo (yes or no) " >>=20 >> I think the best fix here is to change `yes-or-no-p' to work the same >> way as `y-or-n-p'. Jean> At least one space shall be there, but please don't remove traili= ng Jean> spaces, as that is users' choice, so that following unusual examp= le Jean> may work: Jean> (y-or-n-p " Are you sure? = ") You mean 'yes-or-no-p', right? =F0=9F=98=BA That=CA=BCs the historical behaviour, I don=CA=BCt see a strong case for changing it (but `yes-or-no-p' should be fixed to add a space if there isn=CA=BCt one). Robert --=20