[Top][All Lists]

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

Re: [Emacs-diffs] master 0528a7c: Ensure that expand-file-name returns a

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 0528a7c: Ensure that expand-file-name returns an absolute file name
Date: Mon, 08 Jul 2019 23:46:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> In the bug discussion I explained why I thought this alternative was
> better.

I didn't see it there.  You mentioned that you preferred to avoid the
inf-loop, but that doesn't mean you prefer for expand-file-name to use
an arbitrary (hopefully) absolute file name as default
default directory over signaling an error.

In the OP's description of the problem, clearly the relative
default-directory is in error, so trying to fix this case by changing
one of Emacs core functions instead of just fixing that minor error
seems odd: most likely the minor error will have to be fixed anyway
because it will bump into other errors elsewhere or because it needs to
work with Emacs<27.

Signaling a clear error here would have helped the programmer find the
real problem and fix it quickly, whereas the patch we installed caters
to broken code, encouraging bad practices.

Don't get me wrong: this is a minor issue, and I don't think it matters
very much, but I'm rather surprised by the patch.


reply via email to

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