From: Eli Zaretskii <eliz@gnu.org>
To: joaotavora@gmail.com (João Távora)
Cc: 18310@debbugs.gnu.org
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 [thread overview]
Message-ID: <83vbpkn6jw.fsf@gnu.org> (raw)
In-Reply-To: <jjb61hkvn0k.fsf@gmail.com>
> 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.
next prev parent reply other threads:[~2014-08-22 10:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 10:33 bug#18310: 24.3.93; relative links don't work in eww and Windows 7 João Távora
2014-08-21 14:04 ` Eli Zaretskii
2014-08-21 15:43 ` João Távora
2014-08-21 16:17 ` Eli Zaretskii
2014-08-21 16:54 ` João Távora
2014-08-21 19:17 ` Eli Zaretskii
2014-08-22 10:26 ` João Távora
2014-08-22 10:48 ` Eli Zaretskii [this message]
2014-08-22 14:39 ` Stefan Monnier
2014-08-22 15:25 ` Eli Zaretskii
2014-08-25 17:23 ` João Távora
2014-08-26 18:11 ` Glenn Morris
2014-08-26 20:37 ` João Távora
2014-08-27 5:05 ` Glenn Morris
2014-09-18 17:56 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83vbpkn6jw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18310@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.