Skip to content

Silex/hookify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

MELPA MELPA Stable

Hookify

Interactive commands to create temporary hooks.

Installation

The recommended way to install hookify is through MELPA.

Otherwise, simply add hookify.el to your load-path and then (require 'hookify).

Commands

hookify

M-x hookify asks for a hook, and then for some elisp to run when that hook triggers.

With a prefix argument, removes the function from the hook.

Examples

  • Restart nginx whenever the edited file is saved:

    M-x hookify after-save-hook RET (shell-command "systemctl restart nginx")

  • Copy remotely edited TRAMP file to ~/backup.txt every time it is saved:

    M-x hookify after-save-hook RET (copy-file (buffer-file-name) "~/backup.txt")

Contributions welcome!

Either as suggestions or as pull requests by opening tickets on the issue tracker.

About

Interactive commands to create temporary hooks.

Resources

Stars

Watchers

Forks

Packages

No packages published