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

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

bug#36830: 26.2; find-file-visit-truename is not honored as file local v


From: Lars Ingebrigtsen
Subject: bug#36830: 26.2; find-file-visit-truename is not honored as file local variable
Date: Sun, 25 Aug 2019 07:39:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> I don't think this variable was designed to be set from file-local
> variables block.  Visiting a file and naming its buffer are two racy
> actions, and where there's a race there will be chicken-and-egg type
> of problems.

[...]

> I expect such renaming to cause future bugs, FWIW.  Or maybe not, but
> this is beyond hacky, IMO.

Yes, I think so, too, but:

> Maybe we should just document that this variable cannot be file-local.

files.el has this:

(put 'find-file-visit-truename 'safe-local-variable 'booleanp)

It was changed to booleanp in 2007 (from the presumably invalid
`boolean'), so it didn't work before 2007 for that reason, and it hasn't
worked after 2007 because it's checked too late.

So perhaps the fix here is to just remove that `put'?

On the other hand, it would be nice if it worked, because it seems like
a pretty useful thing to be able to customise on a per-file basis.
Perhaps.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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