From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13921: 24.2; Misbehavior of expand-file-name on Cygwin with Emacs 24.2 Date: Wed, 13 Mar 2013 19:54:36 +0200 Message-ID: <831ubjjicj.fsf@gnu.org> References: <83boapx5jm.fsf@gnu.org> <8338w1x25i.fsf@gnu.org> <831ublx1ng.fsf@gnu.org> <838v5sj6qt.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1363197302 11048 80.91.229.3 (13 Mar 2013 17:55:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 17:55:02 +0000 (UTC) Cc: 13921@debbugs.gnu.org To: gundaetiapo@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 13 18:55:26 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UFptb-000376-76 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2013 18:55:23 +0100 Original-Received: from localhost ([::1]:46970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFptE-0006nx-Sq for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Mar 2013 13:55:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFptA-0006nq-MF for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:54:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFpt9-0000f2-BN for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:54:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFpt9-0000ew-7Z for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:54:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UFpuD-0005oN-Jp for bug-gnu-emacs@gnu.org; Wed, 13 Mar 2013 13:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Mar 2013 17:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13921 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13921-submit@debbugs.gnu.org id=B13921.136319735422327 (code B ref 13921); Wed, 13 Mar 2013 17:56:01 +0000 Original-Received: (at 13921) by debbugs.gnu.org; 13 Mar 2013 17:55:54 +0000 Original-Received: from localhost ([127.0.0.1]:51714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFpu6-0005o4-Bw for submit@debbugs.gnu.org; Wed, 13 Mar 2013 13:55:54 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:36935) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFpu2-0005nn-Q9 for 13921@debbugs.gnu.org; Wed, 13 Mar 2013 13:55:52 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MJM006001MHKP00@a-mtaout21.012.net.il> for 13921@debbugs.gnu.org; Wed, 13 Mar 2013 19:54:37 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJM0066X1R1KC30@a-mtaout21.012.net.il>; Wed, 13 Mar 2013 19:54:37 +0200 (IST) In-reply-to: <838v5sj6qt.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72422 Archived-At: > Date: Wed, 13 Mar 2013 05:52:58 +0200 > From: Eli Zaretskii > Cc: 13921@debbugs.gnu.org > > > source-directory is a variable defined in `lread.c'. > > Its value is "d:/devel/emacs/release/emacs24/emacs-24.2/" > > > > Documentation: > > Directory in which Emacs sources were found when Emacs was built. > > You cannot count on them to still be there! > > > > I did not find this /devel/emacs/release/emacs24/emacs-24.2/ on my system, > > nor is it the kind of path I would create. > > source-directory is where Emacs was built. And since you didn't build > it yourself, this reflects the directory where whoever built it did > that. > > And since Cygwin passes to Emacs a file name without a drive letter, > the logic in autoload.el causes the D: drive letter be added to > /home/epich/sw/cedet/lisp/cedet, because it doesn't expect a > semi-absolute file name like that, it expects either a relative file > name or a fully-qualified absolute one. > > So this is a direct result of launching a native w32 Emacs from a > Cygwin Bash. To make this more clear: this fragment: (defun autoload-generated-file () (expand-file-name generated-autoload-file ;; File-local settings of generated-autoload-file should ;; be interpreted relative to the file's location, ;; of course. (if (not (local-variable-p 'generated-autoload-file)) (expand-file-name "lisp" source-directory)))) clearly assumes that either generated-autoload-file is a file name relative to the Emacs's lisp directory, or it is an absolute file name. But in your case, it is an absolute file name without a drive letter, so expand-file-name takes the drive letter from source-directory. A Cygwin specific workaround would be to use `cygpath -m /home/epich/sw/cedet/lisp/cedet/loaddefs.el` which will supply the missing drive letter. (Yes, that means you need to hack the CEDET build scripts.)