From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: applying .dir-locals.el settings when buffer-file-name is nil Date: Mon, 03 Aug 2009 17:18:53 -0400 Message-ID: References: <200907191747.n6JHl0SV019287@godzilla.ics.uci.edu> <87hbx87cvm.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249348997 15921 80.91.229.12 (4 Aug 2009 01:23:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2009 01:23:17 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 04 03:23:10 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MY8k9-0006wU-Ct for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2009 03:23:09 +0200 Original-Received: from localhost ([127.0.0.1]:40037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY8k8-0002OA-Fq for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2009 21:23:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MY4vv-0008Pr-Io for emacs-devel@gnu.org; Mon, 03 Aug 2009 17:19:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MY4vp-0008LH-Q6 for emacs-devel@gnu.org; Mon, 03 Aug 2009 17:19:01 -0400 Original-Received: from [199.232.76.173] (port=34615 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY4vn-0008L5-Nx for emacs-devel@gnu.org; Mon, 03 Aug 2009 17:18:56 -0400 Original-Received: from torrent.cc.mcgill.ca ([132.206.27.49]:50652) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MY4vn-0005U8-AK for emacs-devel@gnu.org; Mon, 03 Aug 2009 17:18:55 -0400 Original-Received: from mailscan2.ncs.mcgill.ca (mailscan2.NCS.McGill.CA [132.216.77.249]) by torrent.cc.mcgill.ca (8.12.11.20060308/8.12.3) with ESMTP id n73LIrhS025211; Mon, 3 Aug 2009 17:18:54 -0400 Original-Received: from mailscan2.ncs.mcgill.ca (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id A044C8E42; Mon, 3 Aug 2009 17:18:54 -0400 (EDT) Original-Received: from ceviche.home (wpa075055.wireless.mcgill.ca [142.157.75.55]) by mailscan2.ncs.mcgill.ca (Postfix) with ESMTP id 64B508D0C; Mon, 3 Aug 2009 17:18:54 -0400 (EDT) Original-Received: by ceviche.home (Postfix, from userid 20848) id 24323B4198; Mon, 3 Aug 2009 17:18:53 -0400 (EDT) In-Reply-To: <87hbx87cvm.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 19 Jul 2009 21:21:01 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-PMX-Version: 5.4.2.338381, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2009.7.30.111525 X-McGill-WhereFrom: Internal X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113627 Archived-At: >> .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