On 2016-06-12 18:58, Dmitry Gutov wrote: >> I have encountered no such problems in over 15 years of hacking >> Emacs. I think you're seeing problems somewhere and blaming >> narrow-to-region/widen, when the real problem is somewhere else. > > It's been a known problem for a while, and it has come up in multiple > discussions over the last years. > > The "real problem" is a matter of perspective. Some might argue that > trying to use narrowing at all, for any purpose, is a bad idea, and > then, of course, the right choice would be to use something else. I can share one instance of running into issues with narrow-to-region. I was implementing a simple ‘presenter’ mode, such that special comments were used to delimit ‘slides’. The mode functioned by narrowing the buffer to regions delimited by these special comments. It was a very convenient way to page through code in front of an audience. Unfortunately, this approach was not robust. I ran into issues with modes using (point-min) and (point-max) without widening, and thereby misplacing overlays. In the end things kept breaking, and I ended up implementing the same feature using two overlays with an invisible property, hiding everything before (respectively after) the region being shown. It was a pain. Not sure whether this is a useful contribution :) In any case, that's one problem I ran into. Clément.