From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: expand-file-name, DOS/Windows, and directory separator
Date: Tue, 15 Feb 2022 09:59:53 -0800 [thread overview]
Message-ID: <87czjodn8m.fsf@ericabrahamsen.net> (raw)
Hi,
My reading of `expand-file-name' (I don't really speak C) is that, if we
run it over a file path produced by an external process on a Windows
machine -- meaning path strings where the directory separator might be a
backward slash -- it will normalize that separator to a unix-style
forward slash. It looks like fileio.c:1247 calls dostounix_filename, and
I'm assuming that's what that does.
Is that a correct assumption? Can I rely on that behavior? Again this
isn't a file path produced by an Emacs function like `directory-files',
but by an external process returning a list of file names into a process
buffer.
TIA,
Eric
next reply other threads:[~2022-02-15 17:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 17:59 Eric Abrahamsen [this message]
2022-02-15 18:38 ` expand-file-name, DOS/Windows, and directory separator Stefan Monnier
2022-02-15 19:39 ` Eric Abrahamsen
2022-02-15 19:57 ` Eli Zaretskii
2022-02-15 20:15 ` Eric Abrahamsen
2022-02-15 20:24 ` Eli Zaretskii
2022-02-15 20:46 ` Eric Abrahamsen
2022-02-15 21:51 ` Stefan Monnier
2022-02-15 23:03 ` Eric Abrahamsen
2022-02-15 19:15 ` 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=87czjodn8m.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-devel@gnu.org \
/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).