From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: a little .emacs, like .htaccess, for subdirectories Date: Wed, 10 Apr 2002 10:28:32 -0600 Organization: IHS Engineering, Electronic Systems Development Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <3CB46830.27916B8D@ihs.com> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1018456217 7618 127.0.0.1 (10 Apr 2002 16:30:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 10 Apr 2002 16:30:17 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16vKzA-0001yl-00 for ; Wed, 10 Apr 2002 18:30:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16vKz5-00082p-00; Wed, 10 Apr 2002 12:30:11 -0400 Original-Received: from mailbox4.ucsd.edu ([132.239.1.56]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16vKx9-0007wm-00 for ; Wed, 10 Apr 2002 12:28:11 -0400 Original-Received: from mail.fu-berlin.de (mail.fu-berlin.de [160.45.11.165]) by mailbox4.ucsd.edu (8.12.1/8.12.1) with ESMTP id g3AGS93k002645 for ; Wed, 10 Apr 2002 09:28:10 -0700 (PDT) Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Wed, 10 Apr 2002 18:28:09 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Wed, 10 Apr 2002 18:28:09 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 36 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: fu-berlin.de 1018456088 33579619 170.207.51.80 (16 [82742]) X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 i86pc) X-Accept-Language: en Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:547 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:547 Dan Jacobson wrote: > > Well, Apache has .htaccess files for each directory tree, etc. Any > way to get a already running emacs to know that I want certain options > in effect when I am in this directory, and other options in effect > when I am in that directory? Sure there are local file variables, but > that is only for one file. Does http://www.lickey.com/env/elisp/dirvars.el do what you want? > And what about a *compilation* buffer? I don't think you are going to > get any local variables in there. > > Currently my .emacs does > (add-hook 'compilation-mode-hook > (function (lambda () > (toggle-read-only 1);else I often edit it because it > ;looks like my makefile > (toggle-truncate-lines); few docs for this > (define-key compilation-mode-map "q" 'quit-window)))) > > I was hoping to have toggle-truncate-lines be in effect in some > directories only. Must I make some big conditional deal right there > in the hook, having to list which directories I want this on in... or > can I one day maybe have a "little .emacs", say read by emacs the > first time it visits a file in a directory, with items only > applicable to files in that directory... and if I change the little > emacs, I would tell emacs to re digest it, unless I have autochecking on... I think the tricky thing is that the *compilation* buffer is a process buffer that's not visiting a file. Perhaps the dirvars-hack-local-variables-hook function could be added to compilation-mode-hook... -- Kevin Rodgers