From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24387: 25.1.50; w32-convert-standard-filenames no longer works Date: Wed, 07 Sep 2016 19:30:06 +0300 Message-ID: <83h99rad0x.fsf@gnu.org> References: <83oa3zaiqw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473265903 21847 195.159.176.226 (7 Sep 2016 16:31:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 16:31:43 +0000 (UTC) Cc: 24387@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 07 18:31:36 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhfkx-0003UU-7F for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Sep 2016 18:31:23 +0200 Original-Received: from localhost ([::1]:41969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfkv-00039t-1Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Sep 2016 12:31:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfkl-00039B-V0 for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2016 12:31:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhfkc-0000to-H9 for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2016 12:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfkc-0000tk-E2 for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2016 12:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bhfkc-0004ZL-6P for bug-gnu-emacs@gnu.org; Wed, 07 Sep 2016 12:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Sep 2016 16:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24387 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24387-submit@debbugs.gnu.org id=B24387.147326583917529 (code B ref 24387); Wed, 07 Sep 2016 16:31:02 +0000 Original-Received: (at 24387) by debbugs.gnu.org; 7 Sep 2016 16:30:39 +0000 Original-Received: from localhost ([127.0.0.1]:52842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhfkF-0004Yf-3H for submit@debbugs.gnu.org; Wed, 07 Sep 2016 12:30:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhfkD-0004YS-IF for 24387@debbugs.gnu.org; Wed, 07 Sep 2016 12:30:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhfk3-0000oM-Rn for 24387@debbugs.gnu.org; Wed, 07 Sep 2016 12:30:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfk3-0000oI-O1; Wed, 07 Sep 2016 12:30:27 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2163 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bhfk1-0003iC-Jx; Wed, 07 Sep 2016 12:30:27 -0400 In-reply-to: (message from Richard Copley on Wed, 7 Sep 2016 16:59:56 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123062 Archived-At: > From: Richard Copley > 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.