Skip to content

EricCrosson/bury-successful-compilation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bury-successful-compilation Build Status MELPA

Automatically bury the *compilation* buffer when compilation succeeds

Install

From MELPA

(use-package bury-successful-compilation
  :ensure t
  :bind ("C-c C-m" . recompile))

Or manually, after downloading into your load-path

(require 'bury-successful-compilation)

Under the Covers

Like most Emacs directives, this package revolves around a largely-consistent but undocumented internal feature: the ability to use multi-character register names. This feature was brought to my attention by attention by Magnar Sveen, who you can say provided the inspiration that eventually became this project. The ability to create officially-unrecognized register names means the chance of a collision with user data in the same register is almost zero.

bury-successful-compilation works by saving the current window configuration to a register before each compilation. If a compilation fails, the saved state is not restored until the build succeeds again. This means after an attempted compilation, you can thrash your window configuration to chase down the compile-time issue, because when the build succeeds you will be popped up the stack back to the saved window configuration, right before your unsuccessful compilation attempt.

License

GPL 2 (or higher) © Free Software Foundation, Inc.