From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: Reparsing local variables without reopening file? Date: Sat, 21 Sep 2002 22:27:32 GMT Organization: AT&T Broadband Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <87d6r7w3yy.fsf@bach.composers> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032647781 15083 127.0.0.1 (21 Sep 2002 22:36:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2002 22:36:21 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17ssrM-0003v9-00 for ; Sun, 22 Sep 2002 00:36:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ssrJ-0001QG-00; Sat, 21 Sep 2002 18:36:17 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!ihnp4.ucsd.edu!usc.edu!attla2!ip.att.net!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 12.228.19.12 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: rwcrnsc51.ops.asp.att.net 1032647252 12.228.19.12 (Sat, 21 Sep 2002 22:27:32 GMT) Original-NNTP-Posting-Date: Sat, 21 Sep 2002 22:27:32 GMT Original-Xref: nntp.stanford.edu gnu.emacs.help:105140 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1694 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1694 Ole Laursen writes: >Hi > >I was changing a local variable for a test example when it occurred to >me that I didn't know how to make Emacs reparse them. For example: > > // Local Variables: *** > // compile-command: "g++ test.cpp -o test -O3" *** > // End: *** > >Now, one can save and kill the buffer and refind the file (or perhaps >even do a M-x revert-buffer); however, this seems silly. M-x apropos >gives hack-local-variables. But that is a function? What do the gurus >do? Or should hack-local-variables be a command (perhaps with a >somewhat more descriptive name :-)? Typing M-: (hack-local-variables) >is a little laborious. A faster way to do that is with find-alternate-file (usually bound to C-x C-v) and then accept the default which will be the file you're currently visiting. This will re-load the file from disk, re-start the appropriate mode, and eval the local variables. That doesn't address your point of any other way to do it, but makes your way easier to do. BOL -- Mike Slass