Skip to content

Enter Puppet top scope symbols with Emacs Abbrev mode

Puppet manages variables in different scopes. Global variables and all facts are defined in top scope. To make this explicit, these variables and facts should be accessed using the top scope notation. So in a Puppet manifest the hostname fact should for example be written as $::hostname. Here is a piece of Emacs code that automatically adds the double-colon namespace separator to variable and fact names.

Continue reading "Enter Puppet top scope symbols with Emacs Abbrev mode"

Augeas major mode for Emacs

Augeas is a tool to surgically edit Unix configuration files. The augeas type in Puppet allows changing single entries in a configuration file instead of deploying the whole file as a monolithic blob.

Augeas understands a lot of different configuration file formats but you may need to write Augeas code yourself if you want to parse your own file format. I didn't find an Emacs major mode for Augeas so I started writing my own. It is currently still at an early stage. You can find the code at