From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric Schulte" Newsgroups: gmane.emacs.devel Subject: Re: .dir-locals.el Date: Wed, 07 Jan 2009 16:08:42 -0800 Message-ID: <87hc4ak6b9.fsf@gmail.com> References: <200812271713.mBRHDnU3019200@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1231373352 11199 80.91.229.12 (8 Jan 2009 00:09:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2009 00:09:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 08 01:10:23 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 1LKiTC-0005kY-Da for ged-emacs-devel@m.gmane.org; Thu, 08 Jan 2009 01:09:54 +0100 Original-Received: from localhost ([127.0.0.1]:43162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKiRw-0002YR-GJ for ged-emacs-devel@m.gmane.org; Wed, 07 Jan 2009 19:08:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKiRr-0002Wn-Js for emacs-devel@gnu.org; Wed, 07 Jan 2009 19:08:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKiRp-0002VG-Sx for emacs-devel@gnu.org; Wed, 07 Jan 2009 19:08:31 -0500 Original-Received: from [199.232.76.173] (port=58407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKiRp-0002Uw-Lf for emacs-devel@gnu.org; Wed, 07 Jan 2009 19:08:29 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.168]:14970) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKiRp-0001tE-9d for emacs-devel@gnu.org; Wed, 07 Jan 2009 19:08:29 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 28so10342730wfc.24 for ; Wed, 07 Jan 2009 16:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=XtnGxICwNBXEaCEvov9SZmqgbqpLqTaiX5uhuxQZLzk=; b=tjnXzlGqfon3IH1+ICsCO2PC8eBqGb1wgIPLIvVvR/sq2DtEcXU8PLx4Dj7CcQLS9D 7Nc2kKOIJbI80SMfm+JUdNhoLZJIctRPu07ihbtL4m5DvgNPvJ0904J6AOdxgas6DUkq CcExRCWoIpYZMqcFuSZRQReySIxkZ1pyVGrzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=uIUoYog0iq4IT4r6DkTpZwyaEvljV8nuFLLHN7fmqoFW/L4vPHZhEK/iGyPOBuu1il R9NonosAyTe5cr83WlypinmjfUjlk6NtWNUJgDYRW4sO0nOZcZMYeD2Cf+DGGRcm6FV+ njvqL+xXf0nwz1bCKM+y1KsH7wdcxVzCzkNkw= Original-Received: by 10.143.3.7 with SMTP id f7mr9893165wfi.92.1231373307626; Wed, 07 Jan 2009 16:08:27 -0800 (PST) Original-Received: from eschulte-work (c-76-121-187-133.hsd1.wa.comcast.net [76.121.187.133]) by mx.google.com with ESMTPS id 20sm40114667wfi.7.2009.01.07.16.08.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Jan 2009 16:08:27 -0800 (PST) In-Reply-To: (Eli Zaretskii's message of "Sat, 27 Dec 2008 21:04:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:107702 Archived-At: Is there a good way to apply the variables set in .dir-locals.el when changing into and out of a directory in eshell (or I suppose in other Emacs shells as well)? I've tried setting eshell as a mode in the .dir-locals.el file but with no success. I've also tried to define after-advice on the `cd' function in eshell, but there doesn't appear to be any means for applying local variables to a buffer which doesn't have a file-name. (defadvice cd (after dir-locals-on-cd activate) "Apply the variables defined in .dir-locals.el when changing into and outof a directory in eshell." (hack-dir-local-variables)) Fails because `hack-dir-local-variables' checks that the buffer is visiting a file before applying the variables. Is there a supported way to do this? If not should I write a new function for this? If so should it be included in the dir-locals.el functionality? If not is there a reason to only allow setting local variables for buffers visiting files? Thanks -- Eric