From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: autoload failure Date: Mon, 1 Nov 2004 02:46:27 +0100 Message-ID: <082f01c4bfb4$a3f3aa10$0200a8c0@sedrcw11488> References: <20041027.153921.207585531.Takaaki.Ota@am.sony.com> <418024BE.9080007@wyrdrune.com> <20041029.093701.207586096.Takaaki.Ota@am.sony.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1099273615 16658 80.91.229.6 (1 Nov 2004 01:46:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Nov 2004 01:46:55 +0000 (UTC) Cc: guy@wyrdrune.com, Tak Ota , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 01 02:46:43 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CORHP-0006ac-00 for ; Mon, 01 Nov 2004 02:46:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CORPN-0005gh-OV for ged-emacs-devel@m.gmane.org; Sun, 31 Oct 2004 20:54:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CORPG-0005gZ-Ni for emacs-devel@gnu.org; Sun, 31 Oct 2004 20:54:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CORPG-0005gM-5V for emacs-devel@gnu.org; Sun, 31 Oct 2004 20:54:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CORPG-0005g2-1k for emacs-devel@gnu.org; Sun, 31 Oct 2004 20:54:50 -0500 Original-Received: from [81.228.11.110] (helo=av3-2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CORHD-0005MH-Py; Sun, 31 Oct 2004 20:46:32 -0500 Original-Received: by av3-2-sn1.fre.skanova.net (Postfix, from userid 502) id 1FE4C384BD; Mon, 1 Nov 2004 02:46:31 +0100 (CET) Original-Received: from smtp3-1-sn1.fre.skanova.net (smtp3-1-sn1.fre.skanova.net [81.228.11.163]) by av3-2-sn1.fre.skanova.net (Postfix) with ESMTP id 12B2837EE2; Mon, 1 Nov 2004 02:46:31 +0100 (CET) Original-Received: from sedrcw11488 (t2o58p204.telia.com [62.20.165.204]) by smtp3-1-sn1.fre.skanova.net (Postfix) with SMTP id 9117A37E42; Mon, 1 Nov 2004 02:46:28 +0100 (CET) Original-To: "Stefan" , "Jason Rumney" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29252 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29252 ----- Original Message ----- From: "Stefan" : >>>>> "Stefan" == Stefan 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/")