[Top][All Lists]

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

Re: Directory-local variables?

From: Juri Linkov
Subject: Re: Directory-local variables?
Date: Sat, 03 Jan 2009 02:46:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> PS: it now occurs to me that the name ".dir-locals.el" is redundant.
>> It could just say ".locals.el" or ".local-variables.el" since it's
>> placed in a directory.  Just like file variables are enclosed in
>> a "Local Variables" section rather than a "File Local
>> Variables" section.
> ".locals.el" is a reasonably short file name, and it looks nicer than
> ".dir-locals.el" without redundant "dir-" part.  So perhaps we should
> finally settle on this name.

One thing that still disturbs me is that this file is not in the same
format as in a Local Variables: section.

1. File local variables

;; Local Variables:
;; mode: change-log
;; add-log-time-zone-rule: t
;; fill-column: 74
;; End:

2. Directory-wide file local variables

(change-log-mode .
  ((add-log-time-zone-rule . t)
   (fill-column . 74)))

Two different formats for the same feature is a bad thing.  It requires
complete rewriting of these settings when moving file local variables
to the directory-wide file and back.  This is very inconvenient.

While it is not too late, I think we should use the same easy to write
format as in a Local Variables: section with keeping already implemented
features of directory-wide file variables (specifying multiply mode
settings in the same file).

Another thing that needs to be fixed is caching data from the
directory-wide file.  Currently after changing the settings in this file
they don't become effective.  We should check the file timestamp and
reread them.

Juri Linkov

reply via email to

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