From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: Technically correct or conceptually easier? Date: Fri, 3 Apr 2020 19:09:11 -0700 Message-ID: References: <87ftdlab7g.fsf@oitofelix.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bc066305a26d8573" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="26670"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Bruno_F=C3=A9lix_Rezende_Ribeiro?= , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 04:09:57 2020 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 1jKYFx-0006rQ-GD for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 04:09:57 +0200 Original-Received: from localhost ([::1]:34588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKYFw-00047n-JN for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 22:09:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59381) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKYFT-0003dd-Ly for emacs-devel@gnu.org; Fri, 03 Apr 2020 22:09:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKYFS-00048v-Hi for emacs-devel@gnu.org; Fri, 03 Apr 2020 22:09:27 -0400 Original-Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]:41350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jKYFQ-00045l-Kg; Fri, 03 Apr 2020 22:09:24 -0400 Original-Received: by mail-yb1-xb2f.google.com with SMTP id t10so5331868ybk.8; Fri, 03 Apr 2020 19:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rTPiJXyA/XFGKXjVyN96gS/5HXKJm/cpzZrqitPVSsI=; b=mqhvzKYNXO2Bsft+2dQQ8l1ZLD5Azy0V5P+UX5BH4G1Nlbx3J+wXWkT6jNY1SOgg0v VsMltoBJjI1NJRyfdM7gubDSWhTI8cHjw6PGqqUmZU5vzV/ZJ+KUBo+ooSq4BHCiXLPC Nvgvk/GODEdm2qkAO9wu5flLacU4xrfNwQ7hbld9o72cGdmfBR7RRKApiCFmwcvGRGFE /I/AhMN5clwuewLSWDozoRZbMoSheF3IbdbTb5Q2bzXtupCMonPRErCdcz2uIBM5mK7d rJ/dmYLo2L6w4GOHtxVymkKD6mXR7Jfgu70d36kbKPFo80d2QMN0+2hrCqvf4XEVJ/Ue ivfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rTPiJXyA/XFGKXjVyN96gS/5HXKJm/cpzZrqitPVSsI=; b=S9uJl7f4nhGS/rwF0W+g2owGP3yBlOHSvxO5YRY5gXCxyGZtSw32+UUCuz7rmGc8B/ s8QcyfGnK12/+o24vEQL3Nx0TyKz9nPMx+ZZULPqRi3h6jrwt2RnIHxyO0zGcUOlRB7u 7IN+JhjV6WYsi/fG9R9qzrfcnGutIUf29zJPoW1NpKMXktIeEifmumLGUk9tkFt+cQ0I gZRfoDhucP3ODnQOAOAHXdthsvD1bC0Q6tro4sIVcdXlEU6BKCh7sd0VxX6pgV6Bl8DI yvQ0BdXj6tdk4XcAu4LNdmzC+Cqtx2WHADYT0ff5n4RLfBqlkWmqlmMxWKy5ozr9ocJY PfIA== X-Gm-Message-State: AGi0PuYPBP+RZv0uA7N2EmiMStShv5ZJ5V92nebIzInt/VC7RUaNnI1S fTk654lOEkW1W5ufWaEgdtIjWTO+AqjViU8o1lM= X-Google-Smtp-Source: APiQypI/i1tc9cNjM/q5LkgDTGY4oyim+n6qMpAqRVMtZcuFM1ALffvZEcap20wRC9rh9zTX1cd6MIG5i5jFGI4Um3M= X-Received: by 2002:a25:ca41:: with SMTP id a62mr20379335ybg.105.1585966162379; Fri, 03 Apr 2020 19:09:22 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b2f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:246371 Archived-At: --000000000000bc066305a26d8573 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable As a practical matter, could this specific instance be addressed by something like "...if the value is a (non-nil) list, ...."? On Thu, Apr 2, 2020 at 2:22 PM Stefan Monnier wrote: > > The first sentence of the documentation says: > > > > Non-nil means disregard read-only status of buffers or characters. > > > > OK. And what nil means? I guess the omission of its meaning implies > > its meaning is the exact opposite of the one given to a non-nil value; > > and apparently this conjecture can be factually verified by > > experimentation. > > Yes, we often rely on the abuse of "if" to mean "if and only if". > Usually those abuses allow for less verbose text, so there's > a trade-off. I think here the trade-off is worthwhile. At some other > places we correctly add an explicit mention of what happens if it's nil. > And of course at yet other places we made the wrong call :-( > > > If the value is a list, disregard =E2=80=98buffer-read-only=E2=80=99 = and disregard a > > =E2=80=98read-only=E2=80=99 text property if the property value is a = member of the > > list. > > > > Well, nil is a list. > > I think this case is a documentation error: it should say "a non-empty > list", although admittedly, the context makes it clearish what is meant. > > > Stefan "who likes `iff`" > > > --000000000000bc066305a26d8573 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As a practical matter, could this specific instance be add= ressed by something like "...if the value is a (non-nil) list, ....&qu= ot;?

On Thu, Apr 2, 2020 at 2:22 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> The first sentence of t= he documentation says:
>
>=C2=A0 =C2=A0Non-nil means disregard read-only status of buffers or cha= racters.
>
> OK.=C2=A0 And what nil means?=C2=A0 I guess the omission of its meanin= g implies
> its meaning is the exact opposite of the one given to a non-nil value;=
> and apparently this conjecture can be factually verified by
> experimentation.

Yes, we often rely on the abuse of "if" to mean "if and only= if".
Usually those abuses allow for less verbose text, so there's
a trade-off.=C2=A0 I think here the trade-off is worthwhile.=C2=A0 At some = other
places we correctly add an explicit mention of what happens if it's nil= .
And of course at yet other places we made the wrong call :-(

>=C2=A0 =C2=A0If the value is a list, disregard =E2=80=98buffer-read-onl= y=E2=80=99 and disregard a
>=C2=A0 =C2=A0=E2=80=98read-only=E2=80=99 text property if the property = value is a member of the
>=C2=A0 =C2=A0list.
>
> Well, nil is a list.

I think this case is a documentation error: it should say "a non-empty=
list", although admittedly, the context makes it clearish what is mean= t.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan "who likes `iff`"


--000000000000bc066305a26d8573--