unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54191: 26.3; (elisp) `Magic File Names' FILENAME parameters: absolute names?
@ 2022-02-27 21:30 Drew Adams
  2022-02-27 22:42 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Drew Adams @ 2022-02-27 21:30 UTC (permalink / raw)
  To: 54191

I check this Elisp manual node for `file-remote-p'.  I try to figure out
just what kind of file name is expected by the function.  No clue.  Same
thing when I check the `C-h f' help (where the arg is called FILE).

How am I to know what kind of file name needs to be passed to this
function, e.g., whether I might need to first use `expand-file-name'?

There might be more nodes with this problem under node `Files'; dunno.
But at least please check this node and make its occurrences of FILENAME
parameters clear in this regard.
___

From the `C-h f' help I follow the files.el link to the `file-remote-p'
definition.  There I see that `find-file-name-handler' accepts the arg
FILE.  So the question then becomes what kind of file name (absolute or
not) is expected/accepted by `find-file-name-handler'.

`C-h f find-file-name-handler', likewise, says nothing about whether
the name needs to be absolute.  I look in the manual again, at a higher
level, node `Files', hoping to maybe see some intro text saying that,
by default, when the doc here talks about a file name it means an
absolute file name (or a relative file name) - something, to let me
know how to interpret all of the many references to file names in the
13 child nodes of node `Files'.  I find no such general statement.

If there is no general statement about how to understand a FILENAME
arg then the description of each function that accepts a FILENAME arg
should make clear what kind of name is expected.  (And that's anyway
preferable to expecting a reader to have come across a general default
statement of how such parameters are to be understood.
___

Grepping the Elisp sources, and looking for `expand-file-name', I came
across this in the definition of command `cd':

(and (file-remote-p (expand-file-name dir))
     (file-accessible-directory-p (expand-file-name dir))
     (expand-file-name dir))

And that leads me to believe that `file-remote-p' doesn't, itself,
expand the FILENAME argument.  This info shouldn't be so hard to find.
The descriptions of functions that accept a file-name arg should say
whether they expect an absolute file name.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19043
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-03-01 11:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-27 21:30 bug#54191: 26.3; (elisp) `Magic File Names' FILENAME parameters: absolute names? Drew Adams
2022-02-27 22:42 ` Drew Adams
2022-02-28  8:03   ` Michael Albinus
2022-02-28 16:26     ` bug#54191: [External] : " Drew Adams
2022-03-01 11:55       ` Michael Albinus
2022-02-28 13:48   ` Eli Zaretskii
2022-02-28 16:26     ` bug#54191: [External] : " Drew Adams
2022-02-28 16:57       ` Eli Zaretskii
2022-02-28 17:22         ` Drew Adams
2022-02-28  9:33 ` Lars Ingebrigtsen
2022-02-28 16:28   ` bug#54191: [External] : " Drew Adams
2022-02-28 13:46 ` Eli Zaretskii
2022-02-28 16:26   ` bug#54191: [External] : " Drew Adams
2022-02-28 16:54     ` Eli Zaretskii
2022-02-28 17:22       ` Drew Adams
2022-02-28 17:44         ` Eli Zaretskii
2022-02-28 18:32           ` Drew Adams
2022-02-28 18:49             ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).