I have been trying, but... Here's the deal:
file-truename fails when there's a non-accessible directory somewhere
in the "real" filename. In this case I bet it is /cygdrive (cygwins
magic mapping to c:/ etc.).
This happens in beta37 as well as in beta45, but probably wasn't
visible in beta37 since find-file-compare-truenames wasn't true by
default. It doesn't happen (i.e. file-truename worked) in for 21.1.13,
since cygwin's own realpath is called, instead of xemacs's xrealpath
(which took me astonishingly long to find out :-) ).
My guess is that you could see this on unix as well if you
(1) make a symlink to a file in a nonexisting directory, like this:
M-! ln -s /nonexisting/foo ~/linktest RET
(2) M-: (file-truename "~/linktest")
On cygwin (beta37 and beta45) this produces "/nonexisting" instead of
"/nonexisting/foo", but unfortunately I can't test this on unix right
now...
The solution is probably to fix the code in file-truename, after the
/* Failed on this component. Just tack on the rest of
the string and we are done. */
part - but I'm afraid I don't understand what this is supposed to do
well enough.
An ugly "fix" might be not to make find-file-compare-truenames default
to true on cygwin - this at least masks the problem.
/dan
Andy Piper <andyp(a)bea.com> writes:
Dan,
I think this was your fix. Any chance you can re-fix?
Thanks
andy
At 03:13 PM 3/15/01 +0000, Philip Aston wrote:
>This bug report will be sent to the XEmacs Development Team,
> not to your local site managers!!
>Please write in English, because the XEmacs maintainers do not have
>translators to read other languages for them.
>
> In XEmacs 21.2 (beta45) "Thelxepeia (GTK Inside)" [Lucid]
> (i686-pc-cygwin) of Thu Mar 15 2001 on PASTON
> configured using `configure --with-dragndrop
> --site-includes=/usr/include/w32api --debug=no --error-checking=no'
>
>Please describe exactly what actions triggered the bug
>and the precise symptoms of the bug:
>
>
>I symlink init.el, custom.el and others to a shared FAT partition (I
>run cygwin and linux on a dual boot machine):
>
> lrwxrwxrwx 1 philipa None 48 Feb 26 17:16 custom.el ->
>/share/home/philipa/.xemacs/custom.el
> lrwxrwxrwx 1 philipa None 49 Feb 26 17:16 info.notes ->
>/share/home/philipa/.xemacs/info.notes
> lrwxrwxrwx 1 philipa None 46 Feb 26 17:15 init.el ->
>/share/home/philipa/.xemacs/init.el
>
>
>This has shown up a regression in b45 that didn't occur in b37.
>
>
> (file-truename "~/.xemacs/custom.el")
> => "/share"
>
> (file-truename "~/.xemacs/init.el")
> => "/share"
>
>
>Needless to say, chaos ensues.
>
>
>Recent keystrokes:
>
>M-x b u TAB g TAB M-BS s u b TAB BS BS BS misc-user
>S y u BS m l i n k s SPC a n d SPC M-BS M-BS C y g
>w i n SPC s y m l i n k s SPC m BS n o t SPC p a r
>s e d SPC c o r r e c t l y M-left M-left M-right M-BS
>h a m n BS BS n d l e d RET left right C-g M-x up C-g
>C-g misc-user
>
>
>Recent messages (most recent first):
>
>Parsing /home/philipa/.mailrc...
>Loading mail-abbrevs...done
>Loading mail-abbrevs...
>Quit
>Quit
>Quit
>Cannot switch buffers in minibuffer window
>Loading emacsbug...done
>Loading emacsbug...
>Making completion list...
--
Dan Ola Holmsand
IB
dan(a)eyebee.com