From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18310: 24.3.93; relative links don't work in eww and Windows 7 Date: Fri, 22 Aug 2014 13:48:51 +0300 Message-ID: <83vbpkn6jw.fsf@gnu.org> References: <83wqa2aqgu.fsf@gnu.org> <83lhqhbyvg.fsf@gnu.org> <83k361bqjx.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1408704627 19544 80.91.229.3 (22 Aug 2014 10:50:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Aug 2014 10:50:27 +0000 (UTC) Cc: 18310@debbugs.gnu.org To: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 12:50:20 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 1XKmQE-00087z-AT for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Aug 2014 12:50:18 +0200 Original-Received: from localhost ([::1]:36202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKmQE-0002GP-0Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Aug 2014 06:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKmQ5-0002Ep-1N for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2014 06:50:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKmPz-0003Av-5U for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2014 06:50:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKmPz-0003AI-23 for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2014 06:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XKmPy-0003wQ-8e for bug-gnu-emacs@gnu.org; Fri, 22 Aug 2014 06:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Aug 2014 10:50:01 +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.140870454315071 (code B ref 18310); Fri, 22 Aug 2014 10:50:01 +0000 Original-Received: (at 18310) by debbugs.gnu.org; 22 Aug 2014 10:49:03 +0000 Original-Received: from localhost ([127.0.0.1]:49324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XKmP0-0003v0-Qv for submit@debbugs.gnu.org; Fri, 22 Aug 2014 06:49:03 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:61365) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XKmOw-0003uU-MR for 18310@debbugs.gnu.org; Fri, 22 Aug 2014 06:49:00 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NAP00D00F1MBT00@a-mtaout22.012.net.il> for 18310@debbugs.gnu.org; Fri, 22 Aug 2014 13:48:51 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NAP00CCXFDEX650@a-mtaout22.012.net.il>; Fri, 22 Aug 2014 13:48:51 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:92592 Archived-At: > From: joaotavora@gmail.com (João Távora) > Cc: 18310@debbugs.gnu.org > Date: Fri, 22 Aug 2014 11:26:03 +0100 > > > Yes. This is a deliberate trap for code either in Emacs itself or in > > Lisp applications that uses such invalid default-directory values. > > But it really seems arbitrary, since > > (let ((default-directory "><>:\"/\|?*")) > (expand-file-name "../" "/something/bla")) > > contains very much an invalid `default-directory' value and does not > "deliberately abort". It returs "z:/something" as always (i.e > default-directory is fully ignored). It's not arbitrary: "\\\\" signals a beginning of a UNC, which should have the host name and the share name following it, while the string you used above is simply random garbage. > >> I mean unprotected code may easily lead to that invalid case. > > > > Not "easily", no. Usually, default-directory comes from some file or > > buffer. > > It can very well be lexically bound to something that eventually > evaluates to "////". Then we want to catch those uses. > For example to temporarily work on a directory in a Lisp program. "\\\\" is not a directory, it's a butchered UNC. > To be clear, I fully support your "early abort" cause. But one thing is > aborting the command the other thing is aborting the process. I think > you should do the latter if it's the Emacs' internals that caused the > (supposedly unrecoverable) error. But you should do the former if it was > the user's Lisp program that provided incorrect input. Signaling an error is not prominent enough to catch the attention, it can be easily skipped, ignored, or even disabled. > I've looked at the code and expand-file-name is a woolly mammoth so > maybe that's hard to do, but it would be the right thing IMO. expand-file-name already does what is humanly possible to handle many weird cases. This one is not, and should not, be one of them. > Just because Emacs exists "in the hope that it will be useful" > doesn't mean one shouldn't care about user's critical mission. When Emacs aborts, it auto-saves, so it does care about users.