Re: /cygdrive/c vs c:\
[email protected] (Nickolay Pakoulin)
| Newsgroups | gmane.emacs.xemacs.windows |
|---|---|
| Message-ID | <[email protected]> |
Hello, Mats! Try the code attached to the end of the message. It provides transparent changes of "/cygdrive/c" to "c:\" in lisp code. ;; Usage: ;; Place the library in your load-path and add the following lines ;; to your init file: ;; (when (eq system-type 'windows-nt) ;; (autoload 'npak-cygwin-file-handler-function "npak-cygwin") ;; (push (cons "\\`/cygdrive/\\([a-zA-Z]\\)\\(/\\|$\\)" ;; 'npak-cygwin-file-handler-function) ;; file-name-handler-alist)) ;; If CYGWIN prefix in not /cygdrive on your system then modify regular ;; expression in the sample above AND `npak-cygwin-drive-re'. The library makes the following to work: (find-file "/cygdrive/c/some-path/some-file.txt") (load-library "/cygdrive/d/some-path/some-lib") (file-truename "/cygdrive/c") => "c:\\" Several limitation: The filename transformation is pure textual. Therefore Cygwin simlinks should not work. it's not that easy to customise the code to recognize Cygwin prefix other then /cygdrive/ Interactive read of Cygwin file names might work in a strange way sometimes. Nick. intro: "MO" == Mats Oberg <[email protected]> writes: MO> Hope this list is still alive, despite all spam. I recently re-installed MO> Xemacs 21.4.13 native for windows 2000. I have a problem that it only MO> recognizes c:/ and d:/ type path names, and not /cygdrive/c/, /cygdrive/d MO> etc. In particular difficult since my init.el contains /cygdrive/d/ type MO> path names. MO> I have searched Xemacs documentation and FAQ but have not found any MO> solution. How do I make Xemacs to recognize /cygdrive/d/ as valid path. MO> Thanks MO> Mats Öberg MO> __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - MO> Free, easy-to-use web site design software http://sitebuilder.yahoo.com
npak-cygwin.el
(application/emacs-lisp, 8.2 KB) - not displayed