From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hongxu Chen Newsgroups: gmane.emacs.help Subject: What's the exact time that buffer/file/directory local variables is evaluated in Emacs? Date: Fri, 19 Jul 2013 11:13:58 +0800 Message-ID: <87zjtjjl6x.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374203660 21156 80.91.229.3 (19 Jul 2013 03:14:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jul 2013 03:14:20 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 19 05:14:21 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V019A-00074z-IH for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Jul 2013 05:14:20 +0200 Original-Received: from localhost ([::1]:42557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0199-0002n3-DQ for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jul 2013 23:14:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V018x-0002ms-QK for help-gnu-emacs@gnu.org; Thu, 18 Jul 2013 23:14:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V018u-0000Lt-Mq for help-gnu-emacs@gnu.org; Thu, 18 Jul 2013 23:14:07 -0400 Original-Received: from mail-pd0-x232.google.com ([2607:f8b0:400e:c02::232]:33900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V018u-0000LP-FM for help-gnu-emacs@gnu.org; Thu, 18 Jul 2013 23:14:04 -0400 Original-Received: by mail-pd0-f178.google.com with SMTP id w11so3765293pde.37 for ; Thu, 18 Jul 2013 20:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=UcQTIT6hI8rnG1n+qs/dyAM65Sfpc4EhwoO9ZPJe+RQ=; b=dzZtRHbLubMgYpGrGqWpYjTUw+NVJ0Rg85K8nlkysAvWZNj5zxTWQCFmaOYGK0r0up j3FZQCauYu8pq5Fc+zd/hlpKQtwyiA89Z6SYKRkCElOH1ZZqZPWLlFMt7yLbr+DLEHmV 3IdIWXF8QoWetRN85dUAj4zAEiF3JTRK24H2sUurNQ3uufRdvwcp3TXQVrHrQ4mvDMVK 9DCKh2JbdEh+IilR8oR84sBxn+ZRWBvcRZ0yp/ges3fKJs6Hh2atJAjs/rpBiEPFVBca 455GfHfMPvyAt0A9qetspMguq2n358p2TVt3i/JMWobZVDQAT8h/Idte7vwVX+22Uz4/ Hijw== X-Received: by 10.68.212.229 with SMTP id nn5mr15088568pbc.44.1374203643245; Thu, 18 Jul 2013 20:14:03 -0700 (PDT) Original-Received: from hongxuchen-VM.STAP ([167.220.232.198]) by mx.google.com with ESMTPSA id pv5sm19804530pac.14.2013.07.18.20.14.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 18 Jul 2013 20:14:02 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92244 Archived-At: Hi guys, I have often been confused with the time when some local variables are evaluated in Emacs, especially when I am customizing some settings for C/C++ mode. For instance, I added (flymake-mode-on) to `c-mode-hook', however the specified flymake tool `clang' is dependent on the dir-local variable `ac-clang-flags'. So whenever I open a c file which requires some additional flags(such as includes, definition of macros, etc) Flymake would emit false error/warning messages since it still uses the old value of `ac-clang-flags'; and only after some changes have been made I can occasionally see the update of the value. Is there any way to make it work just right? Presently I guess the command `normal-mode' may have some effects on the local variables, but I just cannot figure out the exact time when these variables are set. -- Thanks, Hongxu Chen