unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 54191@debbugs.gnu.org
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	[thread overview]
Message-ID: <8335k2naxd.fsf@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB54886A4D8371F706309350FEF3019@SJ0PR10MB5488.namprd10.prod.outlook.com> (message from Drew Adams on Mon, 28 Feb 2022 17:22:09 +0000)

> From: Drew Adams <drew.adams@oracle.com>
> 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.





  reply	other threads:[~2022-02-28 17:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-02-28 18:32           ` Drew Adams
2022-02-28 18:49             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8335k2naxd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=54191@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).