From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Newsgroups: gmane.emacs.bugs Subject: bug#18310: 24.3.93; relative links don't work in eww and Windows 7 Date: Thu, 21 Aug 2014 16:43:48 +0100 Message-ID: References: <83wqa2aqgu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1408635934 30891 80.91.229.3 (21 Aug 2014 15:45:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2014 15:45:34 +0000 (UTC) Cc: 18310@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 17:45:26 2014 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 1XKUYC-0003Y7-1X for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2014 17:45:20 +0200 Original-Received: from localhost ([::1]:32969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKUYB-00020N-N9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Aug 2014 11:45:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKUY2-0001wx-Bv for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2014 11:45:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKUXu-0002Yj-R4 for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2014 11:45:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKUXu-0002XQ-Ne for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2014 11:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XKUXu-0005pN-6Y for bug-gnu-emacs@gnu.org; Thu, 21 Aug 2014 11:45:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Aug 2014 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18310 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18310-submit@debbugs.gnu.org id=B18310.140863584322310 (code B ref 18310); Thu, 21 Aug 2014 15:45:02 +0000 Original-Received: (at 18310) by debbugs.gnu.org; 21 Aug 2014 15:44:03 +0000 Original-Received: from localhost ([127.0.0.1]:49067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XKUWx-0005nl-59 for submit@debbugs.gnu.org; Thu, 21 Aug 2014 11:44:03 -0400 Original-Received: from mail-we0-f179.google.com ([74.125.82.179]:43913) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XKUWt-0005n8-UQ for 18310@debbugs.gnu.org; Thu, 21 Aug 2014 11:44:01 -0400 Original-Received: by mail-we0-f179.google.com with SMTP id u57so9374574wes.24 for <18310@debbugs.gnu.org>; Thu, 21 Aug 2014 08:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=VGyGvh3yCDLB2r1YRwOgRUBgmOJgD5QJB0aCCJoIJIc=; b=ZnjUhGH/hf6m62+uurp+1JaJ7VB6e2RWPnfRYF7YV6YY3Cj0UUlOPULhFIHts8Pu9M cp2dLAb0kwePckbkUzUfhq2gyGMi7f9CuBa6h1UbERu16yarKpgBTDflkMVYy8tPpcVU mwRVa25Ce1OEIXFrUJf3/kmRGBwY38us1oH4H1vOa0NVsOEz9B9hpkT94BiHSPntab1V ibMLg6p924Tjp8/U9ac2LjS5tVKvfrSBAYWQTY7sIXiKmUx5xa/xcUlzJUY0+cXXq2Up TKpElCgRBFdtfVDb1ROVUc5kaBcqbr4coJ7ghTo6teVYHqZKAHpDXv8tae4HFGMU9DOR v8aA== X-Received: by 10.194.209.169 with SMTP id mn9mr4458139wjc.122.1408635833692; Thu, 21 Aug 2014 08:43:53 -0700 (PDT) Original-Received: from GONDOMAR.yourcompany.com (mail3.siscog.pt. [195.23.29.18]) by mx.google.com with ESMTPSA id oz9sm16846388wjb.20.2014.08.21.08.43.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Aug 2014 08:43:52 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (windows-nt) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:92571 Archived-At: Eli Zaretskii writes: > I'm pretty sure it did happen on XP. I wasn't aware of the bug until the switch to Windows 7. Maybe I didn't use eww with relative links at all, or maybe other factors influencing `expand-file-name' weren't acting. > I don't think it's because of HOME, since there was no "~" in the file > name. I'm guessing that the default-directory of the buffer where you > used that code was on the z: drive, so Emacs used that to complete the > missing drive letter. Something other than `default-directory' seems to be influencing it. I did some tests: (let ((default-directory "/")) (expand-file-name "../" "/something/bla")) (let ((default-directory "\\")) (expand-file-name "../" "/something/bla")) =20=20=20=20 (let ((default-directory nil)) (expand-file-name "../" "/something/bla")) (let ((default-directory "")) (expand-file-name "../" "/something/bla")) All produce "z:/something". However (let ((default-directory "c:")) (expand-file-name "../" "/something/bla")) (let ((default-directory "\\\\mymachine")) (expand-file-name "../" "/something/bla")) Do produce "c:/something/" and "//mymachine/something/", respectively. Finally (let ((default-directory "\\\\")) (expand-file-name "../" "/something/bla")) Crashed the Emacs process on my machine. Can you reproduce? I don't have debuggers handy on Windows, so can't even get a backtrace. > There's nothing wrong with expand-file-name, please don't waste your > time looking there. Well, there's the fact that it crashed... but anyway I didn't say there was. I just didn't understand what it did. Now that you have explained, I do, more than before at least. But from its docstring it's not clear. I didn't understand that "canonicalize" means different for different platforms. Maybe because Emacs use of "/" on Windows is an exception I'm used to. The docstring should explain its relationship with the `default-directory' variable, which in the current version sounds like it's shadowed completely by the DEFAULT-DIRECTORY parameter. Perhaps a sentence could be added. If DEFAULT-DIRECTORY is nil or missing, the current buffer's value of `default-directory' is used. Even if DEFAULT-DIRECTORY is non-nil, `default-directory' may still be used to help canonicalize the resulting name for the current platform. If it's being influenced by anything else, it should also explain it. > Please use url-expand-file-name instead, it does exactly what you > want, and does that portably. That sounds perfectly right, but I don't have time to setup my Emacs development environment, sorry, so maybe someone else can perform the change. I think it's a bug to fix for 24.4. Jo=E3o PS: Had a look at `url-expand-file-name': isn't it doing to much for `shr-expand-url''s purposes? There seems to be an overlap between the two. Anyway for 24.4 any fix will do I guess.