emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell completion on w32 uses "/" instead of "\"


From: Lennart Borgman
Subject: Re: Shell completion on w32 uses "/" instead of "\"
Date: Tue, 19 Dec 2006 01:23:18 +0100
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Stefan Monnier wrote:
It could, but it doesn't want to.  In Emacs, the canonical directory
separator is / (although \ is made to work as well under w32, for obvious
interoperability reasons).
You make it sound like / and \ both work in Windows, but they don't:

They do if you use another shell ;-)
(IIUC the API-level functions in w32 understand / just fine, it's only
the/some shells which insist on using \ exclusively).

If shell-mode could use backslash when completing on w32 it would be a
lot more useful.

I'll let the w32 people decide.  I was just explaining the
current situation.

It is clearly a bug when using cmd.exe for the shell (cmdproxy.exe really). I think it need to be corrected.

I believe the problem is in comint-dynamic-complete-as-filename. The let variable dirsuffix has a hardcoded "/". Maybe a fix could look like this

    (dirsuffix (cond ((not comint-completion-addsuffix)
              "")
             ((not (consp comint-completion-addsuffix))
                          (if (w32-shell-dos-semantics)
                              "\\"
                            "/"))

but I am not sure at all. Even if this is correct however I think that shell-file-name and explicit-shell-file-name must be made buffer local in the interactive shell buffers. (And did I not mention before that w32-shell-dos-semantics needs to test explicit-shell-file-name too?)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]