From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help Subject: Re: Eval elisp file automatically Date: Tue, 08 Feb 2011 16:38:16 +0100 Message-ID: References: <8739oaboss.fsf@puma.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1297179545 4857 80.91.229.12 (8 Feb 2011 15:39:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2011 15:39:05 +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 Feb 08 16:39:01 2011 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.69) (envelope-from ) id 1Pmped-0008WP-IT for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Feb 2011 16:38:59 +0100 Original-Received: from localhost ([127.0.0.1]:47096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pmped-0003MB-3D for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Feb 2011 10:38:59 -0500 Original-Received: from [140.186.70.92] (port=46813 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmpeC-0003LU-EB for help-gnu-emacs@gnu.org; Tue, 08 Feb 2011 10:38:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmpeB-0005tX-BG for help-gnu-emacs@gnu.org; Tue, 08 Feb 2011 10:38:32 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:56332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmpeB-0005tG-5o for help-gnu-emacs@gnu.org; Tue, 08 Feb 2011 10:38:31 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pmpe8-0008CB-UV for help-gnu-emacs@gnu.org; Tue, 08 Feb 2011 16:38:28 +0100 Original-Received: from 90-026.eduroam.rwth-aachen.de ([134.61.90.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Feb 2011 16:38:28 +0100 Original-Received: from andrea.crotti.0 by 90-026.eduroam.rwth-aachen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 08 Feb 2011 16:38:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 90-026.eduroam.rwth-aachen.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:jQiWCMo8JSwyNa6T/vVNJ1DDc7Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:79033 Archived-At: Andrea Crotti writes: > > After some time I came back and saw how dir local variables work, > verynice. > > So I have this > ((nil . > ((compile-command . "cd $PAD_DIR && make -j"))) > (c++-mode . (( flymake-mode . t)))) > > BUT flymake doens't really get activated even if the variable is set to > t. > Isn't there a way to run elisp code somehow, or to modify a hook? > > About what I originally asked, well the idea was just that I don't want > to define some functions in case I'm not working on a project. > > Now I just load the file with the functions defined and I'm fine. > To make it more neat it would be good to load the file ONLY the first > time that I visit a buffer in that directory, but that's not such a big > deal.. I think I got it, I have to set "eval" as a variable. I found out by chance using the interactive system to add variables, but didn't see it documented anywhere.. is that possible?