all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Halliday <sam.halliday@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: force reparse of file variables
Date: Fri, 14 Aug 2015 05:54:03 -0700 (PDT)	[thread overview]
Message-ID: <80d6bcef-f91c-447b-bf3b-e47a5a3840ee@googlegroups.com> (raw)
In-Reply-To: <mqikt3$uos$1@dont-email.me>

On Thursday, 13 August 2015 18:43:37 UTC+1, Dan Espen  wrote:
> Sam Halliday <sam.halliday@gmail.com> 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.
> 
> 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. If 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


  parent reply	other threads:[~2015-08-14 12:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 16:59 force reparse of file variables Sam Halliday
2015-08-13 17:43 ` Dan Espen
2015-08-13 18:23   ` Drew Adams
2015-08-14 12:54   ` Sam Halliday [this message]
2015-08-14 13:14     ` Michael Heerdegen
     [not found]     ` <mailman.8326.1439558135.904.help-gnu-emacs@gnu.org>
2015-08-14 13:41       ` Dan Espen
2015-08-14 15:23       ` Sam Halliday

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80d6bcef-f91c-447b-bf3b-e47a5a3840ee@googlegroups.com \
    --to=sam.halliday@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.