Jambunathan K writes: >> Good idea. There is `post-self-insert-hook' but there is no >> `pre-self-insert-hook' that would check whether the point is in >> an invisible area of the buffer, and send a warning about this. > > In org-self-insert-command check for visibility at point and take the > required action. That's it. Thanks! Here is a dummy patch that prevents the user from editing invisible parts of the buffer. It doesn't prevent query-and-replace commands. Can people test it and comment it? Maybe throwing an error is a bit too much. Maybe preventing all kind of edition in invisible parts of the buffer is too much as well -- looking forward reading comments on this. Thanks,