emacs-devel
[Top][All Lists]
Advanced

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

Re: applying .dir-locals.el settings when buffer-file-name is nil


From: Stefan Monnier
Subject: Re: applying .dir-locals.el settings when buffer-file-name is nil
Date: Mon, 03 Aug 2009 17:18:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> .dir-locals.el settings do not apply to buffers when (null
>> buffer-file-name) even when `default-directory' for those buffers is
>> dominated by .dir-locals.el.
>> 
>> VC for example creates buffers for which it would be good to be able to
>> have .dir-locals.el.  Examples: the log-edit-mode buffers - be able to
>> set some checkin rules, or automatically add things to the commit
>> message,  the vc-diff buffers  - show trailing whitespace, etc.

> I noticed this limitation as well and know no reason why it should be.
> For file-local variables it is justified because only file can hold a list
> of file-local variables.  But I think dir-local variables should have
> a wider coverage including non-file buffers.

The idea sounds good, but I'm not sure how it should be implemented.
Non-file buffers tend to be built in different ways (and their
default-directory may be set at different times, and/or may or may not
matter depending on the buffer), so they probably would need to
explicitly ask for dir-locals to be applied, rather than having it be
applied automatically to all non-file buffers.

Patches/ideas welcome,


        Stefan




reply via email to

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