help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directory specific configuration


From: Thierry Volpiatto
Subject: Re: directory specific configuration
Date: Tue, 21 Jul 2009 17:02:11 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

Hi,

giampi <giampisalvi@gmail.com> writes:

> 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

An other approach is to set by file the dictionnary you want to use by
adding these lines at end of your files: (change the comments strings,
depending the mode you use e.g latex)

,----
| # Local Variables:
| # ispell-local-dictionary: "english"
| # End:
`----

With this example when you launch flyspell-mode in this buffer, you will
have the english dictionnary.


-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





reply via email to

[Prev in Thread] Current Thread [Next in Thread]