GNU bug report logs -
#54191
26.3; (elisp) `Magic File Names' FILENAME parameters: absolute names?
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sun, 27 Feb 2022 22:22:01 UTC
Severity: normal
Found in version 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #49 received at 54191 <at> debbugs.gnu.org (full text, mbox):
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "54191 <at> debbugs.gnu.org" <54191 <at> 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.
This bug report was last modified 3 years and 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.