GNU bug report logs -
#13921
24.2; Misbehavior of expand-file-name on Cygwin with Emacs 24.2
Previous Next
Reported by: Barry OReilly <gundaetiapo <at> gmail.com>
Date: Mon, 11 Mar 2013 02:05:02 UTC
Severity: normal
Found in version 24.2
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 13921 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 13 Mar 2013 05:52:58 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 13921 <at> 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.)
This bug report was last modified 12 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.