[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HowTo: Run a hook when a buffer becomes "current"
From: |
Richard Stallman |
Subject: |
Re: HowTo: Run a hook when a buffer becomes "current" |
Date: |
Wed, 16 Dec 2015 23:58:37 -0500 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> I was looking for a way of running a function when a buffer becomes
> "current". I cant find any hooks in Emacs -- the closest is
> buffer-list-update-hook -- but that gets called way too often including
> when a buffer is buried, is visited transiently from within lisp code
> etc.
This is one of the hooks I decided we should not have. If changing
the current buffer, with set-buffer for instance, can affect execution
of code, you'll never be able to debug code when that hook is in use.
--
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.
- HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/16
- Re: HowTo: Run a hook when a buffer becomes "current", Nicolas Richard, 2015/12/16
- Re: HowTo: Run a hook when a buffer becomes "current",
Richard Stallman <=
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/17
- Re: HowTo: Run a hook when a buffer becomes "current", Richard Stallman, 2015/12/18
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current", Dmitry Gutov, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current", raman, 2015/12/19
- Re: HowTo: Run a hook when a buffer becomes "current", John Wiegley, 2015/12/22