bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18310: 24.3.93; relative links don't work in eww and Windows 7


From: João Távora
Subject: bug#18310: 24.3.93; relative links don't work in eww and Windows 7
Date: Thu, 21 Aug 2014 17:54:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: address@hidden (João Távora)
>> Cc: address@hidden
>> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]