Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    New hooks focus-in-hook, focus-out-hook.
    These are normal hooks run when an Emacs frame gains or 
    loses input focus.
Cool. I think the lack of such a hook is what was preventing an implementation of "save all buffers" when the user clicks outside the window, something commonly used in IDEs.


Prelude also adds hooks to save a buffer every time it loses focus. It also triggers when the point is placed by a mouse click.

Very useful!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: