From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: giampi Newsgroups: gmane.emacs.help Subject: directory specific configuration Date: Tue, 21 Jul 2009 03:30:51 -0700 (PDT) Message-ID: <24585256.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248187366 11880 80.91.229.12 (21 Jul 2009 14:42:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jul 2009 14:42:46 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 21 16:42:39 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MTGYA-0006y2-5c for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jul 2009 16:42:38 +0200 Original-Received: from localhost ([127.0.0.1]:55985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTGY9-0003hB-LO for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jul 2009 10:42:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTCcj-0006WZ-TX for help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 06:31:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTCcg-0006UK-0E for Help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 06:31:05 -0400 Original-Received: from [199.232.76.173] (port=32951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTCcf-0006UD-IU for Help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 06:31:01 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:7188) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTCcf-0000lT-1j for Help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 06:31:01 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTCcc-0007Lt-No for Help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 06:30:59 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MTCcV-0005dx-6W for Help-gnu-emacs@gnu.org; Tue, 21 Jul 2009 03:30:51 -0700 X-Nabble-From: giampisalvi@gmail.com X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Tue, 21 Jul 2009 10:40:37 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66306 Archived-At: Hi all, short version of the question: is there a way to make emacs read (besides the local ~/.emacs file) also a directory specific .emacs file, in case that file exists? long version: I use emacs to write latex files. I often use different languages and therefore would like to use different dictionaries in ispell. I also often split the document in several tex files, so, every time I have to set the dictionary manually for each file. Each document is in a different directory, so it would be practical for me to have an automatic way to always start emacs with the right dictionary depending on the directory I run from (or, better, depending on the location of the file I open). I bet this would require just a few lines of lisp in ~/.emacs that do: 1) get directory of the file I'm opening 2) check if a .emacs file exists for that directory 3) source the .emacs file Unfortunately I'm no lisp programmer, so any help would be appreciated. Thank you! Giampiero If it is relevant, I'm using GNU Emacs 23.0.91.1 on an Ubuntu 9.04 machine -- View this message in context: http://www.nabble.com/directory-specific-configuration-tp24585256p24585256.html Sent from the Emacs - Help mailing list archive at Nabble.com.