From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
Cc: guy@wyrdrune.com, Tak Ota <Takaaki.Ota@am.sony.com>, emacs-devel@gnu.org
Subject: Re: autoload failure
Date: Mon, 1 Nov 2004 02:46:27 +0100 [thread overview]
Message-ID: <082f01c4bfb4$a3f3aa10$0200a8c0@sedrcw11488> (raw)
In-Reply-To: m1is8qjx8u.fsf-monnier+emacs@gnu.org
----- Original Message -----
From: "Stefan" <monnier@iro.umontreal.ca>
: >>>>> "Stefan" == Stefan <monnier@iro.umontreal.ca> writes:
: >> The path "/cygdrive/d/pub/emacs" is not valid on Windows. It is an
: >> indication that you are using Cygwin make, which the docs explicitly
: >> say to avoid for this reason.
: > I really think it would be more constructive to add a file-name-handler
: > for "/cygdrive/" seeing how common this kind of problem is (it might at
: > least save us some time replying to such email).
: > Something like the 100% untested patch below,
:
: Has someone tried my patch?
After some small corrections it worked for me with 21.3. Put the code below
in a buffer and do eval-buffer. You should get a buffer visiting
c:\hello.txt. The file name I used in the bottom is an MSYS style file name
(if I remember right at the moment), but the file name pattern should work
for Cygwin style file names too.
Maybe should the the object be renamed to reflect that the code handles MSYS
too?
- Lennart
;;; Try to handle the most common misuses of cygwin paths.
;;(defconst w32-cygdrive-name-regexp "\\`/cygdrive/\\(.\\)/")
(defconst w32-cygdrive-name-regexp "^\\(?:/cygwin\\)?/\\(.\\)/")
;;(defconst w32-cygdrive-name-regexp "^/\\(.\\)/")
(defun w32-cygdrive-run-real-handler (op args)
(let ((inhibit-file-name-handlers
(cons 'w32-cygdrive-name-handler
(if (eq inhibit-file-name-operation op)
inhibit-file-name-handlers)))
(inhibit-file-name-operation op))
(apply op args)))
(defun w32-cygdrive-name-handler (op &rest args)
(message "handler %s %s" op args)
(case op
(expand-file-name
(let ((file (car args))
(args (cdr args)))
(cond
((= 0 (string-match w32-cygdrive-name-regexp file))
(w32-cygdrive-run-real-handler
op (cons (replace-match "\\1:/" t nil file) args)))
((= 0 (string-match w32-cygdrive-name-regexp (car args)))
(w32-cygdrive-run-real-handler
op (list* file (replace-match "\\1:/" t nil (car args))
(cdr args))))
;; This is actually an error (we should never get here),
;; but let's be defensive.
(t (w32-cygdrive-run-real-handler op args)))))
(t (w32-cygdrive-run-real-handler op args))))
(push (cons w32-cygdrive-name-regexp 'w32-cygdrive-name-handler)
file-name-handler-alist)
(find-file "/c/hello.txt/")
next prev parent reply other threads:[~2004-11-01 1:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-27 22:39 autoload failure Tak Ota
2004-10-27 22:44 ` Guy Gascoigne - Piggford
2004-10-27 23:11 ` Tak Ota
2004-10-29 4:32 ` Richard Stallman
2004-10-29 16:37 ` Tak Ota
2004-10-30 14:20 ` Richard Stallman
2004-10-30 16:39 ` Jason Rumney
2004-10-30 17:42 ` Stefan
2004-10-30 18:55 ` Jason Rumney
2004-10-30 20:34 ` Lennart Borgman
2004-10-30 21:10 ` Jason Rumney
2004-10-30 21:56 ` Lennart Borgman
2004-10-31 0:25 ` Stefan
2004-10-31 4:52 ` Eli Zaretskii
2004-10-31 23:15 ` Stefan
2004-11-01 1:46 ` Lennart Borgman [this message]
2004-11-01 17:28 ` Tak Ota
2004-11-01 17:52 ` Jason Rumney
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='082f01c4bfb4$a3f3aa10$0200a8c0@sedrcw11488' \
--to=lennart.borgman.073@student.lu.se \
--cc=Takaaki.Ota@am.sony.com \
--cc=emacs-devel@gnu.org \
--cc=guy@wyrdrune.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.