From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Halliday Newsgroups: gmane.emacs.help Subject: Re: force reparse of file variables Date: Fri, 14 Aug 2015 05:54:03 -0700 (PDT) Message-ID: <80d6bcef-f91c-447b-bf3b-e47a5a3840ee@googlegroups.com> References: <79a7c233-3819-4aef-89ec-7d1e6bc317ee@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439556923 21518 80.91.229.3 (14 Aug 2015 12:55:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Aug 2015 12:55:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 14 14:55:22 2015 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 1ZQEW1-00086Z-Dh for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Aug 2015 14:55:21 +0200 Original-Received: from localhost ([::1]:46102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZQEW0-00031n-Q7 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Aug 2015 08:55:20 -0400 X-Received: by 10.13.217.212 with SMTP id b203mr16857934ywe.1.1439556843823; Fri, 14 Aug 2015 05:54:03 -0700 (PDT) X-Received: by 10.140.44.4 with SMTP id f4mr311615qga.31.1439556843806; Fri, 14 Aug 2015 05:54:03 -0700 (PDT) Original-Path: usenet.stanford.edu!69no990209qgi.0!news-out.google.com!78ni10059qge.1!nntp.google.com!69no990204qgi.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.244.128.25; posting-account=kRukCAoAAAANs-vsVh9dFwo5kp5pwnPz Original-NNTP-Posting-Host: 83.244.128.25 User-Agent: G2/1.0 Injection-Date: Fri, 14 Aug 2015 12:54:03 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:214295 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:106579 Archived-At: On Thursday, 13 August 2015 18:43:37 UTC+1, Dan Espen wrote: > Sam Halliday writes: > > Is there a way to force (re)-load all the file variables in a buffer? > > > > I have a template (with yasnippet) that populates files of certain > > types and derives some file variables (such as the 'compile-command), > > but I need to save/open to load it. >=20 > Do that lots of times. > I save the file, then revert-buffer. Thanks Dan. That works a charm. The one problem is that it means that in my= workflow if I create a new buffer, that has a file template, then I always= save the file instead of waiting for the user to decide when to save it. I= f there was a way to reload the File-Variables for an unsaved buffer, that'= d be even better. FYI, my templating is implemented here https://github.com/fommil/dotfiles/blob/master/.emacs.d/init.el#L222