[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Win32 Cywin/dos TAB completion support
From: |
Jason Rumney |
Subject: |
Re: [PATCH] Win32 Cywin/dos TAB completion support |
Date: |
31 Jan 2002 22:19:21 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.80 |
address@hidden (Jari Aalto+mail.emacs) writes:
I don't really understand the comint code, so I don't think I'm the
right person to check this over thoroughly. But here are some
comments from what I could understand.
> --- 2705,2781 ----
> (message "Completing file name..."))
> (comint-dynamic-complete-as-filename)))
>
> + (defun comint-directory-sep-char ()
> + "Return appropriate `directory-sep-char' which see.
> + The value depends on the current value of `shell-file-name'.
> + If this is cmd.*exe, then suppose w32 type dos shell."
> + ;; The shel may also be Vygwin based bash.exe, but for
> + ;; cmd.exe, cmdproxy.exe and the like, the separatr must be \
> + (if (w32-system-shell-like-p (file-name-nondirectory shell-file-name))
> + ?\\
> + ?/))
I think there should be a test for (eq system-type 'windows-nt) in
there, to avoid unnecessarily loading w32-fns.el on non-Windows
systems.
> + (let ((w32-p (w32-system-shell-like-p
Likewise.
> ! (cygwin-p (and (memq system-type '(windows-nt ms-dos))
> ! (w32-cygwin-path-p filename)))
I don't think the DOS port supports the Cygwin shell. Eli can
probably say for sure. If it does support it, then the functions you
have added to w32-fns.el should be moved to dos-w32.el. If it doesn't,
then the condition above should not include ms-dos.
> *** /cygdrive/h/bin/emacs/gnu-emacs/emacs-21.1/lisp/dirtrack.el Wed Jan
> 16 10:37:40 2002
While looking at this file, I noticed that the default value of
dirtrack-list seem to assume a DOS/Windows style path. I think this
should change, since the overwhelming majority of Emacs users would
have to customize that variable. It may be possible to detect based
on shell-file-name and default to appropriate value, if not the
default should be suitable for posix shells.
> *** /cygdrive/h/bin/emacs/gnu-emacs/emacs-21.1/lisp/w32-fns.el Wed Jan
> 16 10:37:48 2002
> + (defun w32-cygwin-bash ()
I think rather than defining a new non-standard function, it is better
to make M-x shell DTRT when bash (or other unix-like shells) are used on
Windows. Or if that is not possible, provide a function that does all
the setup (but does not run shell) that can be run once from .emacs to
get the correct behaviour from M-x shell.
> + (defun w32-system-shell-like-p (shell-name)
> + "Check if SHELL-NAME is native windows (dos) type shell."
> + (let((w32-system-shells (append ;; Include Eamcs dos-shell too.
> + (list
> + "cmdproxy.exe"
> + "cmdproxy")
> + w32-system-shells)))
> + (w32-system-shell-p shell-name)))
Perhaps w32-system-shells should include cmdproxy by default. Are
there other uses of w32-system-shells that expect cmdproxy to not be
listed there?
--
Jason Rumney