unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juri Linkov <juri@jurta.org>
Cc: Dan Nicolaescu <dann@ics.uci.edu>, emacs-devel@gnu.org
Subject: Re: applying .dir-locals.el settings when buffer-file-name is nil
Date: Mon, 03 Aug 2009 17:18:53 -0400	[thread overview]
Message-ID: <jwvr5vsy4xe.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87hbx87cvm.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 19 Jul 2009 21:21:01 +0300")

>> .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	other threads:[~2009-08-03 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 17:47 applying .dir-locals.el settings when buffer-file-name is nil Dan Nicolaescu
2009-07-19 18:21 ` Juri Linkov
2009-08-03 21:18   ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr5vsy4xe.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).