From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: file-exists-p on empty string Date: Wed, 27 Feb 2019 14:01:10 -0800 (PST) Message-ID: <67a382a2-5ad0-4c97-9123-7f1e7c7dae35@default> References: <6C8B93F1-4549-4223-AD3D-58A8CF28A97C@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130330"; mail-complaints-to="usenet@blaine.gmane.org" To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 27 23:02:09 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz7HE-000XmH-4A for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 23:02:08 +0100 Original-Received: from localhost ([127.0.0.1]:51275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz7HD-0003JV-6R for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 17:02:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gz7GP-0003I2-TE for emacs-devel@gnu.org; Wed, 27 Feb 2019 17:01:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gz7GN-0006Y8-QJ for emacs-devel@gnu.org; Wed, 27 Feb 2019 17:01:16 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:36312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gz7GN-0006XF-EY for emacs-devel@gnu.org; Wed, 27 Feb 2019 17:01:15 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1RLrjnE123791; Wed, 27 Feb 2019 22:01:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=CBOsTvrb1KA4wqEhzwWbxRkuEsdvAc9f9UO8bH+cyo8=; b=PjMKHgaqThKU1WZrZXkRljztBFhBu3nmtJZcyvj8y/o8VV62m9s8sZ1ostt0lvBrnAUN rdD3E1kKBfl3rYywejnl1Pxa9E4Z89v+VbvyPZCOniQdbz9J1wDpfbT8LcVLYyiIiFkY yL2HsWsg9bHQoVOwWyKil/Rcf38k7v3jFnFZ1wab7ncpIiZ4QwrAtYoKAQzKEXHwNTyw INhXgb1VBtv3BeG1SMgBDa8azn++uiod++/uVGeXA0n53dhEqp+Jl3cd15DVaXg46pJP LEuE4NfrEPLQbRTkAnEXPblqZxYX7ojZqcT3E/dYIFYFzSaq5Ig2ZarWWubIl7ayyf93 kg== Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2qtwkudkqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Feb 2019 22:01:12 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1RM1CDf004597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Feb 2019 22:01:12 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1RM1A2N026975; Wed, 27 Feb 2019 22:01:11 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4810.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9180 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902270143 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233681 Archived-At: > > I gree, but there is not a line about empty strings in doc-string. > > It is great that this is mentioned in documentation, but anyway > > behaviour was quite unexpected >=20 > The problem is that docstrings describe the behavior of a specific > function, so they usually don't mention the more general aspects that > affect all functions of a given subsystem, such as here the general > treatment of the empty string when used as a file name. >=20 > Otherwise, every file-name-manipulating function would have to repeat > this information in its docstring. Every such function _should_ have this info in its doc string. There's no reason not to. In terms of the _implementation_ this might be a "general aspect that affects all functions of a given subsystem". But in terms of the doc for a given such function this is not (only) a general subsystem aspect - it is part of the individual function's definition & description. Even if this weren't such a gotcha, the doc for the function should describe the return value, including for any particular input cases. A user might well start with `C-h f', and not with some reading of the general-subsystem doc (assuming there is such doc). Such info is pretty important to understanding the particular function.