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#54191: [External] : Re: bug#54191: 26.3; (elisp) `Magic File Names' FILENAME parameters: absolute names? Date: Mon, 28 Feb 2022 19:44:14 +0200 Message-ID: <8335k2naxd.fsf@gnu.org> References: <83h78jm7cl.fsf@gnu.org> <837d9flyo4.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1302"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54191@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 28 18:45:28 2022 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 1nOk5O-00005D-Jo for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Feb 2022 18:45:26 +0100 Original-Received: from localhost ([::1]:57266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOk5M-0000ft-VH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Feb 2022 12:45:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOk50-0000fk-BU for bug-gnu-emacs@gnu.org; Mon, 28 Feb 2022 12:45:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOk4z-0006NT-QB for bug-gnu-emacs@gnu.org; Mon, 28 Feb 2022 12:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOk4z-0006RK-P5 for bug-gnu-emacs@gnu.org; Mon, 28 Feb 2022 12:45:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Feb 2022 17:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54191 X-GNU-PR-Package: emacs Original-Received: via spool by 54191-submit@debbugs.gnu.org id=B54191.164607027224697 (code B ref 54191); Mon, 28 Feb 2022 17:45:01 +0000 Original-Received: (at 54191) by debbugs.gnu.org; 28 Feb 2022 17:44:32 +0000 Original-Received: from localhost ([127.0.0.1]:34707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOk4V-0006QH-KV for submit@debbugs.gnu.org; Mon, 28 Feb 2022 12:44:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOk4U-0006Q5-61 for 54191@debbugs.gnu.org; Mon, 28 Feb 2022 12:44:30 -0500 Original-Received: from [2001:470:142:3::e] (port=45252 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOk4O-0006HF-IG; Mon, 28 Feb 2022 12:44:24 -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=y8OP8RuDFNZWMkSmfwMN94VUSVtNne2zDlnRyvKuIX4=; b=BL6m9Icwq0UO hqsQ6wGOWNUsn2Lba1sTMSFmclYHWRJCL62L0CgkI47Byt+vVHDN+MC8jRxvdCRY8ffmHAyZdhe+z y4gjwssJXpV/umW5Ihea5RrfT4MTt8AL79ALt00aIIHFg3l0Ddopti8ACV3uMzoMe5srqrJh07tf7 fm82R8/2ZbmWXRXtMY2Efx2c9+7fdHe2IQRnkcQppSW3gkVQwZO1ofLX7OE3tc415nU/LGJK/jTP/ KHcneSP1MqWUdsW0Ad+nzmV0z0FamEk/peUsnZcxMbTjqlj2W14fk4UnZsluz+QNyrJuKwz5M4Ule bgLFsDlVw4AhOhrnOH4svw==; Original-Received: from [87.69.77.57] (port=1641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOk4O-0005Qs-0r; Mon, 28 Feb 2022 12:44:24 -0500 In-Reply-To: (message from Drew Adams on Mon, 28 Feb 2022 17:22:09 +0000) 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" Xref: news.gmane.io gmane.emacs.bugs:227843 Archived-At: > From: Drew Adams > CC: "54191@debbugs.gnu.org" <54191@debbugs.gnu.org> > Date: Mon, 28 Feb 2022 17:22:09 +0000 > > > > > Did you follow the cross-reference? Because there you'd find the > > > > answer to your question, loud and clear. > > > > > > I don't think it does. No mention of absolute or > > > relative in that node. > > > > It _shows_ them. > > I don't see any showing of a relative file name. Exactly. > > > And it's not just about `file-remote-p'. The > > > problem is more general, as reported. And the > > > general problem involves doc strings and manual. > > > > There's no more general problem here. > > FILENAME in `Remote Files' > FILENAME and FILE in `Magic File Names' > FILENAME in `Visiting Functions' > FILENAME in `Subroutines of Visiting' > FILENAME in `Saving Buffers' > FILENAME in `Reading from Files' > FILENAME in `Writing to Files' > FILENAME and FILE in `File Locks' > ... > and so on - lots of places. These are just references to file names. How is that a problem? > Similarly, doc strings of functions that > accept file-name args. It's _not_ obvious > what the behavior is. When you type a file name as an argument to a shell command, like this: my-program my-file what do you expect my-program to do when my-file is not an absolute file name? How do you expect it to interpret such a file name? > And yes, some functions do automatically > apply `expand-file-name' to a FILE(NAME) arg. Some? Anyway, that's the implementation. We aren't talking about the implementation. > The question of whether a function does that, > and more generally how a function handles a > relative vs absolute file-name arg, is not > nothing. >From "File Names" in the Emacs user manual: Emacs always assumes that any relative file name is relative to the default directory, e.g., entering a file name without a directory specifies a file in the default directory. This is so central to Emacs handling of file names that I'm astonished that someone who uses Emacs and programs for Emacs for so many years doesn't know that.