GNU bug report logs - #18310
24.3.93; relative links don't work in eww and Windows 7

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Thu, 21 Aug 2014 10:35:01 UTC

Severity: normal

Found in version 24.3.93

Fixed in version 24.3.94

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 18310 <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18310 <at> debbugs.gnu.org
Subject: Re: bug#18310: 24.3.93; relative links don't work in eww and Windows 7
Date: Thu, 21 Aug 2014 17:54:11 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: joaotavora <at> gmail.com (João Távora)
>> Cc: 18310 <at> debbugs.gnu.org
>> Date: Thu, 21 Aug 2014 16:43:48 +0100
>> 
>> Something other than `default-directory' seems to be influencing it. I
>> did some tests:
>
> Like I said: Emacs uses the current drive to complete the missing
> drive letter.  That is what you see.

OK. How is the "current drive" calculated when `default-directory' is
nil?

>> Finally
>> 
>>    (let ((default-directory "\\\\"))
>>      (expand-file-name "../" "/something/bla"))
>> 
>> Crashed the Emacs process on my machine.
>
> It's not a crash, it's a deliberate abort.  "\\\\" (i.e., 2
> backslashes in a row without anything after that) is an invalid file
> name on Windows.

Would signalling an error be very wrong, does the process really need to
be aborted? I mean unprotected code may easily lead to that invalid
case.

> How does that obscure hint help? It doesn't tell anything that mere
> mortals could understand. 

It mirrors the function's obscurity, so mere mortals can at least be
warned of death by deliberate abort.

Anyway it was meant for you to complete with enlightenment about the
function's interaction with things other than `default-directory',
something you didn't do. 

And needn't do, at least for me, since at least now I know to stay away
from `expand-file-name's quirks.

>  Once again, you are talking about semi-invalid use cases.  IMO,
> complicating the doc string (which is not at all simple as it is) on
> behalf of those use cases is not TRT.

BTW "Semi-invalid" uses, or even downright absurd use cases, are what
development/testing/experimentation is all about. IMO aborting the
process and not at least warning elisp users about invalid cases in the
documentation is not good practice in my opinion.

João




This bug report was last modified 10 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.