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

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

Re: Unsafe variable in a saved *compilation* buffer


From: Stefan Monnier
Subject: Re: Unsafe variable in a saved *compilation* buffer
Date: Mon, 12 Mar 2007 10:35:16 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

>     I'm not sure what's the reason to put such a file-local variable.
>     More to the point, I'm not sure it's a good idea in the first place.

> The reason M-x compile generates this local variable is to make sure
> the error messages are interpreted with respect to the proper
> directory.

> We want this variable to be put into effect if the text is saved and
> visited again.

Presumably if it's saved, it'll be saved in that same directory, so it'll
work just as well without the default-directory file-local variable.

OTOH, if the whole directory tree is moved/renamed (or accessed under
a different name, such as via Tramp, or sshfs, or ...), without the
default-directory file-local variable, things will still work just as well,
whereas with the default-directory file-local variable, the error messages
will be interpreted with respect to the improper directory.


        Stefan




reply via email to

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