GNU bug report logs -
#25111
How modification-hooks let-bind inhibit-modification-hooks?
Previous Next
Full log
Message #28 received at 25111 <at> debbugs.gnu.org (full text, mbox):
> From: phillip.lord <at> russet.org.uk (Phillip Lord)
> Cc: 25111 <at> debbugs.gnu.org
> Date: Fri, 09 Dec 2016 17:17:51 +0000
>
> > So how would you want the manual to help avert such calamities?
>
>
> My own feeling is that "inhibit-modification-hooks" should *only* be for
> modifications that really should not be detected by anything else. I can
> think of examples of this (I used to change the buffer to display a
> completion string to the user for instance, although I now use an
> "after-string" overlay property).
>
> The simplest advice makes calls to the modification hooks consistent is
> to say "You should not modify the buffer on these hooks". The potential
> solution, for instance, for yasnippet is to record the changes on
> after-change-function, and then change the buffer on
> post-command-hook. I think this would work? Is this what the manual
> should say?
IMO, the manual should advise the safe practices, and then tell how to
behave if the code really needs to play it less safe. The former
would be what you say above, I think. But since we know there are
packages out there that don't choose the safe approach, we should
cover those as well.
This bug report was last modified 6 years and 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.