From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: file-exists-p on empty string Date: Wed, 27 Feb 2019 22:24:12 -0500 Message-ID: References: <6C8B93F1-4549-4223-AD3D-58A8CF28A97C@gmail.com> <67a382a2-5ad0-4c97-9123-7f1e7c7dae35@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="161823"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 04:24:58 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 1gzCJd-000fq2-3h for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2019 04:24:57 +0100 Original-Received: from localhost ([127.0.0.1]:59494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzCJb-0008Uv-UW for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2019 22:24:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzCIz-0008Uc-A3 for emacs-devel@gnu.org; Wed, 27 Feb 2019 22:24:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzCIy-0007DY-7y for emacs-devel@gnu.org; Wed, 27 Feb 2019 22:24:17 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzCIx-00077S-Tc for emacs-devel@gnu.org; Wed, 27 Feb 2019 22:24:16 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1S3OCE7030249; Wed, 27 Feb 2019 22:24:12 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 44FEB69F63; Wed, 27 Feb 2019 22:24:12 -0500 (EST) In-Reply-To: <67a382a2-5ad0-4c97-9123-7f1e7c7dae35@default> (Drew Adams's message of "Wed, 27 Feb 2019 14:01:10 -0800 (PST)") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6492=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7025> : streams <1814309> : uri <2803453> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:233690 Archived-At: > 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. By the same reasoning, file-exists-p should explain that filenames are represented as strings, and that if a file-name is not absolute it will be interpreted according to default-directory, and that it is subject to file-name-handlers-alist, and `file-attributes` should additionally explain how &optional arguments are passed, ... So, yes, there is a reason not to: it's because duplicating such info in every docstrings is madness. Maybe a more sane way to provide a similar information would be to make "filename" (in the docstring) into a hyperlink to the Elisp refman that describes how file names work (including things like "", file-name-handlers-alist, and default-directory). Stefan