From: Eli Zaretskii <eliz@gnu.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 7617@debbugs.gnu.org
Subject: bug#7617: 24.0.50; `expand-file-name': removal of slashes
Date: Mon, 13 Dec 2010 00:17:44 -0500 [thread overview]
Message-ID: <E1PS0nA-0006i0-MK@fencepost.gnu.org> (raw)
In-Reply-To: <9CD33585D0844F0D957F8D72E13087B7@us.oracle.com> (drew.adams@oracle.com)
> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <7617@debbugs.gnu.org>
> Date: Sun, 12 Dec 2010 14:35:20 -0800
>
> So the question for `expand-file-name' is what kind of file-name
> arguments is it supposed to handle - what are the arguments to
> `expand-file-name' expected to be?
For predictable behavior, the argument must have semantics of a valid
file name for the underlying filesystem. In particular, a series of
slashes is interpreted as the filesystem would interpret them.
> Besides a workable but ugly replace-regexp-in-string hack that saves
> and restores consecutive slashes around a call to
> `expand-file-name', I don't see a good way to do that.
If you seek suggestions for how to solve your problem in a non-ugly
way, please tell more about the problem. It's clear that one
_solution_ to that problem is to have the old behavior of
expand-file-name. But that behavior is gone and will not come back.
To suggest other solutions, we need to understand the problem.
> And also in this case - i.e., if it is decided that the input args
> must be acceptable to the file system, that constraint on the args
> should be documented.
I think that saying "file names" is enough for a doc string--after
all, every programmer knows what is a valid file name. The ELisp
manual says a few more words about that. Putting this kind of detail
into a doc string of every file-oriented function would be excessive.
> And we should say what the function
> does/returns otherwise (e.g., say that it is undefined - i.e., that
> it is defined only in the case where the args are acceptable names
> for the file system). If we tell users that the args must be of a
> form acceptable by the current file system, then we should also tell
> them what happens otherwise (raise an error?...).
If the argument doesn't have a valid file-name semantics, all bets are
off.
next prev parent reply other threads:[~2010-12-13 5:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-11 21:53 bug#7617: 24.0.50; `expand-file-name': removal of slashes Drew Adams
2010-12-12 15:58 ` Eli Zaretskii
2010-12-12 18:03 ` Drew Adams
2010-12-12 19:33 ` Eli Zaretskii
2010-12-12 20:21 ` Drew Adams
2010-12-12 20:32 ` Eli Zaretskii
2010-12-12 20:36 ` Drew Adams
2010-12-12 20:42 ` Andreas Schwab
2010-12-13 3:53 ` Stefan Monnier
2010-12-13 4:32 ` Drew Adams
2010-12-13 5:23 ` Eli Zaretskii
2010-12-13 14:51 ` Drew Adams
2010-12-13 15:17 ` Eli Zaretskii
2010-12-13 15:47 ` Drew Adams
2010-12-13 16:17 ` Eli Zaretskii
2010-12-13 20:40 ` Stefan Monnier
2010-12-12 22:35 ` Drew Adams
2010-12-12 23:40 ` Andreas Schwab
2010-12-13 5:17 ` Eli Zaretskii [this message]
2010-12-13 14:51 ` Drew Adams
2010-12-12 20:15 ` Andreas Schwab
2010-12-12 20:25 ` Drew Adams
2010-12-12 20:36 ` Andreas Schwab
2010-12-12 20:42 ` Drew Adams
2010-12-12 21:00 ` Andreas Schwab
2010-12-13 0:49 ` Jason Rumney
2010-12-12 20:39 ` Eli Zaretskii
2010-12-12 21:04 ` Andreas Schwab
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=E1PS0nA-0006i0-MK@fencepost.gnu.org \
--to=eliz@gnu.org \
--cc=7617@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).