From: Eli Zaretskii <eliz@gnu.org>
To: Richard Copley <rcopley@gmail.com>
Cc: 24387@debbugs.gnu.org
Subject: bug#24387: 25.1.50; w32-convert-standard-filenames no longer works
Date: Wed, 07 Sep 2016 19:30:06 +0300 [thread overview]
Message-ID: <83h99rad0x.fsf@gnu.org> (raw)
In-Reply-To: <CAPM58oh-eGdhuBZOuOyvOCRjsGPmPKyKU1xwKX9YgbcACOq6PQ@mail.gmail.com> (message from Richard Copley on Wed, 7 Sep 2016 16:59:56 +0100)
> From: Richard Copley <rcopley@gmail.com>
> Date: Wed, 7 Sep 2016 16:59:56 +0100
> Cc: 24387@debbugs.gnu.org
>
> >> It was explicitly documented that it would work,
> >> and it still is (see the docstring for `convert-standard-filename').
> >
> > Oops! Will fix, thanks.
Done.
> In fact I sometimes modify `exec-path' at runtime (in a fairly controlled
> manner, but it's not something I'd inflict on other users); for the sake
> of subprocesses, I also set the PATH environment variable in Emacs
> correspondingly, using `convert-standard-filename' and `path-separator'
Not sure why you'd need to use convert-standard-filename for PATH:
that variable holds the original Windows directory names with
backslashes. If you add to it directories you added to exec-path,
then you could simply add directories with backslashes to exec-path,
which then won't need to be mirrored.
> > I'm not sure what to say in the doc string. On the one hand, the
> > function is not to be used in preparation of shell commands, so
> > talking about shell commands there would be wrong, IMO. OTOH,
> > replacing one character with another is a trivial operation in Emacs,
> > something like
> >
> > (setq start 0)
> > (while (string-match "/" name start)
> > (aset name (match-beginning 0) ?\\)
> > (setq start (match-end 0))))
> >
> > should be all you need.
> >
> > I could add the above snippet to the NEWS entry that announces the
> > change; would that be good enough?
>
> Up to you; if you want to help out other people who made the same
> mistake, I expect they'd appreciate it.
I added that to NEWS.
> The function `cygwin-convert-file-name-to-windows' exists.
> Maybe you'd consider including that function(ality) in non-cygwin
> builds, with an alias ((w32-)convert-file-name-to-windows?). It could
> be documented in the same footnote; I think that's where it would be
> easiest to discover.
cygwin-convert-file-name-to-windows relies on an internal Cygwin
function that doesn't exist on native Windows, so it must be
Cygwin-specific. In addition, it goes through 2 encoding conversions,
something that IMO is overkill for a simple job of mirroring slashes.
(For Cygwin, I guess this is justified because of the /cygdrive/
magic, but we don't need that here.)
Thanks. Unless you (or someone else) have further comments, I will
mark this bug done.
next prev parent reply other threads:[~2016-09-07 16:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 9:52 bug#24387: 25.1.50; w32-convert-standard-filenames no longer works Richard Copley
2016-09-07 14:26 ` Eli Zaretskii
2016-09-07 15:59 ` Richard Copley
2016-09-07 16:30 ` Eli Zaretskii [this message]
2016-09-07 18:59 ` Richard Copley
2016-09-07 16:19 ` Noam Postavsky
2016-09-07 17:13 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h99rad0x.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=24387@debbugs.gnu.org \
--cc=rcopley@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.